From: David Vrabel <david.vrabel@citrix.com>
To: Jiang Liu <jiang.liu@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Sander Eikelenboom <linux@eikelenboom.it>,
"H. Peter Anvin" <hpa@zytor.com>, <x86@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>, <linux-kernel@vger.kernel.org>,
<linux-pci@vger.kernel.org>, <linux-acpi@vger.kernel.org>
Subject: Re: [Bugfix 3/3] x86/PCI: Refine the way to release PCI IRQ resources
Date: Mon, 19 Jan 2015 14:24:13 +0000 [thread overview]
Message-ID: <54BD138D.3090403@citrix.com> (raw)
In-Reply-To: <1421643344-17092-4-git-send-email-jiang.liu@linux.intel.com>
On 19/01/15 04:55, Jiang Liu wrote:
> Some PCI device drivers assume that pci_dev->irq won't change after
> calling pci_disable_device() and pci_enable_device() during suspend and
> resume.
>
> Commit c03b3b0738a56cf283b0d05256988d5e3c8bd719 ("x86, irq, mpparse:
> Release IOAPIC pin when PCI device is disabled") frees PCI IRQ
> resources when pci_disable_device() is called and reallocate IRQ
> resources when pci_enable_device() is called again. This breaks
> above assumption. So commit 3eec595235c1 ("x86, irq, PCI: Keep IRQ
> assignment for PCI devices during suspend/hibernation") and
> 9eabc99a635a ("x86, irq, PCI: Keep IRQ assignment for runtime power
> management") fix the issue by avoiding freeing/reallocating IRQ
> resources during PCI device suspend/resume. They achieve this by
> checking dev.power.is_prepared and dev.power.runtime_status.
> PM maintainer, Rafael, then pointed out that it's really an ugly fix
> which leaking PM internal state information to IRQ subsystem.
If this only affects pciback, perhaps it would be best to just fix it there?
> Recently David Vrabel <david.vrabel@citrix.com> also reports an
> regression in pciback driver caused by commit cffe0a2b5a34 ("x86, irq:
> Keep balance of IOAPIC pin reference count"). Please refer to:
Sander reported this regression.
> So this patch refine the way to release PCI IRQ resources. Instead of
> releasing PCI IRQ resources in pci_disable_device()/
> pcibios_disable_device(), we now release it at driver unbinding
> notification BUS_NOTIFY_UNBOUND_DRIVER. In other word, we only release
> PCI IRQ resources when there's no driver bound to the PCI device, and
> it keeps the assumption that pci_dev->irq won't through multiple
> invocation of pci_enable_device()/pci_disable_device().
David
next prev parent reply other threads:[~2015-01-19 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 4:55 [Bugfix 0/3] Fix regressions in Xen IRQ management Jiang Liu
2015-01-19 4:55 ` [Bugfix 1/3] xen/irq, ACPI: Fix regression in xen PCI passthrough caused by cffe0a2b5a34 Jiang Liu
2015-01-19 4:55 ` [Bugfix 2/3] xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi Jiang Liu
2015-01-19 4:55 ` [Bugfix 3/3] x86/PCI: Refine the way to release PCI IRQ resources Jiang Liu
2015-01-19 14:24 ` David Vrabel [this message]
2015-01-19 14:31 ` Jiang Liu
2015-01-19 12:34 ` [Bugfix 0/3] Fix regressions in Xen IRQ management Sander Eikelenboom
2015-01-19 14:20 ` Jiang Liu
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=54BD138D.3090403@citrix.com \
--to=david.vrabel@citrix.com \
--cc=bhelgaas@google.com \
--cc=hpa@zytor.com \
--cc=jiang.liu@linux.intel.com \
--cc=konrad.wilk@oracle.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@eikelenboom.it \
--cc=mingo@redhat.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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).