read_spr() and write_spr() were both forgetting to clear catch_memory_errors,
that's fixed now that they use start/end_bus_error_jump().

Also drop the setting of n in both routines, it's never used.

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

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index ddae5cf..a8188f0 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1599,16 +1599,9 @@ read_spr(int n)
        store_inst(instrs);
        store_inst(instrs+1);
 
-       if (setjmp(bus_error_jmp) == 0) {
-               catch_memory_errors = 1;
-               sync();
-
+       if (start_bus_error_jump() == 0) {
                ret = code();
-
-               sync();
-               /* wait a little while to see if we get a machine check */
-               __delay(200);
-               n = size;
+               end_bus_error_jump();
        }
 
        return ret;
@@ -1635,16 +1628,9 @@ write_spr(int n, unsigned long val)
        store_inst(instrs);
        store_inst(instrs+1);
 
-       if (setjmp(bus_error_jmp) == 0) {
-               catch_memory_errors = 1;
-               sync();
-
+       if (start_bus_error_jump() == 0) {
                code(val);
-
-               sync();
-               /* wait a little while to see if we get a machine check */
-               __delay(200);
-               n = size;
+               end_bus_error_jump();
        }
 }
 
-- 
1.7.9.5

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

Reply via email to