diff mbox

[v9,09/16] PCI, x86: implement pcibios_{add|remove}_bus() hooks

Message ID 1365781470-32379-10-git-send-email-jiang.liu@huawei.com
State Accepted
Headers show

Commit Message

Jiang Liu April 12, 2013, 3:44 p.m. UTC
Implement pcibios_{add|remove}_bus() hooks for x86 platforms.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Myron Stowe <myron.stowe@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: x86@kernel.org
---
 arch/x86/pci/common.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

David Rientjes April 16, 2013, 8:27 p.m. UTC | #1
On Fri, 12 Apr 2013, Jiang Liu wrote:

> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
> index 901177d..305c68b 100644
> --- a/arch/x86/pci/common.c
> +++ b/arch/x86/pci/common.c
> @@ -6,6 +6,7 @@
>  
>  #include <linux/sched.h>
>  #include <linux/pci.h>
> +#include <linux/pci-acpi.h>
>  #include <linux/ioport.h>
>  #include <linux/init.h>
>  #include <linux/dmi.h>
> @@ -170,6 +171,16 @@ void pcibios_fixup_bus(struct pci_bus *b)
>  		pcibios_fixup_device_resources(dev);
>  }
>  
> +void pcibios_add_bus(struct pci_bus *bus)
> +{
> +	acpi_pci_add_bus(bus);
> +}
> +
> +void pcibios_remove_bus(struct pci_bus *bus)
> +{
> +	acpi_pci_remove_bus(bus);
> +}
> +
>  /*
>   * Only use DMI information to set this if nothing was passed
>   * on the kernel command line (which was parsed earlier).

This causes build errors when CONFIG_ACPI isn't enabled since both 
acpi_pci_{add,remove}_bus() aren't defined in such a configuration:

arch/x86/pci/common.c: In function 'pcibios_add_bus':
arch/x86/pci/common.c:176:2: error: implicit declaration of function 'acpi_pci_add_bus'
arch/x86/pci/common.c: In function 'pcibios_remove_bus':
arch/x86/pci/common.c:181:2: error: implicit declaration of function 'acpi_pci_remove_bus'
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjorn Helgaas April 16, 2013, 10:35 p.m. UTC | #2
On Tue, Apr 16, 2013 at 2:27 PM, David Rientjes <rientjes@google.com> wrote:
> On Fri, 12 Apr 2013, Jiang Liu wrote:
>
>> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
>> index 901177d..305c68b 100644
>> --- a/arch/x86/pci/common.c
>> +++ b/arch/x86/pci/common.c
>> @@ -6,6 +6,7 @@
>>
>>  #include <linux/sched.h>
>>  #include <linux/pci.h>
>> +#include <linux/pci-acpi.h>
>>  #include <linux/ioport.h>
>>  #include <linux/init.h>
>>  #include <linux/dmi.h>
>> @@ -170,6 +171,16 @@ void pcibios_fixup_bus(struct pci_bus *b)
>>               pcibios_fixup_device_resources(dev);
>>  }
>>
>> +void pcibios_add_bus(struct pci_bus *bus)
>> +{
>> +     acpi_pci_add_bus(bus);
>> +}
>> +
>> +void pcibios_remove_bus(struct pci_bus *bus)
>> +{
>> +     acpi_pci_remove_bus(bus);
>> +}
>> +
>>  /*
>>   * Only use DMI information to set this if nothing was passed
>>   * on the kernel command line (which was parsed earlier).
>
> This causes build errors when CONFIG_ACPI isn't enabled since both
> acpi_pci_{add,remove}_bus() aren't defined in such a configuration:
>
> arch/x86/pci/common.c: In function 'pcibios_add_bus':
> arch/x86/pci/common.c:176:2: error: implicit declaration of function 'acpi_pci_add_bus'
> arch/x86/pci/common.c: In function 'pcibios_remove_bus':
> arch/x86/pci/common.c:181:2: error: implicit declaration of function 'acpi_pci_remove_bus'

Thanks for the report!

I'm pretty sure I fixed this:
http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?h=pci/jiang-subdrivers&id=3b63aaa70e1ccc4b66d60acc78da09700706a703

The acpi_pci_add_bus()/acpi_pci_remove_bus() stubs for CONFIG_ACPI=n
were added early in the series (patch 07/16: "PCI/ACPI: Prepare stub
functions to handle ACPI PCI (hotplug) slots") but were mistakenly
removed in patch 12/16: "PCI: acpiphp: Do not use ACPI PCI subdriver
mechanism".

I updated my "next" branch with the fixed version of patch 12/16, so
the 20130417 linux-next tree should have the fix.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiang Liu April 17, 2013, midnight UTC | #3
On 04/17/2013 04:27 AM, David Rientjes wrote:
> On Fri, 12 Apr 2013, Jiang Liu wrote:
> 
>> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
>> index 901177d..305c68b 100644
>> --- a/arch/x86/pci/common.c
>> +++ b/arch/x86/pci/common.c
>> @@ -6,6 +6,7 @@
>>  
>>  #include <linux/sched.h>
>>  #include <linux/pci.h>
>> +#include <linux/pci-acpi.h>
>>  #include <linux/ioport.h>
>>  #include <linux/init.h>
>>  #include <linux/dmi.h>
>> @@ -170,6 +171,16 @@ void pcibios_fixup_bus(struct pci_bus *b)
>>  		pcibios_fixup_device_resources(dev);
>>  }
>>  
>> +void pcibios_add_bus(struct pci_bus *bus)
>> +{
>> +	acpi_pci_add_bus(bus);
>> +}
>> +
>> +void pcibios_remove_bus(struct pci_bus *bus)
>> +{
>> +	acpi_pci_remove_bus(bus);
>> +}
>> +
>>  /*
>>   * Only use DMI information to set this if nothing was passed
>>   * on the kernel command line (which was parsed earlier).
> 
> This causes build errors when CONFIG_ACPI isn't enabled since both 
> acpi_pci_{add,remove}_bus() aren't defined in such a configuration:
> 
> arch/x86/pci/common.c: In function 'pcibios_add_bus':
> arch/x86/pci/common.c:176:2: error: implicit declaration of function 'acpi_pci_add_bus'
> arch/x86/pci/common.c: In function 'pcibios_remove_bus':
> arch/x86/pci/common.c:181:2: error: implicit declaration of function 'acpi_pci_remove_bus'
> 
Hi David,
	Thanks for report, I have sent a patch to Bjorn to fix this issue,
and it should have been fixed in Bjorn's git tree.
	Regards!
	Gerry


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Rientjes April 17, 2013, 8:49 p.m. UTC | #4
On Tue, 16 Apr 2013, Bjorn Helgaas wrote:

> Thanks for the report!
> 
> I'm pretty sure I fixed this:
> http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?h=pci/jiang-subdrivers&id=3b63aaa70e1ccc4b66d60acc78da09700706a703
> 
> The acpi_pci_add_bus()/acpi_pci_remove_bus() stubs for CONFIG_ACPI=n
> were added early in the series (patch 07/16: "PCI/ACPI: Prepare stub
> functions to handle ACPI PCI (hotplug) slots") but were mistakenly
> removed in patch 12/16: "PCI: acpiphp: Do not use ACPI PCI subdriver
> mechanism".
> 
> I updated my "next" branch with the fixed version of patch 12/16, so
> the 20130417 linux-next tree should have the fix.
> 

Confirmed it's fixed, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 901177d..305c68b 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -6,6 +6,7 @@ 
 
 #include <linux/sched.h>
 #include <linux/pci.h>
+#include <linux/pci-acpi.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/dmi.h>
@@ -170,6 +171,16 @@  void pcibios_fixup_bus(struct pci_bus *b)
 		pcibios_fixup_device_resources(dev);
 }
 
+void pcibios_add_bus(struct pci_bus *bus)
+{
+	acpi_pci_add_bus(bus);
+}
+
+void pcibios_remove_bus(struct pci_bus *bus)
+{
+	acpi_pci_remove_bus(bus);
+}
+
 /*
  * Only use DMI information to set this if nothing was passed
  * on the kernel command line (which was parsed earlier).