aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2011-04-07 17:56:03 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-27 00:18:44 -0400
commit9f0b079320ad1cc71ad7ea4e0ed0b64cd72bbd6d (patch)
treec6a47f3f33c48c82057deba0152ea2380aa5475b /arch/powerpc
parent9d4a2925c290a053bb279e75e7a649069fdcaf6b (diff)
powerpc: Use MSR_64BIT in places
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/head_64.S2
-rw-r--r--arch/powerpc/kernel/signal_64.c4
-rw-r--r--arch/powerpc/kernel/traps.c2
-rw-r--r--arch/powerpc/xmon/xmon.c14
4 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 6d17c37f22a1..73d6e9afcdf1 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -655,7 +655,7 @@ _GLOBAL(enable_64b_mode)
655 oris r11,r11,0x8000 /* CM bit set, we'll set ICM later */ 655 oris r11,r11,0x8000 /* CM bit set, we'll set ICM later */
656 mtmsr r11 656 mtmsr r11
657#else /* CONFIG_PPC_BOOK3E */ 657#else /* CONFIG_PPC_BOOK3E */
658 li r12,(MSR_SF | MSR_ISF)@highest 658 li r12,(MSR_64BIT | MSR_ISF)@highest
659 sldi r12,r12,48 659 sldi r12,r12,48
660 or r11,r11,r12 660 or r11,r11,r12
661 mtmsrd r11 661 mtmsrd r11
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 27c4a4584f80..da989fff19cc 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -381,7 +381,7 @@ badframe:
381 regs, uc, &uc->uc_mcontext); 381 regs, uc, &uc->uc_mcontext);
382#endif 382#endif
383 if (show_unhandled_signals && printk_ratelimit()) 383 if (show_unhandled_signals && printk_ratelimit())
384 printk(regs->msr & MSR_SF ? fmt64 : fmt32, 384 printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
385 current->comm, current->pid, "rt_sigreturn", 385 current->comm, current->pid, "rt_sigreturn",
386 (long)uc, regs->nip, regs->link); 386 (long)uc, regs->nip, regs->link);
387 387
@@ -469,7 +469,7 @@ badframe:
469 regs, frame, newsp); 469 regs, frame, newsp);
470#endif 470#endif
471 if (show_unhandled_signals && printk_ratelimit()) 471 if (show_unhandled_signals && printk_ratelimit())
472 printk(regs->msr & MSR_SF ? fmt64 : fmt32, 472 printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
473 current->comm, current->pid, "setup_rt_frame", 473 current->comm, current->pid, "setup_rt_frame",
474 (long)frame, regs->nip, regs->link); 474 (long)frame, regs->nip, regs->link);
475 475
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index cb71cf29edea..4a6a109b6816 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -199,7 +199,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
199 } else if (show_unhandled_signals && 199 } else if (show_unhandled_signals &&
200 unhandled_signal(current, signr) && 200 unhandled_signal(current, signr) &&
201 printk_ratelimit()) { 201 printk_ratelimit()) {
202 printk(regs->msr & MSR_SF ? fmt64 : fmt32, 202 printk(regs->msr & MSR_64BIT ? fmt64 : fmt32,
203 current->comm, current->pid, signr, 203 current->comm, current->pid, signr,
204 addr, regs->nip, regs->link, code); 204 addr, regs->nip, regs->link, code);
205 } 205 }
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 33794c1d92c3..ef9756ee284e 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -399,7 +399,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
399 cpu_set(cpu, cpus_in_xmon); 399 cpu_set(cpu, cpus_in_xmon);
400 400
401 bp = NULL; 401 bp = NULL;
402 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) 402 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT))
403 bp = at_breakpoint(regs->nip); 403 bp = at_breakpoint(regs->nip);
404 if (bp || unrecoverable_excp(regs)) 404 if (bp || unrecoverable_excp(regs))
405 fromipi = 0; 405 fromipi = 0;
@@ -529,7 +529,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
529 } 529 }
530 } 530 }
531#else 531#else
532 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) { 532 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT)) {
533 bp = at_breakpoint(regs->nip); 533 bp = at_breakpoint(regs->nip);
534 if (bp != NULL) { 534 if (bp != NULL) {
535 int stepped = emulate_step(regs, bp->instr[0]); 535 int stepped = emulate_step(regs, bp->instr[0]);
@@ -578,7 +578,7 @@ static int xmon_bpt(struct pt_regs *regs)
578 struct bpt *bp; 578 struct bpt *bp;
579 unsigned long offset; 579 unsigned long offset;
580 580
581 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) != (MSR_IR|MSR_SF)) 581 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) != (MSR_IR|MSR_64BIT))
582 return 0; 582 return 0;
583 583
584 /* Are we at the trap at bp->instr[1] for some bp? */ 584 /* Are we at the trap at bp->instr[1] for some bp? */
@@ -609,7 +609,7 @@ static int xmon_sstep(struct pt_regs *regs)
609 609
610static int xmon_dabr_match(struct pt_regs *regs) 610static int xmon_dabr_match(struct pt_regs *regs)
611{ 611{
612 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) != (MSR_IR|MSR_SF)) 612 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) != (MSR_IR|MSR_64BIT))
613 return 0; 613 return 0;
614 if (dabr.enabled == 0) 614 if (dabr.enabled == 0)
615 return 0; 615 return 0;
@@ -619,7 +619,7 @@ static int xmon_dabr_match(struct pt_regs *regs)
619 619
620static int xmon_iabr_match(struct pt_regs *regs) 620static int xmon_iabr_match(struct pt_regs *regs)
621{ 621{
622 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) != (MSR_IR|MSR_SF)) 622 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) != (MSR_IR|MSR_64BIT))
623 return 0; 623 return 0;
624 if (iabr == NULL) 624 if (iabr == NULL)
625 return 0; 625 return 0;
@@ -644,7 +644,7 @@ static int xmon_fault_handler(struct pt_regs *regs)
644 if (in_xmon && catch_memory_errors) 644 if (in_xmon && catch_memory_errors)
645 handle_fault(regs); /* doesn't return */ 645 handle_fault(regs); /* doesn't return */
646 646
647 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) { 647 if ((regs->msr & (MSR_IR|MSR_PR|MSR_64BIT)) == (MSR_IR|MSR_64BIT)) {
648 bp = in_breakpoint_table(regs->nip, &offset); 648 bp = in_breakpoint_table(regs->nip, &offset);
649 if (bp != NULL) { 649 if (bp != NULL) {
650 regs->nip = bp->address + offset; 650 regs->nip = bp->address + offset;
@@ -929,7 +929,7 @@ static int do_step(struct pt_regs *regs)
929 int stepped; 929 int stepped;
930 930
931 /* check we are in 64-bit kernel mode, translation enabled */ 931 /* check we are in 64-bit kernel mode, translation enabled */
932 if ((regs->msr & (MSR_SF|MSR_PR|MSR_IR)) == (MSR_SF|MSR_IR)) { 932 if ((regs->msr & (MSR_64BIT|MSR_PR|MSR_IR)) == (MSR_64BIT|MSR_IR)) {
933 if (mread(regs->nip, &instr, 4) == 4) { 933 if (mread(regs->nip, &instr, 4) == 4) {
934 stepped = emulate_step(regs, instr); 934 stepped = emulate_step(regs, instr);
935 if (stepped < 0) { 935 if (stepped < 0) {