Skip to content

Commit 92b4fc7

Browse files
committed
Merge tag 'powerpc-4.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: "Just two fixes. The first fixes kprobing a stdu, and is marked for stable as it's been broken for ~ever. In hindsight this could have gone in next. The other is a fix for a change we merged this cycle, where if we take a certain exception when the kernel is running relocated (currently only used for kdump), we checkstop the box. Thanks to Ravi Bangoria" * tag 'powerpc-4.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64: Fix HMI exception on LE with CONFIG_RELOCATABLE=y powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction
2 parents fe7ba28 + be5c5e8 commit 92b4fc7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arch/powerpc/include/asm/exception-64s.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
236236
mtctr reg; \
237237
bctr
238238

239-
#define BRANCH_LINK_TO_FAR(reg, label) \
240-
__LOAD_FAR_HANDLER(reg, label); \
241-
mtctr reg; \
239+
#define BRANCH_LINK_TO_FAR(label) \
240+
__LOAD_FAR_HANDLER(r12, label); \
241+
mtctr r12; \
242242
bctrl
243243

244244
/*
@@ -265,7 +265,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
265265
#define BRANCH_TO_COMMON(reg, label) \
266266
b label
267267

268-
#define BRANCH_LINK_TO_FAR(reg, label) \
268+
#define BRANCH_LINK_TO_FAR(label) \
269269
bl label
270270

271271
#define BRANCH_TO_KVM(reg, label) \

arch/powerpc/kernel/entry_64.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ resume_kernel:
689689

690690
addi r8,r1,INT_FRAME_SIZE /* Get the kprobed function entry */
691691

692-
lwz r3,GPR1(r1)
692+
ld r3,GPR1(r1)
693693
subi r3,r3,INT_FRAME_SIZE /* dst: Allocate a trampoline exception frame */
694694
mr r4,r1 /* src: current exception frame */
695695
mr r1,r3 /* Reroute the trampoline frame to r1 */
@@ -703,8 +703,8 @@ resume_kernel:
703703
addi r6,r6,8
704704
bdnz 2b
705705

706-
/* Do real store operation to complete stwu */
707-
lwz r5,GPR1(r1)
706+
/* Do real store operation to complete stdu */
707+
ld r5,GPR1(r1)
708708
std r8,0(r5)
709709

710710
/* Clear _TIF_EMULATE_STACK_STORE flag */

arch/powerpc/kernel/exceptions-64s.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ TRAMP_REAL_BEGIN(hmi_exception_early)
982982
EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN)
983983
EXCEPTION_PROLOG_COMMON_3(0xe60)
984984
addi r3,r1,STACK_FRAME_OVERHEAD
985-
BRANCH_LINK_TO_FAR(r4, hmi_exception_realmode)
985+
BRANCH_LINK_TO_FAR(hmi_exception_realmode) /* Function call ABI */
986986
/* Windup the stack. */
987987
/* Move original HSRR0 and HSRR1 into the respective regs */
988988
ld r9,_MSR(r1)

0 commit comments

Comments
 (0)