linux-stable/arch/xtensa
Max Filippov 2c994151c8 xtensa: fix MAKE_PC_FROM_RA second argument
commit 0e60f0b758 upstream.

Xtensa has two-argument MAKE_PC_FROM_RA macro to convert a0 to an actual
return address because when windowed ABI is used call{,x}{4,8,12}
opcodes stuff encoded window size into the top 2 bits of the register
that becomes a return address in the called function. Second argument of
that macro is supposed to be an address having these 2 topmost bits set
correctly, but the comment suggested that that could be the stack
address. However the stack doesn't have to be in the same 1GByte region
as the code, especially in noMMU XIP configurations.

Fix the comment and use either _text or regs->pc as the second argument
for the MAKE_PC_FROM_RA macro.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-17 12:15:03 +02:00
..
boot xtensa: boot/lib: fix function prototypes 2023-09-20 05:03:30 -07:00
configs treewide: drop CONFIG_EMBEDDED 2023-08-21 13:46:25 -07:00
include xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:15:03 +02:00
kernel xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:15:03 +02:00
lib xtensa: Use PCI_HEADER_TYPE_MFD instead of literal 2023-11-29 02:07:52 -08:00
mm xtensa: tlb: include <asm/tlb.h> for missing prototype 2023-09-20 05:03:21 -07:00
platforms tty: xtensa/iss: use u8 2023-12-08 12:02:38 +01:00
variants xtensa: add test_kc705_be variant 2018-08-20 12:34:45 -07:00
Kbuild xtensa: move core-y in arch/xtensa/Makefile to arch/xtensa/Kbuild 2021-08-11 11:37:13 -07:00
Kconfig Xtensa updates for v6.8 2024-01-17 11:40:52 -08:00
Kconfig.debug xtensa: dump userspace code around the exception PC 2023-06-24 06:34:27 -07:00
Makefile xtensa: don't produce FDPIC output with fdpic toolchain 2024-01-11 18:58:47 -08:00