Skip to content

Commit

Permalink
powerpc/64s: Fix instruction encoding for lis in ppc_function_entry()
Browse files Browse the repository at this point in the history
commit cea1531 upstream.

'lis r2,N' is 'addis r2,0,N' and the instruction encoding in the macro
LIS_R2 is incorrect (it currently maps to 'addis r0,r2,N'). Fix the
same.

Fixes: c71b7ef ("powerpc: Add ABIv2 support to ppc_function_entry")
Cc: stable@vger.kernel.org # v3.16+
Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210304020411.16796-1-naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
rnav authored and gregkh committed Mar 17, 2021
1 parent 15dcba8 commit 9e46a01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/code-patching.h
Expand Up @@ -73,7 +73,7 @@ void __patch_exception(int exc, unsigned long addr);
#endif

#define OP_RT_RA_MASK 0xffff0000UL
#define LIS_R2 0x3c020000UL
#define LIS_R2 0x3c400000UL
#define ADDIS_R2_R12 0x3c4c0000UL
#define ADDI_R2_R2 0x38420000UL

Expand Down

0 comments on commit 9e46a01

Please sign in to comment.