All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-pci@vger.kernel.org,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86, irq: Keep IRQ assignment for PCI devices during suspend/hibernation, bisected
Date: Fri, 01 Aug 2014 20:27:23 +0800	[thread overview]
Message-ID: <53DB87AB.1000900@linux.intel.com> (raw)
In-Reply-To: <20140801105618.GA3857@nazgul.tnic>


On 2014/8/1 18:56, Borislav Petkov wrote:
> Ok,
> 
> so I went and looked at tip and which branches could be the usual
> suspects. And whaddya know, tip/x86/apic was the first to pick and it
> contained the culprit:
> 
> 6a38fa0e3c94 ("x86, irq, ACPI: Release IOAPIC pin when PCI device is disabled")
Hi Borislav,
	The above commit may cause failure of suspend/hiberrnation.
The reason is:
1) With recent changers, we dynamically allocate irq number for IOAPIC
   pins.
2) The allocated irq will be released when suspending/hibernating.
	pci_disable_device()->pcibios_disable_irq()
3) When resuming, a different irq may be assigned to the PCI device.
	pci_enable_device()->pcibios_enable_irq()
4) Now the hardware will deliver interrupt to the new allocated irq
   but the interrupt handler is still registered on old irq, so it
   breaks the driver and causes failure of hibernation.

The patch sent out by me is to fix this issue by keeping the allocated
irq when suspend/hibernate. And seems it works as expected.

But I still don't know why it causes IOMMU related warnings as:
AMD-Vi: Event logged [IO_PAGE_FAULT device=00:12.0 domain=0x0009
address=0x0000000000000000 flags=0x0000]

Regards!
Gerry
> 
> It seems like my machine doesn't like releasing the IOAPIC pin. Or,
> maybe it is IOMMU-related and the IOMMU doesn't like this releasing of
> the pin *after* the device gets suspended and *before* the IOMMU.
> 
> Strange.
> 
> Oh well, a well deserved lunch now :)
> 

  reply	other threads:[~2014-08-01 12:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140728175326.GA7100@pd.tnic>
2014-07-28 20:59 ` rc7 + tip/master suspend fun Rafael J. Wysocki
2014-07-28 21:02   ` Thomas Gleixner
2014-07-28 22:02     ` Rafael J. Wysocki
2014-07-29  2:17     ` Jiang Liu
2014-07-30  9:37     ` [PATCH] x86, irq: Keep IRQ assignment for PCI devices during suspend/hibernation Jiang Liu
2014-07-30 17:58       ` Borislav Petkov
2014-07-31  0:33         ` Jiang Liu
2014-07-31 10:39           ` Borislav Petkov
2014-07-31 14:41             ` Jiang Liu
2014-07-31 14:41               ` Jiang Liu
2014-07-31 15:21               ` Borislav Petkov
2014-07-31 15:21                 ` Borislav Petkov
2014-07-31 16:36             ` Jiang Liu
2014-07-31 16:56               ` Borislav Petkov
2014-08-01 10:56                 ` [PATCH] x86, irq: Keep IRQ assignment for PCI devices during suspend/hibernation, bisected Borislav Petkov
2014-08-01 12:27                   ` Jiang Liu [this message]
2014-08-01 14:39                     ` Borislav Petkov
2014-08-01 16:11                       ` Borislav Petkov
2014-08-01 22:14                         ` Jörg Rödel
2014-08-01 22:50                           ` Borislav Petkov
2014-08-02  2:25                             ` [PATCH] iommu/amd: Implement syscore_ops.shutdown() Jiang Liu
2014-08-02  2:25                               ` Jiang Liu
2014-08-04 10:12                               ` Borislav Petkov
2014-08-04 10:12                                 ` Borislav Petkov

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=53DB87AB.1000900@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --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 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.