All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Alex Williamson <alex.williamson@redhat.com>,
	Jiang Liu <jiang.liu@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>, "Zheng, Lv" <lv.zheng@intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"yinghai@kernel.org" <yinghai@kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] x86/PCI: Fully disable devices before releasing IRQ resource
Date: Wed, 11 Mar 2015 22:04:42 +0000	[thread overview]
Message-ID: <3908561D78D1C84285E8C5FCA982C28F32A0E2E2@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <2139068.CEUJTvBkYG@vostro.rjw.lan>

>> Unfortunately there's a long standing comment in pci_device_remove():
>> 
>>         /*
>>          * We would love to complain here if pci_dev->is_enabled is set, that
>>          * the driver should have called pci_disable_device(), but the
>>          * unfortunate fact is there are too many odd BIOS and bridge setups
>>          * that don't like drivers doing that all of the time.
>>          * Oh well, we can dream of sane hardware when we sleep, no matter how
>>          * horrible the crap we have to deal with is when we are awake...
>>          */
>> 
>> So, unless we can somehow ignore that comment, I suspect forcing the
>> device to be disabled on driver remove, whether done from pci-core or
>> from x86/pci, is going to cause all sorts of breakage.  Are the
>> expectations set by b4b55cda5874 really valid?  It seems like something
>> needs to be done to allow the IRQ to be automatically re-established on
>> x86 regardless of the driver doing the right thing when releasing the
>> device.  We're still looking at a regression for v4.0 as a result of
>> b4b55cda5874.
>
> In which case we probably should revert commit b4b55cda5874 for the time being.
>
> At least I'd be very nervous about any ad-hoc fixes at this stage of the cycle.

The comment goes back to the dawn of "git" time ... not sure how much further
back.

Is this actually still an issue on modern systems?  Maybe we need a black list
or white list to separate the good from bad systems?

-Tony

WARNING: multiple messages have this Message-ID (diff)
From: "Luck, Tony" <tony.luck@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Alex Williamson <alex.williamson@redhat.com>,
	Jiang Liu <jiang.liu@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>, "Zheng, Lv" <lv.zheng@intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"yinghai@kernel.org" <yinghai@kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] x86/PCI: Fully disable devices before releasing IRQ resource
Date: Wed, 11 Mar 2015 22:04:42 +0000	[thread overview]
Message-ID: <3908561D78D1C84285E8C5FCA982C28F32A0E2E2@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <2139068.CEUJTvBkYG@vostro.rjw.lan>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1647 bytes --]

>> Unfortunately there's a long standing comment in pci_device_remove():
>> 
>>         /*
>>          * We would love to complain here if pci_dev->is_enabled is set, that
>>          * the driver should have called pci_disable_device(), but the
>>          * unfortunate fact is there are too many odd BIOS and bridge setups
>>          * that don't like drivers doing that all of the time.
>>          * Oh well, we can dream of sane hardware when we sleep, no matter how
>>          * horrible the crap we have to deal with is when we are awake...
>>          */
>> 
>> So, unless we can somehow ignore that comment, I suspect forcing the
>> device to be disabled on driver remove, whether done from pci-core or
>> from x86/pci, is going to cause all sorts of breakage.  Are the
>> expectations set by b4b55cda5874 really valid?  It seems like something
>> needs to be done to allow the IRQ to be automatically re-established on
>> x86 regardless of the driver doing the right thing when releasing the
>> device.  We're still looking at a regression for v4.0 as a result of
>> b4b55cda5874.
>
> In which case we probably should revert commit b4b55cda5874 for the time being.
>
> At least I'd be very nervous about any ad-hoc fixes at this stage of the cycle.

The comment goes back to the dawn of "git" time ... not sure how much further
back.

Is this actually still an issue on modern systems?  Maybe we need a black list
or white list to separate the good from bad systems?

-Tony
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

WARNING: multiple messages have this Message-ID (diff)
From: "Luck, Tony" <tony.luck@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Alex Williamson <alex.williamson@redhat.com>,
	Jiang Liu <jiang.liu@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>, "Zheng, Lv" <lv.zheng@intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"yinghai@kernel.org" <yinghai@kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] x86/PCI: Fully disable devices before releasing IRQ resource
Date: Wed, 11 Mar 2015 22:04:42 +0000	[thread overview]
Message-ID: <3908561D78D1C84285E8C5FCA982C28F32A0E2E2@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <2139068.CEUJTvBkYG@vostro.rjw.lan>

Pj4gVW5mb3J0dW5hdGVseSB0aGVyZSdzIGEgbG9uZyBzdGFuZGluZyBjb21tZW50IGluIHBjaV9k
ZXZpY2VfcmVtb3ZlKCk6DQo+PiANCj4+ICAgICAgICAgLyoNCj4+ICAgICAgICAgICogV2Ugd291
bGQgbG92ZSB0byBjb21wbGFpbiBoZXJlIGlmIHBjaV9kZXYtPmlzX2VuYWJsZWQgaXMgc2V0LCB0
aGF0DQo+PiAgICAgICAgICAqIHRoZSBkcml2ZXIgc2hvdWxkIGhhdmUgY2FsbGVkIHBjaV9kaXNh
YmxlX2RldmljZSgpLCBidXQgdGhlDQo+PiAgICAgICAgICAqIHVuZm9ydHVuYXRlIGZhY3QgaXMg
dGhlcmUgYXJlIHRvbyBtYW55IG9kZCBCSU9TIGFuZCBicmlkZ2Ugc2V0dXBzDQo+PiAgICAgICAg
ICAqIHRoYXQgZG9uJ3QgbGlrZSBkcml2ZXJzIGRvaW5nIHRoYXQgYWxsIG9mIHRoZSB0aW1lLg0K
Pj4gICAgICAgICAgKiBPaCB3ZWxsLCB3ZSBjYW4gZHJlYW0gb2Ygc2FuZSBoYXJkd2FyZSB3aGVu
IHdlIHNsZWVwLCBubyBtYXR0ZXIgaG93DQo+PiAgICAgICAgICAqIGhvcnJpYmxlIHRoZSBjcmFw
IHdlIGhhdmUgdG8gZGVhbCB3aXRoIGlzIHdoZW4gd2UgYXJlIGF3YWtlLi4uDQo+PiAgICAgICAg
ICAqLw0KPj4gDQo+PiBTbywgdW5sZXNzIHdlIGNhbiBzb21laG93IGlnbm9yZSB0aGF0IGNvbW1l
bnQsIEkgc3VzcGVjdCB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XJuIHN5c3RlbXM/
ICBNYXliZSB3ZSBuZWVkIGEgYmxhY2sgbGlzdA0Kb3Igd2hpdGUgbGlzdCB0byBzZXBhcmF0ZSB0
aGUgZ29vZCBmcm9tIGJhZCBzeXN0ZW1zPw0KDQotVG9ueQ0K

  reply	other threads:[~2015-03-11 22:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 21:06 [PATCH] x86/PCI: Fully disable devices before releasing IRQ resource Alex Williamson
2015-03-06  1:49 ` Jiang Liu
2015-03-06  3:51   ` Alex Williamson
2015-03-11 16:47     ` Alex Williamson
2015-03-11 22:04       ` Rafael J. Wysocki
2015-03-11 22:04         ` Luck, Tony [this message]
2015-03-11 22:04           ` Luck, Tony
2015-03-11 22:04           ` Luck, Tony
2015-03-12  1:17           ` Rafael J. Wysocki
2015-03-12  1:41             ` Jiang Liu
2015-03-12 16:08               ` Rafael J. Wysocki
2015-03-13  1:49                 ` Jiang Liu
2015-03-13  2:06       ` [Bugfix] x86/PCI: Release PCI IRQ resource only if PCI device is disabled when unbinding Jiang Liu
2015-03-13 21:45         ` 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=3908561D78D1C84285E8C5FCA982C28F32A0E2E2@ORSMSX113.amr.corp.intel.com \
    --to=tony.luck@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@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 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.