x86-32: use specific __vmalloc_start_set flag in __virt_addr_valid
Rather than relying on the ever-unreliable system_state, add a specific __vmalloc_start_set flag to indicate whether the vmalloc area has meaningful boundaries yet, and use that in x86-32's __phys_addr and __virt_addr_valid. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
a964e33c5d
commit
dc16ecf7fd
@@ -59,6 +59,8 @@ unsigned long highstart_pfn, highend_pfn;
|
||||
|
||||
static noinline int do_test_wp_bit(void);
|
||||
|
||||
bool __read_mostly __vmalloc_start_set = false;
|
||||
|
||||
static __init void *alloc_low_page(void)
|
||||
{
|
||||
unsigned long pfn = e820_table_end++;
|
||||
@@ -757,6 +759,8 @@ void __init initmem_init(unsigned long start_pfn,
|
||||
#ifdef CONFIG_FLATMEM
|
||||
max_mapnr = num_physpages;
|
||||
#endif
|
||||
__vmalloc_start_set = true;
|
||||
|
||||
printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
|
||||
pages_to_mb(max_low_pfn));
|
||||
|
||||
|
Reference in New Issue
Block a user