Signed-off-by: Michael Ellerman <mich...@ellerman.id.au>
---
 arch/powerpc/xmon/xmon.c |   48 +++++++++++++++++++++++-----------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 168c5e7..65c3d22 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -665,6 +665,30 @@ void end_bus_error_jump(void)
        catch_memory_errors = 0;
 }
 
+static int fault_type;
+static int fault_except;
+static char *fault_chars[] = { "--", "**", "##" };
+
+static int handle_fault(struct pt_regs *regs)
+{
+       fault_except = TRAP(regs);
+       switch (TRAP(regs)) {
+       case 0x200:
+               fault_type = 0;
+               break;
+       case 0x300:
+       case 0x380:
+               fault_type = 1;
+               break;
+       default:
+               fault_type = 2;
+       }
+
+       longjmp(bus_error_jmp, 1);
+
+       return 0;
+}
+
 static int xmon_fault_handler(struct pt_regs *regs)
 {
        struct bpt *bp;
@@ -1755,30 +1779,6 @@ mwrite(unsigned long adrs, void *buf, int size)
        return n;
 }
 
-static int fault_type;
-static int fault_except;
-static char *fault_chars[] = { "--", "**", "##" };
-
-static int handle_fault(struct pt_regs *regs)
-{
-       fault_except = TRAP(regs);
-       switch (TRAP(regs)) {
-       case 0x200:
-               fault_type = 0;
-               break;
-       case 0x300:
-       case 0x380:
-               fault_type = 1;
-               break;
-       default:
-               fault_type = 2;
-       }
-
-       longjmp(bus_error_jmp, 1);
-
-       return 0;
-}
-
 #define SWAP(a, b, t)  ((t) = (a), (a) = (b), (b) = (t))
 
 static void
-- 
1.7.9.5

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to