From nobody Tue Feb 10 02:46:41 2026 Received: from minute.unseen.parts (minute.unseen.parts [139.162.151.61]) (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 CDC532080CD; Tue, 4 Feb 2025 22:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=139.162.151.61 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738708548; cv=none; b=hkJK0BLdvpe78TMWSOXjoSgchjdmDNn4OjJ9nLuLILB0NzzuOq4WREIYvGWZkv5oBSNWwKpq939qtQ5C0yK+EI0TzTnB9LU7/sKLAeg4vRkkxCNdOek0kXWQULCCid8u0Pb5TTlmFa6TRVfh5S/0it8b+OEDV69IrwOE7l1q8k0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738708548; c=relaxed/simple; bh=CQ4qzfWsPMaEEGfGXT1JB4gjxvLkrvrp2t4Hv8GNe4Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JUK8m2LTEtSMTYhsgmgQMOxBMtWfkush5AOS3/jMzew3JIYoABHRPXXS6KORDRd+74jqCLx+U+Qgzrugebe+IHW4Im9sopG0ssiTQKsk/srS5MxnqRXG24ljc3Bukr26F2XGeR0d36Pg1na7ViSAjUbWGw/fBjXlESos7GP5g30= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unseen.parts; spf=pass smtp.mailfrom=unseen.parts; dkim=pass (2048-bit key) header.d=unseen.parts header.i=@unseen.parts header.b=EVMfy9VF; arc=none smtp.client-ip=139.162.151.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unseen.parts Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unseen.parts Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=unseen.parts header.i=@unseen.parts header.b="EVMfy9VF" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=unseen.parts; s=sig; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vc975O5bKoOjSLhU3jjysrQsyU95kH6Hm7RGxzT4vCo=; b=EVMfy9VFUrvrstEn65nm4xnK34 zjpKG4OwTaEQhu6Iy9WWSjrYeK8FW2CVu/CqyviiDBMXcSBhPCoqWlPJX61h4GaO/6Pv6knE5Hag/ /1fcPzVDm9ZwDau7/OOV97y1cg6kgmHbw5s1xs0rwrOeL5gQgikQj3JrRU1QxS/HC22nfnaK5Yx1L rP7C9/GbFvCw2y9AGPwm8PySZG92V5bonqxAYLw37zgicubWMK9FSmWyJur454RjsTWatSMNdx1HA V3IC7Fm3a7kPc5ewE43MLiCakj4YS2zuxMak31JHv1sEMZvjgtgiiHGlaXUU6oI1f4zULXk0RxKap 3xwHvcZg==; Received: from ink by minute.unseen.parts with local (Exim 4.96) (envelope-from ) id 1tfRVs-0001cJ-1U; Tue, 04 Feb 2025 23:35:24 +0100 From: Ivan Kokshaysky To: Richard Henderson , Matt Turner , Oleg Nesterov , Al Viro , Arnd Bergmann , "Paul E. McKenney" Cc: "Maciej W. Rozycki" , Magnus Lindholm , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v3 1/3] alpha: replace hardcoded stack offsets with autogenerated ones Date: Tue, 4 Feb 2025 23:35:22 +0100 Message-Id: <20250204223524.6207-2-ink@unseen.parts> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250204223524.6207-1-ink@unseen.parts> References: <20250204223524.6207-1-ink@unseen.parts> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This allows the assembly in entry.S to automatically keep in sync with changes in the stack layout (struct pt_regs and struct switch_stack). Cc: stable@vger.kernel.org Reviewed-by: Maciej W. Rozycki Signed-off-by: Ivan Kokshaysky Tested-by: Maciej W. Rozycki --- arch/alpha/kernel/asm-offsets.c | 4 ++++ arch/alpha/kernel/entry.S | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offset= s.c index 4cfeae42c79a..e9dad60b147f 100644 --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c @@ -19,9 +19,13 @@ static void __used foo(void) DEFINE(TI_STATUS, offsetof(struct thread_info, status)); BLANK(); =20 + DEFINE(SP_OFF, offsetof(struct pt_regs, ps)); DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); BLANK(); =20 + DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack)); + BLANK(); + DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache)); DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register)); } diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index dd26062d75b3..6fb38365539d 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -15,10 +15,6 @@ .set noat .cfi_sections .debug_frame =20 -/* Stack offsets. */ -#define SP_OFF 184 -#define SWITCH_STACK_SIZE 64 - .macro CFI_START_OSF_FRAME func .align 4 .globl \func --=20 2.47.2