Files
linux/arch/arm/kernel
Ard Biesheuvel 4af9426a91 ARM: p2v: fix handling of LPAE translation in BE mode
[ Upstream commit 4e79f0211b ]

When running in BE mode on LPAE hardware with a PA-to-VA translation
that exceeds 4 GB, we patch bits 39:32 of the offset into the wrong
byte of the opcode. So fix that, by rotating the offset in r0 to the
right by 8 bits, which will put the 8-bit immediate in bits 31:24.

Note that this will also move bit #22 in its correct place when
applying the rotation to the constant #0x400000.

Fixes: d9a790df8e ("ARM: 7883/1: fix mov to mvn conversion in case of 64 bit phys_addr_t and BE")
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-16 09:56:45 +09:00
..
2008-08-12 19:54:09 +01:00
2016-10-19 10:18:47 +01:00
2019-03-13 20:22:32 +08:00
2015-05-20 23:09:51 +02:00
2014-11-21 15:24:50 +00:00
2014-11-21 15:24:50 +00:00
2012-03-28 18:30:01 +01:00
2014-11-21 15:24:50 +00:00
2014-11-21 15:25:02 +00:00
2023-05-15 13:47:08 +09:00
2014-11-21 15:24:50 +00:00
2016-11-16 23:51:19 +00:00