From e80537b82bffbf5acefa92eeb7d367ccf69a5db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Wed, 24 Dec 2025 02:02:14 +0100 Subject: [PATCH] linux/common-config: choose between HIGHMEM4G and HIGHMEM64G The documentation[1] referred in the commit 39f89dc647b0 ("linux/common-config: fix crash kernel on i686") applies to kernel versions 6.15 and newer, where HIGHMEM64G has been removed by the upstream commit bbeb69ce3013[2]. Thus, while for kernels older than both options are correct with regards to kdump functions, only one can be selected because the options are part of "choice". [1] https://github.com/torvalds/linux/blob/ee94b00c1a648530333d9734200be7a45e6e00cd/Documentation/admin-guide/kdump/kdump.rst#dump-capture-kernel-config-options-arch-dependent-i386-and-x86_64 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbeb69ce301323e84f1677484eb8e4cd8fb1f9f8 Fixes: 39f89dc647b0 ("linux/common-config: fix crash kernel on i686") --- pkgs/os-specific/linux/kernel/common-config.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 28e640404ba1..6c0546285fd0 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -111,7 +111,9 @@ let # Enable crashkernel support PROC_VMCORE = yes; - HIGHMEM4G = lib.mkIf (stdenv.hostPlatform.isx86 && stdenv.hostPlatform.is32bit) yes; + HIGHMEM4G = lib.mkIf (stdenv.hostPlatform.isx86 && stdenv.hostPlatform.is32bit) ( + whenAtLeast "6.15" yes + ); # Track memory leaks and performance issues related to allocations. MEM_ALLOC_PROFILING = whenAtLeast "6.10" yes; @@ -954,7 +956,7 @@ let KSM = yes; VIRT_DRIVERS = yes; # We need 64 GB (PAE) support for Xen guest support - HIGHMEM64G = { + HIGHMEM64G = whenOlder "6.15" { optional = true; tristate = lib.mkIf (!stdenv.hostPlatform.is64bit) "y"; };