]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/mips/sgi-ip27/ip27-init.c
Merge tag 'mips_5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux.git] / arch / mips / sgi-ip27 / ip27-init.c
index d160fb219d6d5bef2ec0848dae03101d968f2699..f597e1ee2df7a1bf89ad4eeca7d870bf2482fc53 100644 (file)
 #include <linux/mm.h>
 #include <linux/export.h>
 #include <linux/cpumask.h>
+#include <asm/bootinfo.h>
 #include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
+#include <asm/sgialib.h>
 #include <asm/time.h>
 #include <asm/sn/types.h>
 #include <asm/sn/sn0/addrs.h>
@@ -40,7 +42,7 @@
 
 #define CPU_NONE               (cpuid_t)-1
 
-static DECLARE_BITMAP(hub_init_mask, MAX_COMPACT_NODES);
+static DECLARE_BITMAP(hub_init_mask, MAX_NUMNODES);
 nasid_t master_nasid = INVALID_NASID;
 
 struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
@@ -62,23 +64,14 @@ static void per_hub_init(nasid_t nasid)
 
        hub_rtc_init(nasid);
 
-#ifdef CONFIG_REPLICATE_EXHANDLERS
-       /*
-        * If this is not a headless node initialization,
-        * copy over the caliased exception handlers.
-        */
-       if (get_nasid() == nasid) {
-               extern char except_vec2_generic, except_vec3_generic;
-               extern void build_tlb_refill_handler(void);
-
-               memcpy((void *)(CKSEG0 + 0x100), &except_vec2_generic, 0x80);
-               memcpy((void *)(CKSEG0 + 0x180), &except_vec3_generic, 0x80);
-               build_tlb_refill_handler();
-               memcpy((void *)(CKSEG0 + 0x100), (void *) CKSEG0, 0x80);
-               memcpy((void *)(CKSEG0 + 0x180), &except_vec3_generic, 0x100);
+       if (nasid) {
+               /* copy exception handlers from first node to current node */
+               memcpy((void *)NODE_OFFSET_TO_K0(nasid, 0),
+                      (void *)CKSEG0, 0x200);
                __flush_cache_all();
+               /* switch to node local exception handlers */
+               REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_8K);
        }
-#endif
 }
 
 void per_cpu_init(void)
@@ -160,3 +153,15 @@ void __init plat_mem_setup(void)
        ioport_resource.end = ~0UL;
        set_io_port_base(IO_BASE);
 }
+
+const char *get_system_type(void)
+{
+       return "SGI Origin";
+}
+
+void __init prom_init(void)
+{
+       prom_init_cmdline(fw_arg0, (LONG *)fw_arg1);
+       prom_meminit();
+}
+