[RFC][PATCH 14/34] x86/cpu: Remove default physical address space settings

From: Dave Hansen
Date: Thu Feb 22 2024 - 13:46:08 EST



From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

At this point, the secondary CPUs' c->x86_phys_bits should be unused. The boot
CPU values were also established long before reaching here. This can only
serve to sow chaos. Remove the twiddling.

Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
---

b/arch/x86/kernel/cpu/common.c | 2 --
1 file changed, 2 deletions(-)

diff -puN arch/x86/kernel/cpu/common.c~no-default-bit-setting-phys arch/x86/kernel/cpu/common.c
--- a/arch/x86/kernel/cpu/common.c~no-default-bit-setting-phys 2024-02-22 10:08:55.256720151 -0800
+++ b/arch/x86/kernel/cpu/common.c 2024-02-22 10:08:55.260720308 -0800
@@ -1827,12 +1827,10 @@ static void identify_cpu(struct cpuinfo_
c->topo.l2c_id = BAD_APICID;
#ifdef CONFIG_X86_64
c->x86_clflush_size = 64;
- c->x86_phys_bits = 36;
c->x86_virt_bits = 48;
#else
c->cpuid_level = -1; /* CPUID not detected */
c->x86_clflush_size = 32;
- c->x86_phys_bits = 32;
c->x86_virt_bits = 32;
#endif
c->x86_cache_alignment = x86_clflush_size();
_