Comments

We can't emulate stwu since that may corrupt current exception stack.
So we will have to do real store operation in the exception return code.
Firstly we'll allocate a trampoline exception frame below the kprobed
function stack and copy the current exception frame to the trampoline.
Then we can do this real store operation to implement 'stwu', and reroute
the trampoline frame to r1 to complete this exception migration.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
v4:
* improve register usage
* use copy_and_flush() to replace memcpy since that only clobber r0, r6
and LR explicitly.
* retest
arch/powerpc/kernel/entry_32.S | 44 ++++++++++++++++++++++++++++++++++------
arch/powerpc/kernel/entry_64.S | 32 +++++++++++++++++++++++++++++
2 files changed, 70 insertions(+), 6 deletions(-)