* [PATCH] riscv: Align the trap handler to 64 bytes
@ 2023-10-31 5:35 Samuel Holland
2023-11-01 5:34 ` Leo Liang
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2023-10-31 5:35 UTC (permalink / raw)
To: Rick Chen, Leo; +Cc: u-boot, Samuel Holland, Madushan Nishantha
This is required on CPUs which always operate in CLIC mode, such as the
T-HEAD E906 and E907. Per the CLIC specification: "In this mode, the
trap vector base address held in mtvec is constrained to be aligned on a
64-byte or larger power-of-two boundary."
Reported-by: Madushan Nishantha <jlmadushan@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/riscv/cpu/mtrap.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/cpu/mtrap.S b/arch/riscv/cpu/mtrap.S
index 6eb3ed1d5a8..5cad7b41ff7 100644
--- a/arch/riscv/cpu/mtrap.S
+++ b/arch/riscv/cpu/mtrap.S
@@ -26,7 +26,7 @@
.text
/* trap entry */
- .align 2
+ .align 6
.global trap_entry
trap_entry:
addi sp, sp, -32 * REGBYTES
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] riscv: Align the trap handler to 64 bytes
2023-10-31 5:35 [PATCH] riscv: Align the trap handler to 64 bytes Samuel Holland
@ 2023-11-01 5:34 ` Leo Liang
0 siblings, 0 replies; 2+ messages in thread
From: Leo Liang @ 2023-11-01 5:34 UTC (permalink / raw)
To: Samuel Holland; +Cc: Rick Chen, u-boot, Madushan Nishantha
On Tue, Oct 31, 2023 at 12:35:41AM -0500, Samuel Holland wrote:
> This is required on CPUs which always operate in CLIC mode, such as the
> T-HEAD E906 and E907. Per the CLIC specification: "In this mode, the
> trap vector base address held in mtvec is constrained to be aligned on a
> 64-byte or larger power-of-two boundary."
>
> Reported-by: Madushan Nishantha <jlmadushan@gmail.com>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>
> arch/riscv/cpu/mtrap.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-01 5:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 5:35 [PATCH] riscv: Align the trap handler to 64 bytes Samuel Holland
2023-11-01 5:34 ` Leo Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox