From 9b6474dd6cf92e3a48eec24e126564f8c9c3901f Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 20 Jun 2023 15:09:54 +0300 Subject: [PATCH 1/3] kernel/common-config: enable AMD Zen BRS --- pkgs/os-specific/linux/kernel/common-config.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 44997740aea3..654a8dd1868d 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -617,6 +617,11 @@ let RING_BUFFER_BENCHMARK = no; }; + perf = { + # enable AMD Zen branch sampling if available + PERF_EVENTS_AMD_BRS = whenAtLeast "5.19" (option yes); + }; + virtualisation = { PARAVIRT = option yes; From b79dc4496b2a21e4bc09287e7a58bab99f00f5e9 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 20 Jun 2023 14:47:42 +0300 Subject: [PATCH 2/3] kernel/common-config: enable CONFIG_PMIC_OPREGION and friends for Bay Trail If you have one of these, know that at least nixpkgs still cares about you. --- pkgs/os-specific/linux/kernel/common-config.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 654a8dd1868d..090205b0dc0e 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -92,6 +92,21 @@ let X86_AMD_PSTATE = whenAtLeast "5.17" yes; # Intel DPTF (Dynamic Platform and Thermal Framework) Support ACPI_DPTF = whenAtLeast "5.10" yes; + + # Required to bring up some Bay Trail devices properly + I2C = yes; + I2C_DESIGNWARE_PLATFORM = yes; + PMIC_OPREGION = whenAtLeast "5.10" yes; + INTEL_SOC_PMIC = whenAtLeast "5.10" yes; + BYTCRC_PMIC_OPREGION = whenAtLeast "5.10" yes; + CHTCRC_PMIC_OPREGION = whenAtLeast "5.10" yes; + XPOWER_PMIC_OPREGION = whenAtLeast "5.10" yes; + BXT_WC_PMIC_OPREGION = whenAtLeast "5.10" yes; + INTEL_SOC_PMIC_CHTWC = whenAtLeast "5.10" yes; + CHT_WC_PMIC_OPREGION = whenAtLeast "5.10" yes; + INTEL_SOC_PMIC_CHTDC_TI = whenAtLeast "5.10" yes; + CHT_DC_TI_PMIC_OPREGION = whenAtLeast "5.10" yes; + TPS68470_PMIC_OPREGION = whenAtLeast "5.10" yes; }; external-firmware = { From 23f23b5603ff94bdda2c93475f8448620f4d3fa4 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 20 Jun 2023 15:03:02 +0300 Subject: [PATCH 3/3] kernel/common-config: enable DAMON --- pkgs/os-specific/linux/kernel/common-config.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 090205b0dc0e..0d0bddb61319 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -125,6 +125,16 @@ let CC_OPTIMIZE_FOR_SIZE = no; }; + memory = { + DAMON = whenAtLeast "5.15" yes; + DAMON_VADDR = whenAtLeast "5.15" yes; + DAMON_PADDR = whenAtLeast "5.15" yes; + DAMON_SYSFS = whenAtLeast "5.15" yes; + DAMON_DBGFS = whenAtLeast "5.15" yes; + DAMON_RECLAIM = whenAtLeast "5.15" yes; + DAMON_LRU_SORT = whenAtLeast "5.15" yes; + }; + memtest = { MEMTEST = yes; };