riscv: fix minor typos and style issues in XIP code
cover riscv: fix minor typos and style issues in XIP code
Fix a few minor issues found in riscv XIP-related code:
- xip_fixup.h: comment typo (_start vs _sdata) and spaces-vs-tab
- head.S: spelling typo and wrong #endif comment
Kunwu Chan (2):
riscv: xip_fixup.h: fix comment typo and whitespace issue
riscv: head.S: fix typo and wrong #endif comment
arch/riscv/include/asm/xip_fixup.h | 4 ++-- arch/riscv/kernel/head.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.25.1
PATCH RESEND 1/2 riscv: xip_fixup.h: fix comment typo and whitespace issue
Fix two minor issues in XIP_FIXUP_OFFSET macro:
- The comment describes the fixup formula as
"reg += CONFIG_PHYS_RAM_BASE - _start", but the actual assembly code subtracts _sdata, not _start. Fix the comment to match.
- Replace spaces with a tab for the "add" instruction to keep consistent indentation with surrounding lines.
--- arch/riscv/include/asm/xip_fixup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/include/asm/xip_fixup.h +2 -2
@@ -16,10 +16,10 @@* * The start of data in Flash is _sdata and the start of data in RAM is * CONFIG_PHYS_RAM_BASE. So this fix-up essentially does this: -* reg += CONFIG_PHYS_RAM_BASE - _start +* reg += CONFIG_PHYS_RAM_BASE - _sdata */ li t0,CONFIG_PHYS_RAM_BASE - add \reg, \reg, t0 + add \reg, \reg, t0 la t0, _sdata sub \reg, \reg, t0 .endm
Signature · 1 line
2.25.1
PATCH RESEND 2/2 riscv: head.S: fix typo and wrong #endif comment
In reply to Kunwu Chan- Fix spelling: "intruction" -> "instruction".
- Fix #endif comment: the matching #ifdef is CONFIG_XIP_KERNEL, not CONFIG_XIP.
--- arch/riscv/kernel/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kernel/head.S +2 -2
@@ -81,7 +81,7 @@ relocate_enable_mmu: sub a1, a1, a2 add ra, ra, a1 - /* Point stvec to virtual address of intruction after satp write */ + /* Point stvec to virtual address of instruction after satp write */ la a2, 1f add a2, a2, a1 csrw CSR_TVEC, a2
@@ -287,7 +287,7 @@ SYM_CODE_START(_start_kernel) /* first time here if hart_lottery in RAM is not set */ beq t0, t1, .Lsecondary_start -#endif /* CONFIG_XIP */ +#endif /* CONFIG_XIP_KERNEL */ #endif /* CONFIG_RISCV_BOOT_SPINWAIT */ #ifdef CONFIG_XIP_KERNEL
Signature · 1 line
2.25.1
Paul Walmsley
maintainerQuoted 4 lines · Kunwu Chan
Fix a few minor issues found in riscv XIP-related code:
-
xip_fixup.h: comment typo (_startvs_sdata) and spaces-vs-tab
-head.S: spelling typo and wrong #endif comment
Thanks for fixing the threading, but, Conor's message:
https://lore.kernel.org/linux-riscv/20260213-canteen-diffuser-5ecc80f264b4@spud/
was exactly right. Folks who care about XIP support for RISC-V first need to send patches to fix it in mainline. These typo fixes should be rolled in to that series. Until that happens, I plan to keep the XIP removal patches queued.
I also want to see the XIP folks participating in testing and reviewing upstream patches going forward to confirm that they don't break XIP support. Otherwise, the burden is just getting pushed to patch submitters and maintainers, most of whom probably don't care much about XIP. And there's a good chance that we'll just go through this cycle again in another few months.
- Paul
Quoted 9 lines · Paul Walmsley
Thanks for fixing the threading, but, Conor's message:
https://lore.kernel.org/linux-riscv/20260213-canteen-diffuser-5ecc80f264b4@spud/
was exactly right. Folks who care about XIP support for RISC-V first need to send patches to fix it in mainline. These typo fixes should be rolled in to that series. Until that happens, I plan to keep the XIP removal patches queued.
Quoted 6 lines
I also want to see the XIP folks participating in testing and reviewing upstream patches going forward to confirm that they don't break XIP support. Otherwise, the burden is just getting pushed to patch submitters and maintainers, most of whom probably don't care much about XIP. And there's a good chance that we'll just go through this cycle again in another few months.
I would be happy to take that responsibility, if there are users. But that does not seem to be the case.
Nam
Quoted 1 line · Kunwu Chan
Fix a few minor issues found in riscv XIP-related code:
'RESEND' isn't expected to be used as you did in this series. You sent the v1 series on Feb 14, only 4 days ago, the series doesn't miss any dev window.
https://lore.kernel.org/linux-riscv/[email protected]/T/#t
Quoted 3 lines
-
xip_fixup.h: comment typo (_startvs_sdata) and spaces-vs-tab
-head.S: spelling typo and wrong #endif comment
I'm sorry, but how important is fixing comment/spelling typo or #endif comment among maintainship? The riscv XIP code doesn't stand on itself, but heavily affects and is affected by other riscv arch common code.
Quoted 17 lines
Kunwu Chan (2):
riscv:xip_fixup.h: fix comment typo and whitespace issue
riscv:head.S: fix typo and wrong #endif commentarch/riscv/include/asm/xip_fixup.h | 4 ++-- arch/riscv/kernel/head.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)Signature · 7 lines
2.25.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 7 lines · Jisheng Zhang
Quoted 1 line · Kunwu Chan
Fix a few minor issues found in riscv XIP-related code:
'RESEND' isn't expected to be used as you did in this series. You sent the v1 series on Feb 14, only 4 days ago, the series doesn't miss any dev window.
https://lore.kernel.org/linux-riscv/[email protected]/T/#t
v1 wasn't threaded correctly, so I think a resend is fine as the content didn't change.
Quoted 5 lines
Quoted 2 lines
-
xip_fixup.h: comment typo (_startvs_sdata) and spaces-vs-tab
-head.S: spelling typo and wrong #endif commentI'm sorry, but how important is fixing comment/spelling typo or #endif comment among maintainship?
It's not, but I think we've made this point already!
Quoted 2 lines
The riscv XIP code doesn't stand on itself,
but heavily affects and is affected by other riscv arch common code.
Paul Walmsley
maintainerHi,
Quoted 5 lines · Kunwu Chan
Fix a few minor issues found in riscv XIP-related code:
-
xip_fixup.h: comment typo (_startvs_sdata) and spaces-vs-tab
-head.S: spelling typo and wrong #endif comment
Quoted 7 lines
Kunwu Chan (2):
riscv:xip_fixup.h: fix comment typo and whitespace issue
riscv:head.S: fix typo and wrong #endif commentarch/riscv/include/asm/xip_fixup.h | 4 ++-- arch/riscv/kernel/head.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Please see:
https://lore.kernel.org/linux-riscv/[email protected]/
- Paul