diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2011-04-07 17:56:03 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-27 00:18:44 -0400 |
commit | 9f0b079320ad1cc71ad7ea4e0ed0b64cd72bbd6d (patch) | |
tree | c6a47f3f33c48c82057deba0152ea2380aa5475b /arch/powerpc/xmon/xmon.c | |
parent | 9d4a2925c290a053bb279e75e7a649069fdcaf6b (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/xmon/xmon.c')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 | ||
610 | static int xmon_dabr_match(struct pt_regs *regs) | 610 | static 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 | ||
620 | static int xmon_iabr_match(struct pt_regs *regs) | 620 | static 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) { |