public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Pei <cp0613@linux.alibaba.com>
To: mpe@kernel.org
Cc: pjw@kernel.org, anup@brainfault.org,
	andrew.jones@oss.qualcomm.com, guoren@kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v2] riscv: smp: Align secondary_start_sbi to 4 bytes
Date: Wed, 15 Apr 2026 20:37:02 +0800	[thread overview]
Message-ID: <20260415123702.123309-1-cp0613@linux.alibaba.com> (raw)
In-Reply-To: <d38e585f-554a-4f81-8136-981870fe3383@kernel.org>

On Wed, 15 Apr 2026 12:06:28 +1000, mpe@kernel.org wrote:

> > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
> > index 9c99c5ad6fe8..9f33be6260e1 100644
> > --- a/arch/riscv/kernel/head.S
> > +++ b/arch/riscv/kernel/head.S
> > @@ -127,6 +127,7 @@ relocate_enable_mmu:
> >   #endif /* CONFIG_MMU */
> >   #ifdef CONFIG_SMP
> >    .global secondary_start_sbi
> > + .align 2
> >   secondary_start_sbi:
> >    /* Mask all interrupts */
> >    csrw CSR_IE, zero
> 
> 
> Minor nit, but IMHO .balign is preferable in new code. It always byte 
> aligns, whereas .align has different meanings across architectures, and 
> on some arches (including riscv) requires the reader to do the math to 
> convert to a byte alignment.
> 
> These days there's also the SYM_CODE_START etc. macros defined via 
> linkage.h, which use __ALIGN from arch/riscv/include/asm/linkage.h, 
> which is already .balign 4.

Hi Michael,

Thank you for your review and reminder. If this patch is ultimately
approved (because the behavior of OpenSBI still needs clarification
based on the new reviewer's comments), I will update it using .balign.

Thanks,
Pei

  reply	other threads:[~2026-04-15 12:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 13:20 [PATCH v2] riscv: smp: Align secondary_start_sbi to 4 bytes cp0613
2026-04-15  2:06 ` Michael Ellerman
2026-04-15 12:37   ` Chen Pei [this message]
2026-04-15  3:39 ` Vivian Wang
2026-04-15 12:37   ` Chen Pei
2026-04-17  2:48     ` Vivian Wang

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=20260415123702.123309-1-cp0613@linux.alibaba.com \
    --to=cp0613@linux.alibaba.com \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=anup@brainfault.org \
    --cc=guoren@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mpe@kernel.org \
    --cc=pjw@kernel.org \
    /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