vserver 1.9.3
[linux-2.6.git] / arch / ppc64 / xmon / xmon.c
index 97b1509..6ef0b1e 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/paca.h>
 #include <asm/ppcdebug.h>
 #include <asm/cputable.h>
+#include <asm/rtas.h>
 
 #include "nonstdio.h"
 #include "privinst.h"
@@ -44,9 +45,6 @@ static int xmon_owner;
 static int xmon_gate;
 #endif /* CONFIG_SMP */
 
-#define TRAP(regs)     ((regs)->trap)
-#define FULL_REGS(regs)        1
-
 static unsigned long in_xmon = 0;
 
 static unsigned long adrs;
@@ -254,30 +252,28 @@ extern inline void sync(void)
 
 static inline void disable_surveillance(void)
 {
-#ifndef CONFIG_PPC_ISERIES
+#ifdef CONFIG_PPC_PSERIES
        /* Since this can't be a module, args should end up below 4GB. */
        static struct rtas_args args;
 
-       if (systemcfg->platform & PLATFORM_PSERIES) {
-               /*
-                * At this point we have got all the cpus we can into
-                * xmon, so there is hopefully no other cpu calling RTAS
-                * at the moment, even though we don't take rtas.lock.
-                * If we did try to take rtas.lock there would be a
-                * real possibility of deadlock.
-                */
-               args.token = rtas_token("set-indicator");
-               if (args.token == RTAS_UNKNOWN_SERVICE)
-                       return;
-               args.nargs = 3;
-               args.nret = 1;
-               args.rets = &args.args[3];
-               args.args[0] = SURVEILLANCE_TOKEN;
-               args.args[1] = 0;
-               args.args[2] = 0;
-               enter_rtas(__pa(&args));
-       }
-#endif
+       /*
+        * At this point we have got all the cpus we can into
+        * xmon, so there is hopefully no other cpu calling RTAS
+        * at the moment, even though we don't take rtas.lock.
+        * If we did try to take rtas.lock there would be a
+        * real possibility of deadlock.
+        */
+       args.token = rtas_token("set-indicator");
+       if (args.token == RTAS_UNKNOWN_SERVICE)
+               return;
+       args.nargs = 3;
+       args.nret = 1;
+       args.rets = &args.args[3];
+       args.args[0] = SURVEILLANCE_TOKEN;
+       args.args[1] = 0;
+       args.args[2] = 0;
+       enter_rtas(__pa(&args));
+#endif /* CONFIG_PPC_PSERIES */
 }
 
 #ifdef CONFIG_SMP
@@ -1614,7 +1610,7 @@ super_regs()
                ptrPaca = get_paca();
     
                printf("  Local Processor Control Area (LpPaca): \n");
-               ptrLpPaca = ptrPaca->xLpPacaPtr;
+               ptrLpPaca = ptrPaca->lppaca_ptr;
                printf("    Saved Srr0=%.16lx  Saved Srr1=%.16lx \n",
                       ptrLpPaca->xSavedSrr0, ptrLpPaca->xSavedSrr1);
                printf("    Saved Gpr3=%.16lx  Saved Gpr4=%.16lx \n",
@@ -1622,7 +1618,7 @@ super_regs()
                printf("    Saved Gpr5=%.16lx \n", ptrLpPaca->xSavedGpr5);
     
                printf("  Local Processor Register Save Area (LpRegSave): \n");
-               ptrLpRegSave = ptrPaca->xLpRegSavePtr;
+               ptrLpRegSave = ptrPaca->reg_save_ptr;
                printf("    Saved Sprg0=%.16lx  Saved Sprg1=%.16lx \n",
                       ptrLpRegSave->xSPRG0, ptrLpRegSave->xSPRG0);
                printf("    Saved Sprg2=%.16lx  Saved Sprg3=%.16lx \n",
@@ -2061,7 +2057,7 @@ ppc_inst_dump(unsigned long adr, long count, int praddr)
 {
        int nr, dotted;
        unsigned long first_adr;
-       unsigned long inst, last_inst;
+       unsigned long inst, last_inst = 0;
        unsigned char val[4];
 
        dotted = 0;
@@ -2524,7 +2520,7 @@ static void dump_slb(void)
 static void dump_stab(void)
 {
        int i;
-       unsigned long *tmp = (unsigned long *)get_paca()->xStab_data.virt;
+       unsigned long *tmp = (unsigned long *)get_paca()->stab_addr;
 
        printf("Segment table contents of cpu %x\n", smp_processor_id());