diff options
| author | Samuel Holland <samuel.holland@sifive.com> | 2026-06-24 19:31:48 +0800 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-06-25 13:44:27 -0600 |
| commit | c4c7756a81b5baef286bf9be1ea404f3e4dd7a3c (patch) | |
| tree | b93f139c874fe87f08e64b190a07a2d9df091ce3 /rust/kernel/drm/gpuvm/git@git.tavy.me:linux-stable.git | |
| parent | 57ad674d032baf5426a38b0d6b2ddd60cbd3913f (diff) | |
riscv: Fix 32-bit call_on_irq_stack() frame pointer ABI
call_on_irq_stack() uses struct member offsets to set up its link in the
frame record list. On riscv32, struct stackframe is the wrong size to
maintain stack pointer alignment, so STACKFRAME_SIZE_ON_STACK includes
padding. However, the ABI requires the frame record to be placed
immediately below the address stored in s0, so the padding must come
before the struct members.
Fix the layout by making STACKFRAME_FP and STACKFRAME_RA the negative
offsets from s0, instead of the positive offsets from sp.
Fixes: 82982fdd5133 ("riscv: Deduplicate IRQ stack switching")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Matthew Bystrin <dev.mbstr@gmail.com>
Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Link: https://lore.kernel.org/all/20240530001733.1407654-2-samuel.holland@sifive.com/
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://patch.msgid.link/20260624113148.3723541-1-qirui.001@bytedance.com
[pjw@kernel.org: cleaned up the patch tags and added Matthew's Reviewed-by]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'rust/kernel/drm/gpuvm/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
