]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/prom/misc.c
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/signal.c
[linux-2.6-omap-h63xx.git] / arch / sparc64 / prom / misc.c
index f3e0c14e9eef001ba157307375555e2adf5efc57..47a877a15abd5fd39ef307d2f0bc6a6fdc4e8ba8 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/openprom.h>
 #include <asm/oplib.h>
 #include <asm/system.h>
+#include <asm/ldc.h>
 
 int prom_service_exists(const char *service_name)
 {
@@ -37,6 +38,10 @@ void prom_sun4v_guest_soft_state(void)
 /* Reset and reboot the machine with the command 'bcommand'. */
 void prom_reboot(const char *bcommand)
 {
+#ifdef CONFIG_SUN_LDOMS
+       if (ldom_domaining_enabled)
+               ldom_reboot(bcommand);
+#endif
        p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) |
                  P1275_INOUT(1, 0), bcommand);
 }
@@ -50,9 +55,6 @@ void prom_feval(const char *fstring)
                  P1275_INOUT(1, 1), fstring);
 }
 
-/* We want to do this more nicely some day. */
-extern void (*prom_palette)(int);
-
 #ifdef CONFIG_SMP
 extern void smp_capture(void);
 extern void smp_release(void);
@@ -67,9 +69,6 @@ void prom_cmdline(void)
 
        local_irq_save(flags);
 
-       if (!serial_console && prom_palette)
-               prom_palette(1);
-
 #ifdef CONFIG_SMP
        smp_capture();
 #endif
@@ -80,9 +79,6 @@ void prom_cmdline(void)
        smp_release();
 #endif
 
-       if (!serial_console && prom_palette)
-               prom_palette(0);
-
        local_irq_restore(flags);
 }
 
@@ -91,6 +87,10 @@ void prom_cmdline(void)
  */
 void prom_halt(void)
 {
+#ifdef CONFIG_SUN_LDOMS
+       if (ldom_domaining_enabled)
+               ldom_power_off();
+#endif
 again:
        p1275_cmd("exit", P1275_INOUT(0, 0));
        goto again; /* PROM is out to get me -DaveM */
@@ -98,6 +98,10 @@ again:
 
 void prom_halt_power_off(void)
 {
+#ifdef CONFIG_SUN_LDOMS
+       if (ldom_domaining_enabled)
+               ldom_power_off();
+#endif
        p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
 
        /* if nothing else helps, we just halt */
@@ -130,22 +134,6 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes)
        return 0xff;
 }
 
-/* Install Linux trap table so PROM uses that instead of its own. */
-void prom_set_trap_table(unsigned long tba)
-{
-       p1275_cmd("SUNW,set-trap-table",
-                 (P1275_ARG(0, P1275_ARG_IN_64B) |
-                  P1275_INOUT(1, 0)), tba);
-}
-
-void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa)
-{
-       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)
 {
        int node, ret;