sh: establish PMB mappings for NUMA nodes.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 3 Mar 2010 04:16:31 +0000 (13:16 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 3 Mar 2010 04:16:31 +0000 (13:16 +0900)
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>
arch/sh/kernel/setup.c
arch/sh/mm/numa.c

index 3459e70eed722c51859e01ee53fcc3bbab46dcdd..8870d6ba64bfaf3fac5b8d003a050475ef7dd25e 100644 (file)
@@ -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();
@@ -452,7 +452,6 @@ void __init setup_arch(char **cmdline_p)
        conswitchp = &dummy_con;
 #endif
        paging_init();
-       pmb_init();
 
        ioremap_fixed_init();
 
index 422e9272187860b24842d938a505e6585056fed9..961b34085e3b7218cd323c4545e2da52c0dc69c4 100644 (file)
@@ -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);