@@ -60,16 +60,16 @@ let
6060 };
6161
6262 power-management = {
63− PM_ADVANCED_DEBUG = yes;
64− X86_INTEL_LPSS = yes;
65− X86_INTEL_PSTATE = yes;
66− INTEL_IDLE = yes;
6763 CPU_FREQ_DEFAULT_GOV_PERFORMANCE = yes;
6864 CPU_FREQ_GOV_SCHEDUTIL = yes;
65+ PM_ADVANCED_DEBUG = yes;
6966 PM_WAKELOCKS = yes;
70− # Power-capping framework and support for INTEL RAPL
7167 POWERCAP = yes;
68+ } // optionalAttrs (stdenv.hostPlatform.isx86) {
69+ INTEL_IDLE = yes;
7270 INTEL_RAPL = whenAtLeast "5.3" module;
71+ X86_INTEL_LPSS = yes;
72+ X86_INTEL_PSTATE = yes;
7373 };
7474
7575 external-firmware = {
@@ -269,8 +269,6 @@ let
269269 DRM_GMA600 = whenOlder "5.13" yes;
270270 DRM_GMA3600 = whenOlder "5.12" yes;
271271 DRM_VMWGFX_FBCON = yes;
272− # necessary for amdgpu polaris support
273− DRM_AMD_POWERPLAY = whenBetween "4.5" "4.9" yes;
274272 # (experimental) amdgpu support for verde and newer chipsets
275273 DRM_AMDGPU_SI = yes;
276274 # (stable) amdgpu support for bonaire and newer chipsets
@@ -383,7 +381,7 @@ let
383381
384382 EXT4_FS_POSIX_ACL = yes;
385383 EXT4_FS_SECURITY = yes;
386− EXT4_ENCRYPTION = { optional = true; tristate = if (versionOlder version "4.8") then "m" else "y"; };
384+ EXT4_ENCRYPTION = option yes;
387385
388386 REISERFS_FS_XATTR = option yes;
389387 REISERFS_FS_POSIX_ACL = option yes;
@@ -461,7 +459,7 @@ let
461459 # https://googleprojectzero.blogspot.com/2019/11/bad-binder-android-in-wild-exploit.html
462460 DEBUG_LIST = yes;
463461 # Detect writes to read-only module pages
464− DEBUG_SET_MODULE_RONX = { optional = true; tristate = whenOlder "4.11" "y"; };
462+ DEBUG_SET_MODULE_RONX = whenOlder "4.11" (option yes);
465463 RANDOMIZE_BASE = option yes;
466464 STRICT_DEVMEM = mkDefault yes; # Filter access to /dev/mem
467465 IO_STRICT_DEVMEM = mkDefault yes;
@@ -561,8 +559,8 @@ let
561559 PARAVIRT_SPINLOCKS = option yes;
562560
563561 KVM_ASYNC_PF = yes;
564− KVM_COMPAT = { optional = true; tristate = whenBetween "4.0" "4.12" "y"; };
565− KVM_DEVICE_ASSIGNMENT = { optional = true; tristate = whenBetween "3.10" "4.12" "y"; };
562+ KVM_COMPAT = whenOlder "4.12" (option yes);
563+ KVM_DEVICE_ASSIGNMENT = whenOlder "4.12" (option yes);
566564 KVM_GENERIC_DIRTYLOG_READ_PROTECT = yes;
567565 KVM_GUEST = yes;
568566 KVM_MMIO = yes;
@@ -770,7 +768,6 @@ let
770768 AIC79XX_DEBUG_ENABLE = no;
771769 AIC7XXX_DEBUG_ENABLE = no;
772770 AIC94XX_DEBUG = no;
773− B43_PCMCIA = { optional=true; tristate = whenOlder "4.4" "y";};
774771
775772 BLK_DEV_INTEGRITY = yes;
776773
@@ -791,7 +788,9 @@ let
791788 BT_RFCOMM_TTY = option yes; # RFCOMM TTY support
792789 BT_QCA = module; # enables QCA6390 bluetooth
793790
794− CLEANCACHE = option yes;
791+ # Removed on 5.17 as it was unused
792+ # upstream: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0a4ee518185e902758191d968600399f3bc2be31
793+ CLEANCACHE = whenOlder "5.17" (option yes);
795794 CRASH_DUMP = option no;
796795
797796 DVB_DYNAMIC_MINORS = option yes; # we use udev