From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44BCF1E515 for ; Wed, 15 Apr 2026 12:37:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776256632; cv=none; b=Byst/NSqY3WseeUGNt03xkrEj2rylE+ERkmtrV9I/9+Tx9Vt5+TTR4xKyj5TFz6v9wFQf+U4L9SrN8AV2hfKxc9rVo2oYrEp57u6iszIQ7GToTiLiPFEnWeKyEz2mIo7rSnGdtiWlPt+6cUqtYU/Qj+HW6/OBGSVKWiW3CJoY/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776256632; c=relaxed/simple; bh=JDXKW8C+qhC5w9uqK6d6jCs58ADpGbvSsFTDY+xpadY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dSxugEVQufZ5JLxn0l/Pj1mB6RmBCwyRwqkwy3uHPofh9lAF8x0v7ftHC8R5J8oh2zv2b+AEcPwWwyAcs0FQ1+W+C7tBvNxcHNlUJysPunNOTr89MoyE4XKZgdhzR8T+9ZUBTPzhYAA+NHVC8F+mU1GT9Q2Pk4taIjKfiOdU3O4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=Nu6fxdQz; arc=none smtp.client-ip=115.124.30.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="Nu6fxdQz" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1776256627; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=CS4BGIXS3JsyYBu2XbbYqlq+oa+QQ3EmP58RqW67j2k=; b=Nu6fxdQz8ppE6WigFGcHsWzQ0CHgpkTu5YvcF7R+8v71ngRfHI+NYFa1Ksa2JgcjX/Ju6teNYlWxCuRh/7du2dnqzXuSvNo2/HSl61KUtcBzPiWa3WDp/HqZPBvLCE0eTTM4XGHgOiubGoZYTfqgqTmMB+nVIAFyVevEWw+Ja+I= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R231e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam011083073210;MF=cp0613@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0X14khaV_1776256622; Received: from DESKTOP-S9E58SO.localdomain(mailfrom:cp0613@linux.alibaba.com fp:SMTPD_---0X14khaV_1776256622 cluster:ay36) by smtp.aliyun-inc.com; Wed, 15 Apr 2026 20:37:06 +0800 From: Chen Pei 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 Message-ID: <20260415123702.123309-1-cp0613@linux.alibaba.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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