[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250422174156.GA344533@bhelgaas>
Date: Tue, 22 Apr 2025 12:41:56 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Marc Zyngier <maz@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
asahi@...ts.linux.dev, Alyssa Rosenzweig <alyssa@...enzweig.io>,
Janne Grunau <j@...nau.net>, Hector Martin <marcan@...can.st>,
Sven Peter <sven@...npeter.dev>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Mark Kettenis <mark.kettenis@...all.nl>
Subject: Re: [PATCH v3 07/13] PCI: apple: Move away from INTMSK{SET,CLR} for
INTx and private interrupts
On Tue, Apr 01, 2025 at 10:17:07AM +0100, Marc Zyngier wrote:
> T602x seems to have dropped the rather useful SET/CLR accessors
> to the masking register.
>
> Instead, let's use the mask register directly, and wrap it with
> a brand new spinlock. No, this isn't moving in the right direction.
> @@ -261,14 +262,16 @@ static void apple_port_irq_mask(struct irq_data *data)
> {
> struct apple_pcie_port *port = irq_data_get_irq_chip_data(data);
>
> - writel_relaxed(BIT(data->hwirq), port->base + PORT_INTMSKSET);
> + guard(raw_spinlock_irqsave)(&port->lock);
> + rmw_set(BIT(data->hwirq), port->base + PORT_INTMSK);
sparse v0.6.4-39-gce1a6720 complains about this (and similar usage
elsewhere):
$ make C=2 drivers/pci/
drivers/pci/controller/pcie-apple.c:311:13: warning: context imbalance in 'apple_port_irq_mask' - wrong count at exit
drivers/pci/controller/pcie-apple.c:319:13: warning: context imbalance in 'apple_port_irq_unmask' - wrong count at exit
But I guess we just have to live with this for now until somebody
makes sparse smarter:
https://lore.kernel.org/linux-sparse/CAHk-=wiVDZejo_1BhOaR33qb=pny7sWnYtP4JUbRTXkXCkW6jA@mail.gmail.com/
Nothing to do, just "huh".
Bjorn
Powered by blists - more mailing lists