From b45a5bb6897998d6c22760c35de1e391caa8a24c Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Wed, 20 Mar 2024 19:59:50 +0100 Subject: [PATCH] odin: Add temporary patch for Coral driver (gasket) --- machines/odin/0001-fix-gasket.patch | 13 +++++++++++++ machines/odin/configuration.nix | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 machines/odin/0001-fix-gasket.patch diff --git a/machines/odin/0001-fix-gasket.patch b/machines/odin/0001-fix-gasket.patch new file mode 100644 index 0000000..00a202f --- /dev/null +++ b/machines/odin/0001-fix-gasket.patch @@ -0,0 +1,13 @@ +diff --git a/gasket_interrupt.c b/gasket_interrupt.c +index 531d94e..8dba182 100644 +--- a/gasket_interrupt.c ++++ b/gasket_interrupt.c +@@ -158,7 +158,7 @@ gasket_handle_interrupt(struct gasket_interrupt_data *interrupt_data, + read_lock(&interrupt_data->eventfd_ctx_lock); + ctx = interrupt_data->eventfd_ctxs[interrupt_index]; + if (ctx) +- eventfd_signal(ctx, 1); ++ eventfd_signal(ctx); + read_unlock(&interrupt_data->eventfd_ctx_lock); + + ++(interrupt_data->interrupt_counts[interrupt_index]); diff --git a/machines/odin/configuration.nix b/machines/odin/configuration.nix index 6bb5585..b350796 100644 --- a/machines/odin/configuration.nix +++ b/machines/odin/configuration.nix @@ -79,7 +79,11 @@ # From PVE: ro quiet intel_iommu=on i915.enable_gvt=1 cpufreq.default_governor=ondemand # kernelParams = [ "intel_iommu=on" "i915.enable_gvt=1" "cpufreq.default_governor=ondemand" ]; - extraModulePackages = with config.boot.kernelPackages; [ gasket ]; + extraModulePackages = with config.boot.kernelPackages; [ + (gasket.overrideAttrs (prevAttrs: { + patches = (prevAttrs.patches or [ ]) ++ [ ./0001-fix-gasket.patch ]; + })) + ]; kernel.sysctl = { "net.core.rmem_max" = 2500000;