Skip to content

Commit

Permalink
powerpc/mm: Use common paging_init() for NUMA
Browse files Browse the repository at this point in the history
Commit 1c98025 "powerpc: Dynamic DMA
zone limits" updated how zones are created in paging_init(), but missed
the NUMA version of paging_init().  This was noticed via a linker
error, since dma_pfn_limit_to_zone() was, like the non-NUMA
paging_init(), limited by #ifndef CONFIG_NEED_MULTIPLE_NODES.

It turns out that the NUMA paging_init() was not actually doing
anything different from the standard paging_init(), other than a couple
debug prints, a couple 32-bit-only ifdef sections, and a call to
mark_nonram_nosave().  It's not clear whether mark_nonram_nosave() is
inherently wrong to do for NUMA, or just not useful on targets that
have NUMA, but for now I'm preserving the existing behavior.

Fixes: 1c98025 "powerpc: Dynamic DMA zone limits"
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Scott Wood <scottwood@freescale.com>
  • Loading branch information
Scott Wood committed Sep 19, 2014
1 parent 94105a7 commit 6db35ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 6 additions & 1 deletion arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ static int __init mark_nonram_nosave(void)
}
return 0;
}
#else /* CONFIG_NEED_MULTIPLE_NODES */
static int __init mark_nonram_nosave(void)
{
return 0;
}
#endif

static bool zone_limits_final;

Expand Down Expand Up @@ -351,7 +357,6 @@ void __init paging_init(void)

mark_nonram_nosave();
}
#endif /* ! CONFIG_NEED_MULTIPLE_NODES */

static void __init register_page_bootmem_info(void)
{
Expand Down
8 changes: 0 additions & 8 deletions arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,14 +1126,6 @@ void __init do_init_bootmem(void)
(void *)(unsigned long)boot_cpuid);
}

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

static int __init early_numa(char *p)
{
if (!p)
Expand Down

0 comments on commit 6db35ad

Please sign in to comment.