Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39280
b: refs/heads/master
c: 6391af1
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Oct 11, 2006
1 parent 51a8bb3 commit 9ec58eb
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e0fadfcf62e252d2b14de0e0927eb2830c0c28c
refs/heads/master: 6391af174ad75f72e92043c1dd8302660a2fec58
13 changes: 6 additions & 7 deletions trunk/arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,16 +1083,15 @@ static unsigned long __init setup_memory(void)

void __init zone_sizes_init(void)
{
unsigned long max_zone_pfns[MAX_NR_ZONES];
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] =
virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
#ifdef CONFIG_HIGHMEM
unsigned long max_zone_pfns[MAX_NR_ZONES] = {
virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
max_low_pfn,
highend_pfn};
max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
add_active_range(0, 0, highend_pfn);
#else
unsigned long max_zone_pfns[MAX_NR_ZONES] = {
virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
max_low_pfn};
add_active_range(0, 0, max_low_pfn);
#endif

Expand Down
11 changes: 6 additions & 5 deletions trunk/arch/i386/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,12 @@ void __init numa_kva_reserve(void)
void __init zone_sizes_init(void)
{
int nid;
unsigned long max_zone_pfns[MAX_NR_ZONES] = {
virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
max_low_pfn,
highend_pfn
};
unsigned long max_zone_pfns[MAX_NR_ZONES];
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] =
virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;

/* If SRAT has not registered memory, register it now */
if (find_max_pfn_with_active_regions() == 0) {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ia64/mm/contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ paging_init (void)
efi_memmap_walk(count_pages, &num_physpages);

max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] = max_dma;
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ia64/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ void __init paging_init(void)
max_pfn = mem_data[node].max_pfn;
}

memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] = max_dma;
max_zone_pfns[ZONE_NORMAL] = max_pfn;
free_area_init_nodes(max_zone_pfns);
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,12 @@ void __init paging_init(void)
top_of_ram, total_ram);
printk(KERN_DEBUG "Memory hole size: %ldMB\n",
(top_of_ram - total_ram) >> 20);
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
#ifdef CONFIG_HIGHMEM
max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT;
max_zone_pfns[1] = top_of_ram >> PAGE_SHIFT;
max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
max_zone_pfns[ZONE_HIGHMEM] = top_of_ram >> PAGE_SHIFT;
#else
max_zone_pfns[0] = top_of_ram >> PAGE_SHIFT;
max_zone_pfns[ZONE_DMA] = top_of_ram >> PAGE_SHIFT;
#endif
free_area_init_nodes(max_zone_pfns);
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ void __init do_init_bootmem(void)

void __init paging_init(void)
{
unsigned long max_zone_pfns[MAX_NR_ZONES] = {
lmb_end_of_DRAM() >> PAGE_SHIFT
};
unsigned long max_zone_pfns[MAX_NR_ZONES];
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] = lmb_end_of_DRAM() >> PAGE_SHIFT;
free_area_init_nodes(max_zone_pfns);
}

Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/ppc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,12 @@ void __init paging_init(void)
end_pfn = start_pfn + (total_memory >> PAGE_SHIFT);
add_active_range(0, start_pfn, end_pfn);

memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
#ifdef CONFIG_HIGHMEM
max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT;
max_zone_pfns[1] = total_memory >> PAGE_SHIFT;
max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
max_zone_pfns[ZONE_HIGHMEM] = total_memory >> PAGE_SHIFT;
#else
max_zone_pfns[0] = total_memory >> PAGE_SHIFT;
max_zone_pfns[ZONE_DMA] = total_memory >> PAGE_SHIFT;
#endif /* CONFIG_HIGHMEM */
free_area_init_nodes(max_zone_pfns);
}
Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/x86_64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,12 @@ void __cpuinit zap_low_mappings(int cpu)
#ifndef CONFIG_NUMA
void __init paging_init(void)
{
unsigned long max_zone_pfns[MAX_NR_ZONES] = {MAX_DMA_PFN,
MAX_DMA32_PFN,
end_pfn};
unsigned long max_zone_pfns[MAX_NR_ZONES];
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
max_zone_pfns[ZONE_NORMAL] = end_pfn;

memory_present(0, 0, end_pfn);
sparse_init();
free_area_init_nodes(max_zone_pfns);
Expand Down
8 changes: 5 additions & 3 deletions trunk/arch/x86_64/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,11 @@ static void __init arch_sparse_init(void)
void __init paging_init(void)
{
int i;
unsigned long max_zone_pfns[MAX_NR_ZONES] = { MAX_DMA_PFN,
MAX_DMA32_PFN,
end_pfn};
unsigned long max_zone_pfns[MAX_NR_ZONES];
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
max_zone_pfns[ZONE_NORMAL] = end_pfn;

arch_sparse_init();

Expand Down

0 comments on commit 9ec58eb

Please sign in to comment.