Skip to content

Commit

Permalink
sh: establish PMB mappings for NUMA nodes.
Browse files Browse the repository at this point in the history
In the case of NUMA emulation when in range PPNs are being used for
secondary nodes, we need to make sure that the PMB has a mapping for it
before setting up the pgdat. This prevents the MMU from resetting.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Mar 3, 2010
1 parent a1042aa commit 09e1172
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void __init setup_arch(char **cmdline_p)

nodes_clear(node_online_map);

/* Setup bootmem with available RAM */
pmb_init();
lmb_init();
setup_memory();
sparse_init();
Expand All @@ -452,7 +452,6 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &dummy_con;
#endif
paging_init();
pmb_init();

ioremap_fixed_init();

Expand Down
3 changes: 3 additions & 0 deletions arch/sh/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
start_pfn = start >> PAGE_SHIFT;
end_pfn = end >> PAGE_SHIFT;

pmb_bolt_mapping((unsigned long)__va(start), start, end - start,
PAGE_KERNEL);

lmb_add(start, end - start);

__add_active_range(nid, start_pfn, end_pfn);
Expand Down

0 comments on commit 09e1172

Please sign in to comment.