提交 fc2a6cfe 编写于 作者: B Bharat Bhushan 提交者: Benjamin Herrenschmidt

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: NBharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 1f6aaacc
...@@ -769,6 +769,8 @@ finish_tlb_load_47x: ...@@ -769,6 +769,8 @@ finish_tlb_load_47x:
*/ */
DEBUG_CRIT_EXCEPTION DEBUG_CRIT_EXCEPTION
interrupt_end:
/* /*
* Global functions * Global functions
*/ */
......
...@@ -281,13 +281,13 @@ ...@@ -281,13 +281,13 @@
andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \
beq+ 2f; \ beq+ 2f; \
\ \
lis r10,KERNELBASE@h; /* check if exception in vectors */ \ lis r10,interrupt_base@h; /* check if exception in vectors */ \
ori r10,r10,KERNELBASE@l; \ ori r10,r10,interrupt_base@l; \
cmplw r12,r10; \ cmplw r12,r10; \
blt+ 2f; /* addr below exception vectors */ \ blt+ 2f; /* addr below exception vectors */ \
\ \
lis r10,DebugDebug@h; \ lis r10,interrupt_end@h; \
ori r10,r10,DebugDebug@l; \ ori r10,r10,interrupt_end@l; \
cmplw r12,r10; \ cmplw r12,r10; \
bgt+ 2f; /* addr above exception vectors */ \ bgt+ 2f; /* addr above exception vectors */ \
\ \
...@@ -334,13 +334,13 @@ ...@@ -334,13 +334,13 @@
andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \
beq+ 2f; \ beq+ 2f; \
\ \
lis r10,KERNELBASE@h; /* check if exception in vectors */ \ lis r10,interrupt_base@h; /* check if exception in vectors */ \
ori r10,r10,KERNELBASE@l; \ ori r10,r10,interrupt_base@l; \
cmplw r12,r10; \ cmplw r12,r10; \
blt+ 2f; /* addr below exception vectors */ \ blt+ 2f; /* addr below exception vectors */ \
\ \
lis r10,DebugCrit@h; \ lis r10,interrupt_end@h; \
ori r10,r10,DebugCrit@l; \ ori r10,r10,interrupt_end@l; \
cmplw r12,r10; \ cmplw r12,r10; \
bgt+ 2f; /* addr above exception vectors */ \ bgt+ 2f; /* addr above exception vectors */ \
\ \
......
...@@ -605,6 +605,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) ...@@ -605,6 +605,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
/* Embedded Hypervisor Privilege */ /* Embedded Hypervisor Privilege */
EXCEPTION(0, HV_PRIV, Ehvpriv, unknown_exception, EXC_XFER_EE) EXCEPTION(0, HV_PRIV, Ehvpriv, unknown_exception, EXC_XFER_EE)
interrupt_end:
/* /*
* Local functions * Local functions
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册