From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 BDA77322A1F for ; Sun, 17 May 2026 21:40:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779054006; cv=none; b=Bub3y37x7fp540/Ile5ex1PTVftLvxRcBMf0d+crvup3VsFycSubWwnwXD7ufRxVxABYmGx2szSsbxGEOh8diqqOecxBfHXBYZU+kluZXhAk+63JC9Z3ClPRLLCDODqnJQ5OWGN+LPNsPSP6Z62OTt1k/v2u2Jj24Dbqi2OjYJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779054006; c=relaxed/simple; bh=9Gis33Sp7AVsisa6JN4s5EdMk7i/H0Ra9vdSrPS89l0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=drUVRK/0PJx+Y5cz4H4xneUbUWgso/d3yOaQzU+GdseV1I64n3rMB7iMhczoe9HGUqqUNjcEubHyjjci8N217SKacExdsrvkgDSLJs8q64zZzUjvDc1+UmOfUJPec4hOGtLWKbWWbLVfhaSZq/aSoQVn1TB7jXX/YoDmOOHQ6s4= 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=CK/7skxu; arc=none smtp.client-ip=209.85.167.50 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="CK/7skxu" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5a8891febd2so2315847e87.1 for ; Sun, 17 May 2026 14:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779054003; x=1779658803; 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=CK/7skxuwkVfoMi0oED6dWzXo9FJicD2tuh/0Zd1QviLngub8Lv+u/XcpDbBrWPJkH bvi3pyA0lqYBT38jLhmZX0IIuE507rcHk5QSpzikffsLQq13RTyInDVUA/Wi/d2IlPCy HHHPrNNPLGpFS34P92lfrHIU4t/WEcsL8inLWdH9aSXkfa5G1ioL18p4Kgy6FyCmaC5A x1Nq56x+czkThqGydQGlkXP9F0w5UOvglg1PeAfjGq26F79rUEmFNmkAloQxtCEbrQdg ZnAOJw2DMEeA6WLOJ3zgGr6RZt+Wo+MpiHWHh/yHe8aevveWjC0AR+UpvgkaREkRJzZI YKyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779054003; x=1779658803; 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=q1d0wg5AIpq2TqcmJTn0GDEq1B7M1To4YaJ05+SQmtSPrPy/hDo0vVeux1CklQo2Bq v47XFxdkvzY9SW53+P4HUts7Sptfm5nJMPPjWzkhG//zXQtqKPV51t0612g/BnrBfvX+ 7YP0vEC6UmNx6hNuO4h1lUl3iseF56I9MEbkrk639zsKlgyBDn5ITM2GCZz1G67ZNqav L6w7NBxd89ttYT7kXP7YuaLe4UtZeXDa52JTUayRVXluz5SLkZvlFOmEpagoWchX+KOO kuCj1zs2ENLFba6BX2G1TB9LvAJNQGzwNFD8u9nXxjgqKEUlj1ivXGKR8GKdqxWzZvpl gaLw== X-Forwarded-Encrypted: i=1; AFNElJ8Lfh0dKSMpmC9hc8FKUx+o1aGgMuocRYYerv3fbxPV2TgcIVlhoRtRBoQZLB2sFfXxcNC1a4SK4+3J/4Y=@vger.kernel.org X-Gm-Message-State: AOJu0YyMez1OPJ3L0rqdyUF9yaqpzp+fcb9FuSw8f2rbRByvEcInZfOs oPuzrCe3J2wLNheGQ6G5G0GGI1LpQye06RPRJvviaCcX9QMWG7FvHqFP X-Gm-Gg: Acq92OGUDVfOBhB+KnFkqdVYQQ1dr/oXkGlpDKfVddWXHSCyl/HjWeHRZ8K99t3TGiN An0MRkaDvYGcWWJ/wHJIffPABrblK/o/6nSewVcEHMOCHKf0SuLjuBCSAI+1qAFxqR+molu1tA+ xywivMB5KOMUHM8uMwZPOrGxFaUYGwE2KG4m4WeL1+zFLLRe9Hw51J6ifHOVjdyS850vkvqm0dv vogHskUJ+Dc+oA7sU/lVeCIxFj2SRdAapMMS0W77sSSsh7FtZLLOr6nkckCbnEsnyzJv60i+QvT MMRFcUdJooOIv6V4D4KbXnxyuhQDlM1Di947dJ4g//vfUqg29uU8ZA1zePUeuqFJ386kHzsjh/9 8UbJXOhRb5YDhQ5WuSjlLEJVh/VeQnZifZ/IOItnz8QCwb9NkcOrbP566zPUQ/HLKx5Ls8ClP2U 4N3xHZLL87FHcyExP6MYz2ZjppaXpN4scGLLLEE/CRiqu4vO/C+USTRZdxmH90lRPFBa/Nq5Nn7 GQNegXiEaTj0Vl7HvbBAdP3is/iDGePB2g= X-Received: by 2002:a05:6512:3d88:b0:5a8:7f52:62d1 with SMTP id 2adb3069b0e04-5aa0e733f44mr4523580e87.1.1779054002895; Sun, 17 May 2026 14:40:02 -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-5a91c1558f3sm2890076e87.77.2026.05.17.14.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 14:40:02 -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 3/8] alpha: make irqflags helpers operate on IPL state Date: Sun, 17 May 2026 23:36:12 +0200 Message-ID: <20260517213919.347523-4-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260517213919.347523-1-linmag7@gmail.com> References: <20260517213919.347523-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