Skip to content

Commit 88a2b4e

Browse files
arndbbp3tk0v
authored andcommitted
x86/Kconfig: Rework CONFIG_X86_PAE dependency
While looking at a Xen Kconfig dependency issue, I tried to understand the exact dependencies for CONFIG_X86_PAE, which is selected by CONFIG_HIGHMEM64G but can also be enabled manually. Apparently the dependencies for CONFIG_HIGHMEM64G are strictly about CPUs that do support PAE, but the actual feature can be incorrectly enabled on older CPUs as well. The CONFIG_X86_CMPXCHG64 dependencies on the other hand include X86_PAE because cmpxchg8b is requried for PAE to work. Rework this for readability and correctness, using a positive list of CPUs that support PAE in a new X86_HAVE_PAE symbol that can serve as a dependency for both X86_PAE and HIGHMEM64G as well as simplify the X86_CMPXCHG64 dependency list. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20231204084722.3789473-2-arnd@kernel.org
1 parent 5225952 commit 88a2b4e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

arch/x86/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ config HIGHMEM4G
14151415

14161416
config HIGHMEM64G
14171417
bool "64GB"
1418-
depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !MWINCHIP3D && !MK6
1418+
depends on X86_HAVE_PAE
14191419
select X86_PAE
14201420
help
14211421
Select this if you have a 32-bit processor and more than 4
@@ -1472,7 +1472,7 @@ config HIGHMEM
14721472

14731473
config X86_PAE
14741474
bool "PAE (Physical Address Extension) Support"
1475-
depends on X86_32 && !HIGHMEM4G
1475+
depends on X86_32 && X86_HAVE_PAE
14761476
select PHYS_ADDR_T_64BIT
14771477
select SWIOTLB
14781478
help

arch/x86/Kconfig.cpu

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,13 @@ config X86_TSC
362362
def_bool y
363363
depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) || X86_64
364364

365+
config X86_HAVE_PAE
366+
def_bool y
367+
depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC7 || MCORE2 || MATOM || X86_64
368+
365369
config X86_CMPXCHG64
366370
def_bool y
367-
depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8
371+
depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7
368372

369373
# this should be set for all -march=.. options where the compiler
370374
# generates cmov.

0 commit comments

Comments
 (0)