powerpc: Use MSR_64BIT in places
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 7 Apr 2011 21:56:03 +0000 (21:56 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 27 Apr 2011 04:18:44 +0000 (14:18 +1000)
Use the new MSR_64BIT in a few places. Some of these are already ifdef'ed
for BOOKE vs BOOKS, but it's still clearer, MSR_SF does not immediately
parse as "MSR bit for 64bit".

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/signal_64.c
arch/powerpc/kernel/traps.c
arch/powerpc/xmon/xmon.c

index 6d17c37f22a144dc542a383b5e02cce076e5d700..73d6e9afcdf1466a3b407147fb9c96148f514199 100644 (file)
@@ -655,7 +655,7 @@ _GLOBAL(enable_64b_mode)
        oris    r11,r11,0x8000          /* CM bit set, we'll set ICM later */
        mtmsr   r11
 #else /* CONFIG_PPC_BOOK3E */
-       li      r12,(MSR_SF | MSR_ISF)@highest
+       li      r12,(MSR_64BIT | MSR_ISF)@highest
        sldi    r12,r12,48
        or      r11,r11,r12
        mtmsrd  r11
index 27c4a4584f805b83fbcf09c5478e7ec9fa7f5e7c..da989fff19ccb4eeb5663785bfb99fa73754d28e 100644 (file)
@@ -381,7 +381,7 @@ badframe:
               regs, uc, &uc->uc_mcontext);
 #endif
        if (show_unhandled_signals && printk_ratelimit())
-               printk(regs->msr & MSR_SF ? fmt64 : fmt32,
+               printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
                        current->comm, current->pid, "rt_sigreturn",
                        (long)uc, regs->nip, regs->link);
 
@@ -469,7 +469,7 @@ badframe:
               regs, frame, newsp);
 #endif
        if (show_unhandled_signals && printk_ratelimit())
-               printk(regs->msr & MSR_SF ? fmt64 : fmt32,
+               printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
                        current->comm, current->pid, "setup_rt_frame",
                        (long)frame, regs->nip, regs->link);
 
index cb71cf29edea3e80bd3fe2d698adb92063116a84..4a6a109b681678257805d5b653f81e940be0d3b0 100644 (file)
@@ -199,7 +199,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
        } else if (show_unhandled_signals &&
                    unhandled_signal(current, signr) &&
                    printk_ratelimit()) {
-                       printk(regs->msr & MSR_SF ? fmt64 : fmt32,
+                       printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
                                current->comm, current->pid, signr,
                                addr, regs->nip, regs->link, code);
                }
index 33794c1d92c349b24589694d9fd0d5c321ccf522..ef9756ee284e08d345540b459559830f233f5564 100644 (file)
@@ -399,7 +399,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
        cpu_set(cpu, cpus_in_xmon);
 
        bp = NULL;
-       if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF))
+       if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT))
                bp = at_breakpoint(regs->nip);
        if (bp || unrecoverable_excp(regs))
                fromipi = 0;
@@ -529,7 +529,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
                }
        }
 #else
-       if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) {
+       if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT)) {
                bp = at_breakpoint(regs->nip);
                if (bp != NULL) {
                        int stepped = emulate_step(regs, bp->instr[0]);
@@ -578,7 +578,7 @@ static int xmon_bpt(struct pt_regs *regs)
        struct bpt *bp;
        unsigned long offset;
 
-       if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) != (MSR_IR|MSR_SF))
+       if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) != (MSR_IR|MSR_64BIT))
                return 0;
 
        /* Are we at the trap at bp->instr[1] for some bp? */
@@ -609,7 +609,7 @@ static int xmon_sstep(struct pt_regs *regs)
 
 static int xmon_dabr_match(struct pt_regs *regs)
 {
-       if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) != (MSR_IR|MSR_SF))
+       if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) != (MSR_IR|MSR_64BIT))
                return 0;
        if (dabr.enabled == 0)
                return 0;
@@ -619,7 +619,7 @@ static int xmon_dabr_match(struct pt_regs *regs)
 
 static int xmon_iabr_match(struct pt_regs *regs)
 {
-       if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) != (MSR_IR|MSR_SF))
+       if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) != (MSR_IR|MSR_64BIT))
                return 0;
        if (iabr == NULL)
                return 0;
@@ -644,7 +644,7 @@ static int xmon_fault_handler(struct pt_regs *regs)
        if (in_xmon && catch_memory_errors)
                handle_fault(regs);     /* doesn't return */
 
-       if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) {
+       if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT)) {
                bp = in_breakpoint_table(regs->nip, &offset);
                if (bp != NULL) {
                        regs->nip = bp->address + offset;
@@ -929,7 +929,7 @@ static int do_step(struct pt_regs *regs)
        int stepped;
 
        /* check we are in 64-bit kernel mode, translation enabled */
-       if ((regs->msr & (MSR_SF|MSR_PR|MSR_IR)) == (MSR_SF|MSR_IR)) {
+       if ((regs->msr & (MSR_64BIT|MSR_PR|MSR_IR)) == (MSR_64BIT|MSR_IR)) {
                if (mread(regs->nip, &instr, 4) == 4) {
                        stepped = emulate_step(regs, instr);
                        if (stepped < 0) {