Merge pull request #165547 from LibreCybernetics/kernel-options

Kernel options cleanup

authored by

Kevin Cox and committed by
GitHub
974af506 2958a883

+12 -13
+12 -13
pkgs/os-specific/linux/kernel/common-config.nix
··· 60 60 }; 61 61 62 62 power-management = { 63 - PM_ADVANCED_DEBUG = yes; 64 - X86_INTEL_LPSS = yes; 65 - X86_INTEL_PSTATE = yes; 66 - INTEL_IDLE = yes; 67 63 CPU_FREQ_DEFAULT_GOV_PERFORMANCE = yes; 68 64 CPU_FREQ_GOV_SCHEDUTIL = yes; 65 + PM_ADVANCED_DEBUG = yes; 69 66 PM_WAKELOCKS = yes; 70 - # Power-capping framework and support for INTEL RAPL 71 67 POWERCAP = yes; 68 + } // optionalAttrs (stdenv.hostPlatform.isx86) { 69 + INTEL_IDLE = yes; 72 70 INTEL_RAPL = whenAtLeast "5.3" module; 71 + X86_INTEL_LPSS = yes; 72 + X86_INTEL_PSTATE = yes; 73 73 }; 74 74 75 75 external-firmware = { ··· 269 269 DRM_GMA600 = whenOlder "5.13" yes; 270 270 DRM_GMA3600 = whenOlder "5.12" yes; 271 271 DRM_VMWGFX_FBCON = yes; 272 - # necessary for amdgpu polaris support 273 - DRM_AMD_POWERPLAY = whenBetween "4.5" "4.9" yes; 274 272 # (experimental) amdgpu support for verde and newer chipsets 275 273 DRM_AMDGPU_SI = yes; 276 274 # (stable) amdgpu support for bonaire and newer chipsets ··· 383 381 384 382 EXT4_FS_POSIX_ACL = yes; 385 383 EXT4_FS_SECURITY = yes; 386 - EXT4_ENCRYPTION = { optional = true; tristate = if (versionOlder version "4.8") then "m" else "y"; }; 384 + EXT4_ENCRYPTION = option yes; 387 385 388 386 REISERFS_FS_XATTR = option yes; 389 387 REISERFS_FS_POSIX_ACL = option yes; ··· 461 459 # https://googleprojectzero.blogspot.com/2019/11/bad-binder-android-in-wild-exploit.html 462 460 DEBUG_LIST = yes; 463 461 # 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); 465 463 RANDOMIZE_BASE = option yes; 466 464 STRICT_DEVMEM = mkDefault yes; # Filter access to /dev/mem 467 465 IO_STRICT_DEVMEM = mkDefault yes; ··· 561 559 PARAVIRT_SPINLOCKS = option yes; 562 560 563 561 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); 566 564 KVM_GENERIC_DIRTYLOG_READ_PROTECT = yes; 567 565 KVM_GUEST = yes; 568 566 KVM_MMIO = yes; ··· 770 768 AIC79XX_DEBUG_ENABLE = no; 771 769 AIC7XXX_DEBUG_ENABLE = no; 772 770 AIC94XX_DEBUG = no; 773 - B43_PCMCIA = { optional=true; tristate = whenOlder "4.4" "y";}; 774 771 775 772 BLK_DEV_INTEGRITY = yes; 776 773 ··· 791 788 BT_RFCOMM_TTY = option yes; # RFCOMM TTY support 792 789 BT_QCA = module; # enables QCA6390 bluetooth 793 790 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); 795 794 CRASH_DUMP = option no; 796 795 797 796 DVB_DYNAMIC_MINORS = option yes; # we use udev