diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-06-07 20:58:58 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-14 00:13:51 -0400 |
commit | ff82c319e6327b12cd94c5c57754abff243ab3e4 (patch) | |
tree | 9545c320549d37f6f9bf99b6ea3eacd6e549706a /arch/powerpc/kernel/exceptions-64e.S | |
parent | 34d97e07cc81ab6f1e63696127cc7a5d2c4fce4b (diff) |
powerpc/book3e: Fix single step when using HW page tables
We patch the TLB miss exception vectors to point to alternate
functions when using HW page table on BookE.
However, we were patching in a new branch in the first instruction
of the exception handler instead of the second one, thus overriding
the nop that is in the first instruction.
This cause problems when single stepping as we rely on that nop for
the single step to stop properly within the exception vector range
rather than on the target of the branch.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64e.S')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64e.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 316465a32a9c..5c43063d2506 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
@@ -191,6 +191,12 @@ exc_##n##_bad_stack: \ | |||
191 | sth r1,PACA_TRAP_SAVE(r13); /* store trap */ \ | 191 | sth r1,PACA_TRAP_SAVE(r13); /* store trap */ \ |
192 | b bad_stack_book3e; /* bad stack error */ | 192 | b bad_stack_book3e; /* bad stack error */ |
193 | 193 | ||
194 | /* WARNING: If you change the layout of this stub, make sure you chcek | ||
195 | * the debug exception handler which handles single stepping | ||
196 | * into exceptions from userspace, and the MM code in | ||
197 | * arch/powerpc/mm/tlb_nohash.c which patches the branch here | ||
198 | * and would need to be updated if that branch is moved | ||
199 | */ | ||
194 | #define EXCEPTION_STUB(loc, label) \ | 200 | #define EXCEPTION_STUB(loc, label) \ |
195 | . = interrupt_base_book3e + loc; \ | 201 | . = interrupt_base_book3e + loc; \ |
196 | nop; /* To make debug interrupts happy */ \ | 202 | nop; /* To make debug interrupts happy */ \ |