From: Kunwu Chan <kunwu.chan@linux.dev>
To: Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>, Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@rivosinc.com>, Zong Li <zong.li@sifive.com>,
Deepak Gupta <debug@rivosinc.com>,
zhouzhouyi <zhouzhouyi@gmail.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Kunwu Chan <kunwu.chan@linux.dev>
Subject: [PATCH 1/2] riscv: xip_fixup.h: fix comment typo and whitespace issue
Date: Fri, 13 Feb 2026 17:52:40 +0800 [thread overview]
Message-ID: <20260213095241.399068-1-kunwu.chan@linux.dev> (raw)
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.
Reviewed-by: zhouzhouyi <zhouzhouyi@gmail.com>
Signed-off-by: Kunwu Chan <kunwu.chan@linux.dev>
---
arch/riscv/include/asm/xip_fixup.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/include/asm/xip_fixup.h b/arch/riscv/include/asm/xip_fixup.h
index f3d56299bc22..56db595b0e14 100644
--- a/arch/riscv/include/asm/xip_fixup.h
+++ b/arch/riscv/include/asm/xip_fixup.h
@@ -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
--
2.25.1
next reply other threads:[~2026-02-13 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-13 9:52 Kunwu Chan [this message]
2026-02-13 9:52 ` [PATCH 2/2] riscv: head.S: fix typo and wrong #endif comment Kunwu Chan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260213095241.399068-1-kunwu.chan@linux.dev \
--to=kunwu.chan@linux.dev \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@rivosinc.com \
--cc=debug@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=zhouzhouyi@gmail.com \
--cc=zong.li@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox