mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH][tentative] PCI / ACPI: Rework PCI host bridge removal to avoid sysfs warnings
Date: Fri, 03 Jan 2014 01:45:28 +0100	[thread overview]
Message-ID: <2459491.HIKjAnF27k@vostro.rjw.lan> (raw)
In-Reply-To: <CAE9FiQXQuX5EOE1jbXfK+G1mf9q=4-fpw1jNs38sza9tcPtqMg@mail.gmail.com>

On Thursday, January 02, 2014 02:47:04 PM Yinghai Lu wrote:
> On Tue, Dec 31, 2013 at 1:03 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Tuesday, December 31, 2013 10:45:46 AM Yinghai Lu wrote:
> >> On Mon, Dec 30, 2013 at 5:15 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> >> > On Monday, December 30, 2013 01:51:28 PM Rafael J. Wysocki wrote:
> >> >> > We have patches that need to stop ioapic and iommu between
> >> >> > pci_stop_root_bus and pci_remove_root_bus.
> >> >
> >> > BTW, what *exactly* do they need to be stopped between?  After these two patches:
> >>
> >> need to stop regular pci drivers before stop "driver" for ioapic/dmar.
> >>
> >> >
> >> >> > Please check if the problem still happen after
> >> >> >
> >> >> > http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/patch/?id=c4a0a5d964e90b93eb4101c3927b788e083e530f
> >> >> >
> >> >> > http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/patch/?id=e3b439e1d315aff59c1b4f0fc43c5cd2d82b4138
> >> >
> >> > pci_stop_root_bus() is just a walk over devices on the root bus stopping
> >> > them and pci_remove_root_bus() starts with the removal of those devices.
> >> >
> >> > Surely, those two list walks can be combined into one?
> >>
> >> maybe ok, but we have to problem to make sure stop pci drivers before
> >> "driver" for ioapic/dmar.
> >
> > That's fine, but ioapic/dmar stopping need not happen between the stopping of
> > drivers and removing of devices on the root bus I suppose?
> >
> > Actually, I think that the ioapic/dmar stopping should be carried out after
> > removing all of the root bus devices, or it can be racy with respect to a
> > driver reload.  Isn't that the case?
> 
> No. It should be before removing all root bus devices.
> as they need to access the pci devices during stop ioapic and dmar.
> 
> Also ioapic itself could one one pci device.

Well, if we stop drivers first, then stop ioapic/dmar and *then* remove
devices, it is possible to rebind a driver to a device after ioapic/dmar has
been stopped, which I guess will not lead to anything nice?

Rafael


  reply	other threads:[~2014-01-03  0:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28 23:20 Rafael J. Wysocki
2013-12-29  3:59 ` Greg Kroah-Hartman
2013-12-30  3:30 ` Yinghai Lu
2013-12-30 12:51   ` Rafael J. Wysocki
2013-12-30 13:15     ` Rafael J. Wysocki
2013-12-31 18:45       ` Yinghai Lu
2013-12-31 21:03         ` Rafael J. Wysocki
2014-01-02 22:47           ` Yinghai Lu
2014-01-03  0:45             ` Rafael J. Wysocki [this message]
2014-01-06 19:28               ` Yinghai Lu
2014-01-06 20:41                 ` Rafael J. Wysocki
2014-01-08 23:41                   ` Yinghai Lu
2014-01-09  0:10                     ` Rafael J. Wysocki

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=2459491.HIKjAnF27k@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=yinghai@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

all inboxes | Powered by JetHome®