From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 730593E9C2A for ; Fri, 29 May 2026 14:23:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780064629; cv=none; b=GrsRA3fhlzHU+0kuTH+K47CuELHtUKUd8nMWVj4n5Aqp2pUc1TFGmk1BGCo7bzWh1gLDCXttQaWotJZgeWTHIbO1vLb7kT2eqX+nfTR6c1aktaVards/nI6BScRcV70ZImjSr1QZ7jfw6CPmCtxP6e1OkRoiGXF9JemRPbbF7As= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780064629; c=relaxed/simple; bh=9Gis33Sp7AVsisa6JN4s5EdMk7i/H0Ra9vdSrPS89l0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uHpQnwwCapd60j1VLXfbx6T0iVZXSVB4lxXA4IVeVD43girw8Rrk+jwZgiEu5mAzT7TZAtDmEc5ct+erQ+XHfH02qbtQE9wWk3Bohw21A3NJRwcRDVMUun4iTd/5TS4lvk1kVfLBvTRrlvIyHcPrNauMYc6KuBna0c/oVu69oxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LreKMlOa; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LreKMlOa" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-5aa2c25c632so9521647e87.1 for ; Fri, 29 May 2026 07:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780064626; x=1780669426; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+Zeom7iA0plPmE0dSLPeGIAyQiaLvJZwK3BO3d2pnzY=; b=LreKMlOaxfjsCNDmFAvT812VmLx57lDHzpOoXXLv3zIxq29AfRC1C2l31fiYdh6+E3 UMqiLKoOo6HdCPzQMjra/gnyzlJKen/lFbX/mgBnfqpUM5dr8MlNzBzAicxrXPD/r8U3 wU5qmk2Xeh2GyJPVpV0NyCB5A4lEYZXcWKP38Vt4Q/1+qO7FifCfaoPsb3XgensApF9U jn89sbDfPCW8ZBMEQZiO6e0oMCbPatWh7YyNKKuChBp3tab+jeS977HmTurKLWAUxL5Y mukN0Hnl6I3lBB0xWFMtxsFQqDz1NLrJQkY8qOgUGJcjC4VNUbi+FgwwcPnPX4gOyFx+ +FKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064626; x=1780669426; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+Zeom7iA0plPmE0dSLPeGIAyQiaLvJZwK3BO3d2pnzY=; b=OgcwsZ1pUwgGDuetptDEDAAVIysb9aKJkOgB1SZfJ4R/ayqfATh9Hf3Mq4ndWJJymv fk2dVppcgKxmzZ170CuTFWW6Y5pf78br49S1A25b7T6v0Rx3M+cuM9ei+fC+XXgx0u6f xXFTEnZoriuVmOaBRX+5HDiionTFvjKMt8ZfCapciJ9JqJTki4ImFdm7MIo7IHNrjWXi XWR7GHJQaP8+JdvbE9xQS5NTNoCCVwxBES4qj/n3MHRX5geZ4r4KQR73u0MjIBoi5DNf 3l35aTLTKSeEGaahy1jhnSXjRvGwTYhF72XLcZ05Ky3q6UlEX70Hp5R9oOnaVuBH8XVZ VAZg== X-Forwarded-Encrypted: i=1; AFNElJ/a3xJlmWOFDoiAvbNTv+TAaiGlyISrDeDmARn3I+C8L56SDNBbgpaDnOXOS24PbQt/XqnLJZbANK5FhEE=@vger.kernel.org X-Gm-Message-State: AOJu0YyJr8LRjrMEQVXXhlu/meYaNtXv0Q+urlFGKFRt7AQLh0KB8oyF KIEFXKglSf7YlhOvY61MPRLGP5qOyLSwCecMYYiNxh8quT6H7aCmWD+m X-Gm-Gg: Acq92OFDO38nj2ChtlB46BM7NUfLmLaVJfobBRqWMbV9ltlyMp8OY+07dPMxDWJqQ2+ giQEheSA/XDcKK4GwvYizbLiStbDNwOuplNxtAdhvDch+LCKAc0NjmHjEa7HHAD8lQrQKmSag9r fTUZCWfcScLD48qsTsWEHJ4PD24q5Dqhdo18SijeQl1pQkqb6zhUA+aGe8+ctv0y8jGK9s3wEuh pMU+NnmWd9mWXJ7kdgfW9LsFVJ2aAxaJNtEXVWMibfqQKQfm5mWRRoR3VRzBB600cRa1eRBOn8O cvo1psB4+6Xtae5OEgjlS3+Wcf7XSaIp02TT1exTmq6uOuS/PspaXunzjmzmaT1WZXJndto1fBl U+ZNKq37uJJIoGwHkpp3v6ITgWlsT5rqHPLvjEW7wBG2NjXC3GpB2bvl0e0+6XR7Ly60es1F4yN Iy75yaVmsToZhKnOvGdPZqd4oxmVaFRDZ+OdncJRL3xn+0FabGQWt5eHwRMDJij463yhorgwORe 1LwZAvlyjlmVZ5g7PS/RrVs7L3XBmWwM7Ds4ycFxnF7qg== X-Received: by 2002:a05:6512:3993:b0:5a8:89d6:93e0 with SMTP id 2adb3069b0e04-5aa607ce094mr13521e87.13.1780064625585; Fri, 29 May 2026 07:23:45 -0700 (PDT) Received: from buildhost.darklands.se (h-94-254-104-176.A469.priv.bahnhof.se. [94.254.104.176]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aa5b0687e2sm310433e87.6.2026.05.29.07.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 07:23:45 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm Subject: [PATCH v2 3/8] alpha: make irqflags helpers operate on IPL state Date: Fri, 29 May 2026 16:21:59 +0200 Message-ID: <20260529142322.1362438-4-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142322.1362438-1-linmag7@gmail.com> References: <20260529142322.1362438-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Alpha interrupt masking is controlled by the PAL IPL value, not by the full processor status word. Make arch_local_save_flags() return the current IPL directly, and make arch_local_irq_restore() and arch_irqs_disabled_flags() treat their argument as IPL state. Mask the low IPL bits in the restore and test helpers so callers which still pass a saved PS value continue to behave as expected. This prepares the irqflags helpers for lockdep IRQ-state tracking, where the saved flags value is used to determine whether hard IRQs are enabled or disabled. Signed-off-by: Magnus Lindholm --- arch/alpha/include/asm/irqflags.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/alpha/include/asm/irqflags.h b/arch/alpha/include/asm/irqflags.h index 9f25d4e0d37e..f207544f52de 100644 --- a/arch/alpha/include/asm/irqflags.h +++ b/arch/alpha/include/asm/irqflags.h @@ -26,7 +26,7 @@ extern int __min_ipl; static inline unsigned long arch_local_save_flags(void) { - return rdps(); + return getipl(); } static inline void arch_local_irq_disable(void) @@ -51,13 +51,13 @@ static inline void arch_local_irq_enable(void) static inline void arch_local_irq_restore(unsigned long flags) { barrier(); - setipl(flags); + setipl(flags & 7); barrier(); } static inline bool arch_irqs_disabled_flags(unsigned long flags) { - return flags == IPL_MAX; + return (flags & 7) == IPL_MAX; } static inline bool arch_irqs_disabled(void) -- 2.53.0