linux/common-config: choose between HIGHMEM4G and HIGHMEM64G

The documentation[1] referred in the commit 39f89dc647
("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: 39f89dc647 ("linux/common-config: fix crash kernel on i686")
This commit is contained in:
Łukasz Stelmach
2025-12-24 11:42:18 +01:00
parent c7393d4ea4
commit e80537b82b
@@ -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";
};