Pull bugzilla-5737 into release branch
[powerpc.git] / arch / sparc64 / prom / misc.c
index 9b895fa..577bde8 100644 (file)
@@ -68,19 +68,11 @@ void prom_cmdline(void)
        local_irq_restore(flags);
 }
 
-#ifdef CONFIG_SMP
-extern void smp_promstop_others(void);
-#endif
-
 /* Drop into the prom, but completely terminate the program.
  * No chance of continuing.
  */
 void prom_halt(void)
 {
-#ifdef CONFIG_SMP
-       smp_promstop_others();
-       udelay(8000);
-#endif
 again:
        p1275_cmd("exit", P1275_INOUT(0, 0));
        goto again; /* PROM is out to get me -DaveM */
@@ -88,10 +80,6 @@ again:
 
 void prom_halt_power_off(void)
 {
-#ifdef CONFIG_SMP
-       smp_promstop_others();
-       udelay(8000);
-#endif
        p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
 
        /* if nothing else helps, we just halt */
@@ -124,28 +112,20 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes)
        return 0xff;
 }
 
-/* Get the major prom version number. */
-int prom_version(void)
-{
-       return PROM_P1275;
-}
-
-/* Get the prom plugin-revision. */
-int prom_getrev(void)
-{
-       return prom_rev;
-}
-
-/* Get the prom firmware print revision. */
-int prom_getprev(void)
+/* Install Linux trap table so PROM uses that instead of its own. */
+void prom_set_trap_table(unsigned long tba)
 {
-       return prom_prev;
+       p1275_cmd("SUNW,set-trap-table",
+                 (P1275_ARG(0, P1275_ARG_IN_64B) |
+                  P1275_INOUT(1, 0)), tba);
 }
 
-/* Install Linux trap table so PROM uses that instead of its own. */
-void prom_set_trap_table(unsigned long tba)
+void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa)
 {
-       p1275_cmd("SUNW,set-trap-table", P1275_INOUT(1, 0), tba);
+       p1275_cmd("SUNW,set-trap-table",
+                 (P1275_ARG(0, P1275_ARG_IN_64B) |
+                  P1275_ARG(1, P1275_ARG_IN_64B) |
+                  P1275_INOUT(2, 0)), tba, mmfsa);
 }
 
 int prom_get_mmu_ihandle(void)
@@ -315,9 +295,21 @@ int prom_wakeupsystem(void)
 }
 
 #ifdef CONFIG_SMP
-void prom_startcpu(int cpunode, unsigned long pc, unsigned long o0)
+void prom_startcpu(int cpunode, unsigned long pc, unsigned long arg)
+{
+       p1275_cmd("SUNW,start-cpu", P1275_INOUT(3, 0), cpunode, pc, arg);
+}
+
+void prom_startcpu_cpuid(int cpuid, unsigned long pc, unsigned long arg)
+{
+       p1275_cmd("SUNW,start-cpu-by-cpuid", P1275_INOUT(3, 0),
+                 cpuid, pc, arg);
+}
+
+void prom_stopcpu_cpuid(int cpuid)
 {
-       p1275_cmd("SUNW,start-cpu", P1275_INOUT(3, 0), cpunode, pc, o0);
+       p1275_cmd("SUNW,stop-cpu-by-cpuid", P1275_INOUT(1, 0),
+                 cpuid);
 }
 
 void prom_stopself(void)