From: Marc Zyngier <maz@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
asahi@lists.linux.dev, "Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
"Janne Grunau" <j@jannau.net>, "Hector Martin" <marcan@marcan.st>,
"Sven Peter" <sven@svenpeter.dev>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Mark Kettenis" <mark.kettenis@xs4all.nl>
Subject: Re: [PATCH v3 07/13] PCI: apple: Move away from INTMSK{SET,CLR} for INTx and private interrupts
Date: Tue, 22 Apr 2025 18:49:27 +0100 [thread overview]
Message-ID: <739728922cbf097aa87dc41265478dfc@kernel.org> (raw)
In-Reply-To: <20250422174156.GA344533@bhelgaas>
On 2025-04-22 18:41, Bjorn Helgaas wrote:
> 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".
Huh indeed. Pretty sad to see a useful piece of tooling being left
on the curb.
GSoC project?
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2025-04-22 17:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 9:17 [PATCH v3 00/13] PCI: apple: Add support for t6020 Marc Zyngier
2025-04-01 9:17 ` [PATCH v3 01/13] PCI: apple: Set only available ports up Marc Zyngier
2025-04-13 16:57 ` Manivannan Sadhasivam
2025-04-13 20:00 ` Marc Zyngier
2025-04-14 10:13 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 02/13] dt-bindings: pci: apple,pcie: Add t6020 compatible string Marc Zyngier
2025-04-01 9:40 ` Mark Kettenis
2025-04-13 16:59 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 03/13] PCI: host-generic: Extract an ecam bridge creation helper from pci_host_common_probe() Marc Zyngier
2025-04-13 17:03 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 04/13] PCI: ecam: Allow cfg->priv to be pre-populated from the root port device Marc Zyngier
2025-04-13 17:04 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 05/13] PCI: apple: Move over to standalone probing Marc Zyngier
2025-04-13 17:06 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 06/13] PCI: apple: Dynamically allocate RID-to_SID bitmap Marc Zyngier
2025-04-13 17:07 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 07/13] PCI: apple: Move away from INTMSK{SET,CLR} for INTx and private interrupts Marc Zyngier
2025-04-13 17:09 ` Manivannan Sadhasivam
2025-04-22 17:41 ` Bjorn Helgaas
2025-04-22 17:49 ` Marc Zyngier [this message]
2025-04-01 9:17 ` [PATCH v3 08/13] PCI: apple: Fix missing OF node reference in apple_pcie_setup_port Marc Zyngier
2025-04-13 17:12 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 09/13] PCI: apple: Move port PHY registers to their own reg items Marc Zyngier
2025-04-13 17:16 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 10/13] PCI: apple: Drop poll for CORE_RC_PHYIF_STAT_REFCLK Marc Zyngier
2025-04-13 17:17 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 11/13] PCI: apple: Use gpiod_set_value_cansleep in probe flow Marc Zyngier
2025-04-13 17:17 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 12/13] PCI: apple: Abstract register offsets via a SoC-specific structure Marc Zyngier
2025-04-13 17:22 ` Manivannan Sadhasivam
2025-04-01 9:17 ` [PATCH v3 13/13] PCI: apple: Add T602x PCIe support Marc Zyngier
2025-04-13 17:24 ` Manivannan Sadhasivam
2025-04-19 14:59 ` [PATCH v3 00/13] PCI: apple: Add support for t6020 Manivannan Sadhasivam
2025-04-20 8:32 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=739728922cbf097aa87dc41265478dfc@kernel.org \
--to=maz@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=helgaas@kernel.org \
--cc=j@jannau.net \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=marcan@marcan.st \
--cc=mark.kettenis@xs4all.nl \
--cc=robh@kernel.org \
--cc=sven@svenpeter.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.