i386 KEXEC must depend on X86_CMPXCHG64
PATCH 1/1 i386 KEXEC must depend on X86_CMPXCHG64
This patch fixes the following compile error withCONFIG_X86_CMPXCHG64=n:
<-- snip -->
...
CC arch/i386/kernel/machine_kexec.oarch/i386/kernel/machine_kexec.c: In function 'identity_map_page':arch/i386/kernel/machine_kexec.c:78: error: implicit declaration of function 'set_64bit' make[1]: *** [arch/i386/kernel/machine_kexec.o] Error 1
<-- snip -->
arch/i386/Kconfig renamed from arch/i386/Kconfig.old +1 -1
@@ -662,7 +662,7 @@ config KEXEC bool "kexec system call (EXPERIMENTAL)" - depends on EXPERIMENTAL + depends on EXPERIMENTAL && X86_CMPXCHG64 help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot
Quoted 5 lines · Adrian Bunk
This patch fixes the following compile error with
CONFIG_X86_CMPXCHG64=n:<-- snip -->
Quoted 8 lines
...
CCarch/i386/kernel/machine_kexec.oarch/i386/kernel/machine_kexec.c: In function 'identity_map_page':arch/i386/kernel/machine_kexec.c:78: error: implicit declaration of function 'set_64bit'
make[1]: *** [arch/i386/kernel/machine_kexec.o] Error 1<-- snip -->
Good catch but wrong fix. This code works fine on a 386. Or it did last time I tried it.
This dependency only exists if 3 level page tables are configured. CONFIG_X86_PAE
The call to set_64bit is a specialized version of set_pmd. Which also uses set_64_bit. So I don't see how your kernel can even build without this.
The only way I can see this even being selected is building a kernel for a 386 or 486 and wanting pae support. Which won't work on a 386 or a 486. Making it a pointless exercise.
So I think either the pgtable-3level.h needs to fixed, or we just make CONFIG_HIGHME64G depend on CONFIG_X86_CMPXCHG64.
Eric
PATCH 1/1 i386: HIGHMEM64G must depend on X86_CMPXCHG64
Quoted 3 lines · Eric W. Biederman
...
So I think either thepgtable-3level.hneeds to fixed, or we just makeCONFIG_HIGHME64Gdepend onCONFIG_X86_CMPXCHG64.
Sounds reasonable (and sorry for the late answer).
Patch below.
Quoted 1 line
Eric
cu
Adrian
<-- snip -->
Due to the usage of set_64bit in include/asm-i386/pgtable-3level.h, HIGHMEM64G must depend on X86_CMPXCHG64.
arch/i386/Kconfig renamed from arch/i386/Kconfig.old +1 -0
@@ -442,6 +442,7 @@ config HIGHMEM64G bool "64GB" + depends on X86_CMPXCHG64 help Select this if you have a 32-bit processor and more than 4 gigabytes of physical RAM.