[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>
这个提交包含在:
@@ -178,7 +178,6 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
|
||||
int val;
|
||||
int i;
|
||||
unsigned long pc = mfspr(SPRN_SIAR);
|
||||
int is_kernel = (pc >= KERNELBASE);
|
||||
|
||||
/* set the PMM bit (see comment below) */
|
||||
mtmsrd(mfmsr() | MSR_PMM);
|
||||
@@ -187,7 +186,7 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
|
||||
val = ctr_read(i);
|
||||
if (val < 0) {
|
||||
if (ctr[i].enabled) {
|
||||
oprofile_add_pc(pc, is_kernel, i);
|
||||
oprofile_add_pc(pc, is_kernel_addr(pc), i);
|
||||
ctr_write(i, reset_value[i]);
|
||||
} else {
|
||||
ctr_write(i, 0);
|
||||
|
在新工单中引用
屏蔽一个用户