aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-12-04 02:39:15 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:51:50 -0500
commit51fae6de24da57bc6cdaa1b253595c3513ecbf2d (patch)
tree27df7f07270fb79eae44783331faeb3af3d313ab /arch/powerpc/xmon
parentcd0ca2ce4b2f4a5132e7e230be8a510755c20870 (diff)
[PATCH] powerpc: Add a is_kernel_addr() macro
There's a bunch of code that compares an address with KERNELBASE to see if it's a "kernel address", ie. >= KERNELBASE. The proper test is actually to compare with PAGE_OFFSET, since we're going to change KERNELBASE soon. So replace all of them with an is_kernel_addr() macro that does that. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 465b75c5647e..22612ed5379c 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1013,7 +1013,7 @@ static long check_bp_loc(unsigned long addr)
1013 unsigned int instr; 1013 unsigned int instr;
1014 1014
1015 addr &= ~3; 1015 addr &= ~3;
1016 if (addr < KERNELBASE) { 1016 if (!is_kernel_addr(addr)) {
1017 printf("Breakpoints may only be placed at kernel addresses\n"); 1017 printf("Breakpoints may only be placed at kernel addresses\n");
1018 return 0; 1018 return 0;
1019 } 1019 }
@@ -1064,7 +1064,7 @@ bpt_cmds(void)
1064 dabr.address = 0; 1064 dabr.address = 0;
1065 dabr.enabled = 0; 1065 dabr.enabled = 0;
1066 if (scanhex(&dabr.address)) { 1066 if (scanhex(&dabr.address)) {
1067 if (dabr.address < KERNELBASE) { 1067 if (!is_kernel_addr(dabr.address)) {
1068 printf(badaddr); 1068 printf(badaddr);
1069 break; 1069 break;
1070 } 1070 }