linux/arch/xtensa
Max Filippov b6621895b4 xtensa: fix MAKE_PC_FROM_RA second argument
[ Upstream commit 0e60f0b758 ]

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: Sasha Levin <sashal@kernel.org>
History 2024-06-21 14:35:39 +02:00
..
boot xtensa: boot/lib: fix function prototypes 2023-10-06 14:56:49 +02:00
configs treewide: defconfig: address renamed CONFIG_DEBUG_INFO=y 2022-09-11 21:55:05 -07:00
include xtensa: fix MAKE_PC_FROM_RA second argument 2024-06-21 14:35:39 +02:00
kernel xtensa: fix MAKE_PC_FROM_RA second argument 2024-06-21 14:35:39 +02:00
lib xtensa: umulsidi3: fix conditional expression 2023-10-06 14:56:48 +02:00
mm mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
platforms xtensa: iss/network: make functions static 2023-10-06 14:56:48 +02: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 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
Kconfig.debug xtensa: make stack dump size configurable 2019-11-26 11:33:39 -08:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00