forked from Minki/linux
x86: rename find_max_pfn() to propagate_e820_map()
this function doesnt just 'find' the max_pfn - it also has other side-effects such as registering sparse memory maps. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
d8bb6f4c16
commit
fa5c463941
@ -475,7 +475,7 @@ int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
|
|||||||
/*
|
/*
|
||||||
* Find the highest page frame number we have available
|
* Find the highest page frame number we have available
|
||||||
*/
|
*/
|
||||||
void __init find_max_pfn(void)
|
void __init propagate_e820_map(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -704,7 +704,7 @@ static int __init parse_memmap(char *arg)
|
|||||||
* size before original memory map is
|
* size before original memory map is
|
||||||
* reset.
|
* reset.
|
||||||
*/
|
*/
|
||||||
find_max_pfn();
|
propagate_e820_map();
|
||||||
saved_max_pfn = max_pfn;
|
saved_max_pfn = max_pfn;
|
||||||
#endif
|
#endif
|
||||||
e820.nr_map = 0;
|
e820.nr_map = 0;
|
||||||
|
@ -812,10 +812,10 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
efi_init();
|
efi_init();
|
||||||
|
|
||||||
/* update e820 for memory not covered by WB MTRRs */
|
/* update e820 for memory not covered by WB MTRRs */
|
||||||
find_max_pfn();
|
propagate_e820_map();
|
||||||
mtrr_bp_init();
|
mtrr_bp_init();
|
||||||
if (mtrr_trim_uncached_memory(max_pfn))
|
if (mtrr_trim_uncached_memory(max_pfn))
|
||||||
find_max_pfn();
|
propagate_e820_map();
|
||||||
|
|
||||||
max_low_pfn = setup_memory();
|
max_low_pfn = setup_memory();
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ int __init get_memcfg_numa_flat(void)
|
|||||||
printk("NUMA - single node, flat memory mode\n");
|
printk("NUMA - single node, flat memory mode\n");
|
||||||
|
|
||||||
/* Run the memory configuration and find the top of memory. */
|
/* Run the memory configuration and find the top of memory. */
|
||||||
find_max_pfn();
|
propagate_e820_map();
|
||||||
node_start_pfn[0] = 0;
|
node_start_pfn[0] = 0;
|
||||||
node_end_pfn[0] = max_pfn;
|
node_end_pfn[0] = max_pfn;
|
||||||
memory_present(0, 0, max_pfn);
|
memory_present(0, 0, max_pfn);
|
||||||
@ -134,7 +134,7 @@ int __init get_memcfg_numa_flat(void)
|
|||||||
/*
|
/*
|
||||||
* Find the highest page frame number we have available for the node
|
* Find the highest page frame number we have available for the node
|
||||||
*/
|
*/
|
||||||
static void __init find_max_pfn_node(int nid)
|
static void __init propagate_e820_map_node(int nid)
|
||||||
{
|
{
|
||||||
if (node_end_pfn[nid] > max_pfn)
|
if (node_end_pfn[nid] > max_pfn)
|
||||||
node_end_pfn[nid] = max_pfn;
|
node_end_pfn[nid] = max_pfn;
|
||||||
@ -379,7 +379,7 @@ unsigned long __init setup_memory(void)
|
|||||||
printk("High memory starts at vaddr %08lx\n",
|
printk("High memory starts at vaddr %08lx\n",
|
||||||
(ulong) pfn_to_kaddr(highstart_pfn));
|
(ulong) pfn_to_kaddr(highstart_pfn));
|
||||||
for_each_online_node(nid)
|
for_each_online_node(nid)
|
||||||
find_max_pfn_node(nid);
|
propagate_e820_map_node(nid);
|
||||||
|
|
||||||
memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
|
memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
|
||||||
NODE_DATA(0)->bdata = &node0_bdata;
|
NODE_DATA(0)->bdata = &node0_bdata;
|
||||||
|
@ -24,7 +24,7 @@ extern void update_e820(void);
|
|||||||
extern int e820_all_mapped(unsigned long start, unsigned long end,
|
extern int e820_all_mapped(unsigned long start, unsigned long end,
|
||||||
unsigned type);
|
unsigned type);
|
||||||
extern int e820_any_mapped(u64 start, u64 end, unsigned type);
|
extern int e820_any_mapped(u64 start, u64 end, unsigned type);
|
||||||
extern void find_max_pfn(void);
|
extern void propagate_e820_map(void);
|
||||||
extern void register_bootmem_low_pages(unsigned long max_low_pfn);
|
extern void register_bootmem_low_pages(unsigned long max_low_pfn);
|
||||||
extern void add_memory_region(unsigned long long start,
|
extern void add_memory_region(unsigned long long start,
|
||||||
unsigned long long size, int type);
|
unsigned long long size, int type);
|
||||||
|
Loading…
Reference in New Issue
Block a user