]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Fix XIP_FIXUP_FLASH_OFFSET
authorMyrtle Shah <gatecat@ds0.me>
Thu, 20 Jan 2022 15:33:37 +0000 (15:33 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 4 Feb 2022 19:11:07 +0000 (11:11 -0800)
commitd5e7a580f90380f1430542eb9c9d7502e3abfdcb
treed3f7053b90b2d64d9e40eb866427f25ee4e873d0
parent49ab5adf58d506356ce4c1201a379f75b6942574
riscv: Fix XIP_FIXUP_FLASH_OFFSET

There were several problems with the calculation. Not only was an 'and'
being computed into t1 but thrown away; but the 'and' itself would
cause problems if the granularity of the XIP physical address was less
than XIP_OFFSET - in my case I had the kernel image at 2MB in SPI flash.

Fixes: ea225b961820 ("riscv: remove .text section size limitation for XIP")
Cc: stable@vger.kernel.org
Signed-off-by: Myrtle Shah <gatecat@ds0.me>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/head.S