Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757687Ab3FLTlp (ORCPT ); Wed, 12 Jun 2013 15:41:45 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:47420 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757036Ab3FLTln (ORCPT ); Wed, 12 Jun 2013 15:41:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130329032200.GA11990@google.com> <20130401235256.GA31966@google.com> Date: Wed, 12 Jun 2013 12:41:42 -0700 X-Google-Sender-Auth: jJxmUivHs7JN9alqo-RmPQtuD5A Message-ID: Subject: Re: [PATCH] PCI: Remove not needed check in disable aspm link From: Yinghai Lu To: Bjorn Helgaas Cc: Jiang Liu , Roman Yepishev , "Rafael J. Wysocki" , "linux-pci@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linus Torvalds , Andrew Morton , Greg Kroah-Hartman Content-Type: multipart/mixed; boundary=20cf302235d90429f504defa340c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 21067 Lines: 309 --20cf302235d90429f504defa340c Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jun 12, 2013 at 10:05 AM, Bjorn Helgaas wrote: >> current code from acpi_pci_root_add we have >> 1. pci_acpi_scan_root >> ==> pci devices enumeration and bus scanning. >> ==> pci_alloc_child_bus >> ==> pcibios_add_bus >> ==> acpi_pci_add_bus >> ==> acpiphp_enumerate_slots >> ==> ...==> register_slot >> ==> device_is_managed_by_native_pciehp >> ==> check osc_set with >> OSC_PCI_EXPRESS_NATIVE_HP_CONTROL >> 2. _OSC set request >> >> so we always have acpiphp hotplug slot registered at first. >> >> so either we need to >> A. revert reverting about _OSC >> B. move pcibios_add_bus down to pci_bus_add_devices() >> as acpiphp and apci pci slot driver are some kind of drivers for pci_bus >> C. A+B > > It doesn't surprise me at all that there are problems in the _OSC code > and the acpiphp/pciehp interaction. That whole area is a complete > disaster. It'd really be nice if somebody stepped up and reworked it > so it makes sense. > > But this report is useless to me. I don't have time to work out what > the problem is and how it affects users and come up with a fix. effects: without fix the problem, user can not use pcie native hotplug if their system's firmware support acpihp and pciehp. And make it worse, that acpiphp have to be built-in, so they have no way to blacklist acpiphp in config. > > My advice is to simplify the path first, and worry about fixing the > bug afterwards. We've already done several iterations of fiddling > with things, and I think all we're doing is playing "whack-a-mole" and > pushing the bugs around from one place to another. We need to address regression at first. my suggestion is : revert the reverting and apply my -v3 version that will fix regression that Roman Yepishev met. please check attached two patches, hope it could save your some time. Yinghai --20cf302235d90429f504defa340c Content-Type: application/octet-stream; name="revert_revert_osc_change_linus.patch" Content-Disposition: attachment; filename="revert_revert_osc_change_linus.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hhux8rnh0 U3ViamVjdDogW1BBVENIXSBBQ1BJLCBQQ0k6IFJldmVydCByZXZlcnRpbmcgb2YgIlBDSS9BQ1BJ OiBSZXF1ZXN0IF9PU0MgY29udHJvbCBiZWZvcmUgc2Nhbm5pbmcgUENJIHJvb3QgYnVzIgoKSW4K fCBjb21taXQgYjgxNzhmMTMwZTI1YzFiZGFjMWMzM2UwOTk2ZjFmZjZlMjBlYzA4ZQp8IEF1dGhv cjogQmpvcm4gSGVsZ2FhcyA8YmhlbGdhYXNAZ29vZ2xlLmNvbT4KfCBEYXRlOiAgIE1vbiBBcHIg MSAxNTo0NzozOSAyMDEzIC0wNjAwCnwKfCAgICBSZXZlcnQgIlBDSS9BQ1BJOiBSZXF1ZXN0IF9P U0MgY29udHJvbCBiZWZvcmUgc2Nhbm5pbmcgUENJIHJvb3QgYnVzIgp8CnwgICAgVGhpcyByZXZl cnRzIGNvbW1pdCA4YzMzZjUxZGY0MDZlMWExZjdmYTRlOWIyNDQ4NDViN2ViZDYxZmE2Lgpmb3Ig djMuOSwgIk9TQyBzZXQgZWFybHkiIGlzIHJldmVydGVkLgoKTm93IHdlIG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hY3BpX2FkZF9idXNfcG1fbm90aWZpZXIoZGV2aWNlLCByb290LT5idXMp Owo= --20cf302235d90429f504defa340c Content-Type: application/octet-stream; name="disable_aspm_3_linus.patch" Content-Disposition: attachment; filename="disable_aspm_3_linus.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hhux9aw61 U3ViamVjdDogW1BBVENIXSBQQ0k6IFJlbW92ZSBub3QgbmVlZGVkIGNoZWNrIGluIGRpc2FibGUg YXNwbSBsaW5rCgpSb21hbiByZXBvcnRlZCBhdGg1ayBkb2VzIG5vdCB3b3JrIGFueW1vcmUgb24g My44LgpCaXNlY3RlZCB0bwp8IGNvbW1pdCA4YzMzZjUxZGY0MDZlMWExZjdmYTRlOWIyNDQ4NDVi N2ViZDYxZmE2CnwgQXV0aG9yOiBUYWt1IEl6dW1pIDxpenVtaS50YWt1QGpwLmZ1aml0c3UuY29t Pgp8IERhdGU6ICAgVHVlIE9jdCAzMCAxNToyNzoxMyAyMDEyICswOTAwCnwKfCAgICBQQ0kvQUNQ STogUmVxdWVzdCBfT1NDIGNvbnRyb2wgYmVmb3JlIHNjYW5uaW5nIFBDSSByb290IGJ1cwp8Cnwg ICAgVGhpcyBwYXRjaCBtb3ZlcyB1cCB0aGUgY29kZSBibG9jayB0byByZXF1ZXN0IF9PU0MgY29u dHJvbCBpbiBvcmRlciB0bwp8ICAgIHNlcGFyYXRlIEFDUEkgd29yayBhbmQgUENJIHdvcmsgaW4g YWNwaV9wY2lfcm9vdF9hZGQoKS4KCkl0IG1ha2UgcGNpZV9hc3BtX3Nhbml0eV9jaGVjayBkb2Vz IG5vdCB3b3JrIGFueW1vcmUgYXMgYXNwbV9kaXNhYmxlZAppcyBzZXQgYmVmb3JlIHBjaSByb290 IGJ1cyBzY2FubmluZy4KCkJqb3JuIHJldmVydCB0aGF0IGZvciB2My45LCBhbmQgdGhhdCB3aWxs IG1ha2UgYm9vdGluZyBwYXRoIGFuZCBob3RwbHVnCnBhdGggd2l0aCBkaWZmZ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GJvb2wgcGNpZV9h c3BtX3N1cHBvcnRfZW5hYmxlZCh2b2lkKSB7IHJldHVybiBmYWxzZTsgfQogI2Vsc2UKIGludCBw Y2llX2FzcG1fZW5hYmxlZCh2b2lkKTsKLWJvb2wgcGNpZV9hc3BtX3N1cHBvcnRfZW5hYmxlZCh2 b2lkKTsKK3N0YXRpYyBpbmxpbmUgYm9vbCBwY2llX2FzcG1fc3VwcG9ydF9lbmFibGVkKHZvaWQp IHsgcmV0dXJuIHRydWU7IH0KICNlbmRpZgogCiAjaWZkZWYgQ09ORklHX1BDSUVBRVIK --20cf302235d90429f504defa340c-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/