linux-stable/arch/xtensa
Max Filippov ef31b4647e 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:02:32 +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:02:32 +02:00
kernel xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:02:32 +02:00
lib xtensa: umulsidi3: fix conditional expression 2023-09-20 05:03:22 -07:00
mm xtensa: tlb: include <asm/tlb.h> for missing prototype 2023-09-20 05:03:21 -07:00
platforms xtensa: iss/network: make functions static 2023-09-20 05:03:21 -07:00
variants
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.6 2023-09-07 10:30:17 -07:00
Kconfig.debug xtensa: dump userspace code around the exception PC 2023-06-24 06:34:27 -07:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00