diff options
author | Bharat Bhushan <r65777@freescale.com> | 2013-04-29 18:18:11 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-05-01 20:31:01 -0400 |
commit | fc2a6cfe05a33891180a27d55983febe170bc0f8 (patch) | |
tree | 174cf902c521dde8022ed23646cb35d44c29d9bc /arch/powerpc | |
parent | 1f6aaaccb1b3af8613fe45781c1aefee2ae8c6b3 (diff) |
powerpc: Fix interrupt range check on debug exception
We do not want to take single step and branch-taken debug exception
in kernel exception code. But the address range check was not covering
all kernel exception handlers address range.
With this patch we defined the interrupt_end label which defines the
end on kernel exception code. So now we check interrupt_base to
interrupt_end range for not handling debug exception in kernel
exception entry.
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/head_44x.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_booke.h | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 2 |
3 files changed, 12 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 7a2e5e421abf..97e2671cde7f 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -769,6 +769,8 @@ finish_tlb_load_47x: | |||
769 | */ | 769 | */ |
770 | DEBUG_CRIT_EXCEPTION | 770 | DEBUG_CRIT_EXCEPTION |
771 | 771 | ||
772 | interrupt_end: | ||
773 | |||
772 | /* | 774 | /* |
773 | * Global functions | 775 | * Global functions |
774 | */ | 776 | */ |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index b3853504498d..a620203f7de3 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -281,13 +281,13 @@ label: | |||
281 | andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ | 281 | andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ |
282 | beq+ 2f; \ | 282 | beq+ 2f; \ |
283 | \ | 283 | \ |
284 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | 284 | lis r10,interrupt_base@h; /* check if exception in vectors */ \ |
285 | ori r10,r10,KERNELBASE@l; \ | 285 | ori r10,r10,interrupt_base@l; \ |
286 | cmplw r12,r10; \ | 286 | cmplw r12,r10; \ |
287 | blt+ 2f; /* addr below exception vectors */ \ | 287 | blt+ 2f; /* addr below exception vectors */ \ |
288 | \ | 288 | \ |
289 | lis r10,DebugDebug@h; \ | 289 | lis r10,interrupt_end@h; \ |
290 | ori r10,r10,DebugDebug@l; \ | 290 | ori r10,r10,interrupt_end@l; \ |
291 | cmplw r12,r10; \ | 291 | cmplw r12,r10; \ |
292 | bgt+ 2f; /* addr above exception vectors */ \ | 292 | bgt+ 2f; /* addr above exception vectors */ \ |
293 | \ | 293 | \ |
@@ -334,13 +334,13 @@ label: | |||
334 | andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ | 334 | andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ |
335 | beq+ 2f; \ | 335 | beq+ 2f; \ |
336 | \ | 336 | \ |
337 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | 337 | lis r10,interrupt_base@h; /* check if exception in vectors */ \ |
338 | ori r10,r10,KERNELBASE@l; \ | 338 | ori r10,r10,interrupt_base@l; \ |
339 | cmplw r12,r10; \ | 339 | cmplw r12,r10; \ |
340 | blt+ 2f; /* addr below exception vectors */ \ | 340 | blt+ 2f; /* addr below exception vectors */ \ |
341 | \ | 341 | \ |
342 | lis r10,DebugCrit@h; \ | 342 | lis r10,interrupt_end@h; \ |
343 | ori r10,r10,DebugCrit@l; \ | 343 | ori r10,r10,interrupt_end@l; \ |
344 | cmplw r12,r10; \ | 344 | cmplw r12,r10; \ |
345 | bgt+ 2f; /* addr above exception vectors */ \ | 345 | bgt+ 2f; /* addr above exception vectors */ \ |
346 | \ | 346 | \ |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 6f62a737f607..d10a7cacccd2 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -605,6 +605,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) | |||
605 | /* Embedded Hypervisor Privilege */ | 605 | /* Embedded Hypervisor Privilege */ |
606 | EXCEPTION(0, HV_PRIV, Ehvpriv, unknown_exception, EXC_XFER_EE) | 606 | EXCEPTION(0, HV_PRIV, Ehvpriv, unknown_exception, EXC_XFER_EE) |
607 | 607 | ||
608 | interrupt_end: | ||
609 | |||
608 | /* | 610 | /* |
609 | * Local functions | 611 | * Local functions |
610 | */ | 612 | */ |