diff options
-rw-r--r-- | arch/x86/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index b746deb9ebc6..f28c56e6bf94 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -202,7 +202,9 @@ struct ist_info ist_info; | |||
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | #else | 204 | #else |
205 | struct cpuinfo_x86 boot_cpu_data __read_mostly; | 205 | struct cpuinfo_x86 boot_cpu_data __read_mostly = { |
206 | .x86_phys_bits = MAX_PHYSMEM_BITS, | ||
207 | }; | ||
206 | EXPORT_SYMBOL(boot_cpu_data); | 208 | EXPORT_SYMBOL(boot_cpu_data); |
207 | #endif | 209 | #endif |
208 | 210 | ||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index a23ca5b5bf24..62773abdf088 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -38,8 +38,7 @@ unsigned long __phys_addr(unsigned long x) | |||
38 | } else { | 38 | } else { |
39 | VIRTUAL_BUG_ON(x < PAGE_OFFSET); | 39 | VIRTUAL_BUG_ON(x < PAGE_OFFSET); |
40 | x -= PAGE_OFFSET; | 40 | x -= PAGE_OFFSET; |
41 | VIRTUAL_BUG_ON(system_state == SYSTEM_BOOTING ? x > MAXMEM : | 41 | VIRTUAL_BUG_ON(!phys_addr_valid(x)); |
42 | !phys_addr_valid(x)); | ||
43 | } | 42 | } |
44 | return x; | 43 | return x; |
45 | } | 44 | } |
@@ -56,10 +55,8 @@ bool __virt_addr_valid(unsigned long x) | |||
56 | if (x < PAGE_OFFSET) | 55 | if (x < PAGE_OFFSET) |
57 | return false; | 56 | return false; |
58 | x -= PAGE_OFFSET; | 57 | x -= PAGE_OFFSET; |
59 | if (system_state == SYSTEM_BOOTING ? | 58 | if (!phys_addr_valid(x)) |
60 | x > MAXMEM : !phys_addr_valid(x)) { | ||
61 | return false; | 59 | return false; |
62 | } | ||
63 | } | 60 | } |
64 | 61 | ||
65 | return pfn_valid(x >> PAGE_SHIFT); | 62 | return pfn_valid(x >> PAGE_SHIFT); |