linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	David Laight <david.laight@aculab.com>,
	linux-pci <linux-pci@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>, Mason <slash.tmp@free.fr>
Subject: Re: [PATCH v7 3/3] PCI: Add tango MSI controller support
Date: Wed, 14 Jun 2017 10:32:24 +0100	[thread overview]
Message-ID: <a714b871-dd6c-4db0-3539-aabf7274938a@arm.com> (raw)
In-Reply-To: <870f833b-6bff-b3b1-6591-7d46e374de66@sigmadesigns.com>

On 14/06/17 10:19, Marc Gonzalez wrote:
> On 14/06/2017 11:00, Marc Gonzalez wrote:
> 
>> The MSI controller in Tango supports 256 message-signaled interrupts,
>> and a single doorbell address.
>>
>> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
>> ---
>> Changes from v6 to v7
>> o Call spin_lock() not spin_lock_irqsave() in the ISR
>> ---
>>  drivers/pci/host/pcie-tango.c | 225 ++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 225 insertions(+)
> 
> Someone on IRC suggested testing the driver with LOCKDEP.
> 
> If I understand the warning below correctly, I am not supposed
> to call irq_domain_set_info() while holding used_msi_lock?

Indeed. This creates an AB/BA situation, which will eventually deadlock.
Once again, lockdep saves the day.

> NB: in probe, my driver calls
> 
> 	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
> 
> This should not break LOCKDEP analysis, right?

It doesn't. The code is provably wrong, and lockdep proved that it is wrong.

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2017-06-14  9:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 13:28 [PATCH v5 0/3] Tango PCIe controller support Marc Gonzalez
2017-05-31 13:30 ` [PATCH v5 1/3] PCI: Add DT binding for tango PCIe controller Marc Gonzalez
2017-06-07 21:29   ` Rob Herring
2017-06-07 22:34     ` Mason
2017-06-13 11:55       ` Marc Zyngier
2017-06-13 14:23       ` Rob Herring
2017-06-13 13:51     ` [PATCH v6 " Marc Gonzalez
2017-06-18 14:05       ` Rob Herring
2017-05-31 13:33 ` [PATCH v5 2/3] PCI: Add tango PCIe host bridge support Marc Gonzalez
2017-06-07  8:19   ` Marc Gonzalez
2017-06-19 14:50     ` Marc Gonzalez
2017-06-19 15:58       ` Marc Zyngier
2017-06-19 16:01         ` Marc Gonzalez
2017-06-19 16:16           ` Marc Zyngier
2017-06-20  8:29       ` Marc Gonzalez
2017-07-05  9:36   ` Ard Biesheuvel
2017-07-05 12:18     ` Marc Gonzalez
2017-05-31 13:35 ` [PATCH v5 3/3] PCI: Add tango MSI controller support Marc Gonzalez
2017-06-13 12:09   ` Marc Zyngier
2017-06-13 14:01     ` [PATCH v6 " Marc Gonzalez
2017-06-13 14:22       ` Marc Zyngier
2017-06-13 14:47         ` Marc Gonzalez
2017-06-13 16:53           ` Marc Zyngier
2017-06-14  9:00             ` [PATCH v7 " Marc Gonzalez
2017-06-14  9:19               ` Marc Gonzalez
2017-06-14  9:32                 ` Marc Zyngier [this message]
2017-06-14 11:06                   ` [PATCH v8 " Marc Gonzalez

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=a714b871-dd6c-4db0-3539-aabf7274938a@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=david.laight@aculab.com \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marc_gonzalez@sigmadesigns.com \
    --cc=robin.murphy@arm.com \
    --cc=slash.tmp@free.fr \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).