x86/pci: don't set acpi stuff if !CONFIG_ACPI
PATCH 1/1 x86/pci: don't set acpi stuff if !CONFIG_ACPI
Not that x86 without ACPI sees any real use...
---
Found by randconfig builds.
arch/x86/pci/intel_mid_pci.c | 2 ++ arch/x86/pci/xen.c | 2 ++ 2 files changed, 4 insertions(+)
arch/x86/pci/intel_mid_pci.c +2 -0
@@ -299,8 +299,10 @@ int __init intel_mid_pci_init(void) pcibios_disable_irq = intel_mid_pci_irq_disable; pci_root_ops = intel_mid_pci_ops; pci_soc_mode =1 ; +#ifdef CONFIG_ACPI /* Continue with standard init */ acpi_noirq_set (); +#endif return 1 ; }
arch/x86/pci/xen.c +2 -0
@@ -406,8 +406,10 @@ int __init pci_xen_init(void) pcibios_enable_irq = xen_pcifront_enable_irq; pcibios_disable_irq =NULL ; +#ifdef CONFIG_ACPI /* Keep ACPI out of the picture */ acpi_noirq_set (); +#endif #ifdef CONFIG_PCI_MSI x86_msi.setup_msi_irqs = xen_setup_msi_irqs;
Signature · 1 line
2.28.0
Quoted 5 lines · Adam Borowski
Not that x86 without ACPI sees any real use...
Signed-off-by Adam Borowski <[email protected]>---
Found by randconfig builds.
Note that
#include <asm/acpi.h>
has a stub for acpi_noirq_set() when ACPI is not set/enabled. That would be better. And I have submitted that for arch/x86/pci/xen.c -- and a different patch for intel_mid_pci.c
But I didn't submit them to the X86 maintainers because the MAINTAINERS file pointed me to the PCI maintainer and to the XEN PCI maintainer....
Quoted 36 lines
arch/x86/pci/intel_mid_pci.c | 2 ++ arch/x86/pci/xen.c | 2 ++ 2 files changed, 4 insertions(+)arch/x86/pci/intel_mid_pci.c +2
-0@@ -299,8 +299,10 @@ int __init intel_mid_pci_init(void) pcibios_disable_irq = intel_mid_pci_irq_disable; pci_root_ops = intel_mid_pci_ops; pci_soc_mode =1 ; +#ifdef CONFIG_ACPI /* Continue with standard init */ acpi_noirq_set (); +#endif return 1 ; }arch/x86/pci/xen.c +2
-0@@ -406,8 +406,10 @@ int __init pci_xen_init(void) pcibios_enable_irq = xen_pcifront_enable_irq; pcibios_disable_irq =NULL ; +#ifdef CONFIG_ACPI /* Keep ACPI out of the picture */ acpi_noirq_set (); +#endif #ifdef CONFIG_PCI_MSI x86_msi.setup_msi_irqs = xen_setup_msi_irqs;
Signature · 2 lines
~Randy Reported-by: Randy Dunlap <[email protected]>
Quoted 15 lines · Adam Borowski
Not that x86 without ACPI sees any real use...
Signed-off-by Adam Borowski <[email protected]>---
Found by randconfig builds.arch/x86/pci/intel_mid_pci.c | 2 ++ arch/x86/pci/xen.c | 2 ++ 2 files changed, 4 insertions(+)arch/x86/pci/intel_mid_pci.c +0
-0
arch/x86/pci/intel_mid_pci.c int __init intel_mid_pci_init(void) · line 305
Quoted 7 lines
arch/x86/pci/intel_mid_pci.c +2
-0@@ -299,8 +299,10 @@ int __init intel_mid_pci_init(void) pcibios_disable_irq = intel_mid_pci_irq_disable; pci_root_ops = intel_mid_pci_ops; pci_soc_mode =1 ; +#ifdef CONFIG_ACPI /* Continue with standard init */ acpi_noirq_set (); +#endif
If CONFIG_ACPI=n then acpi_noirq_set() is an empty stub inline. So I'm not sure what you are trying to solve here.
Ah, I see with CONFIG_ACPI=n linux/acpi.h does not include asm/acpi.h so the stubs are unreachable. So that needs to be fixed and not papered over with #ifdeffery
Thanks,
tglx
Quoted 17 lines · Thomas Gleixner
arch/x86/pci/intel_mid_pci.c int __init intel_mid_pci_init(void) · line 302
Quoted 12 lines · Adam Borowski
Found by randconfig builds.
arch/x86/pci/intel_mid_pci.c | 2 ++ arch/x86/pci/xen.c | 2 ++arch/x86/pci/intel_mid_pci.c +2
-0@@ -299,8 +299,10 @@ int __init intel_mid_pci_init(void) +#ifdef CONFIG_ACPI /* Continue with standard init */ acpi_noirq_set (); +#endif If
CONFIG_ACPI=nthenacpi_noirq_set()is an empty stub inline. So I'm not sure what you are trying to solve here.
Quoted 3 lines
Ah, I see with
CONFIG_ACPI=nlinux/acpi.hdoes not includeasm/acpi.hso the stubs are unreachable. So that needs to be fixed and not papered over with #ifdeffery
If I understand Randy Dunlap correctly, he already sent a pair of patches that do what you want.
Meow.
Signature · 4 lines
⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ ⢿⡄⠘⠷⠚⠋⠀ It's time to migrate your Imaginary Protocol from version 4i to 6i. ⠈⠳⣄⠀⠀⠀⠀
Quoted 18 lines · Adam Borowski
Quoted 17 lines · Thomas Gleixner
arch/x86/pci/intel_mid_pci.c int __init intel_mid_pci_init(void) · line 302
Quoted 12 lines · Adam Borowski
Found by randconfig builds.
arch/x86/pci/intel_mid_pci.c | 2 ++ arch/x86/pci/xen.c | 2 ++arch/x86/pci/intel_mid_pci.c +2
-0@@ -299,8 +299,10 @@ int __init intel_mid_pci_init(void) +#ifdef CONFIG_ACPI /* Continue with standard init */ acpi_noirq_set (); +#endif If
CONFIG_ACPI=nthenacpi_noirq_set()is an empty stub inline. So I'm not sure what you are trying to solve here.
Quoted 6 lines
Quoted 3 lines
Ah, I see with
CONFIG_ACPI=nlinux/acpi.hdoes not includeasm/acpi.hso the stubs are unreachable. So that needs to be fixed and not papered over with #ifdefferyIf I understand Randy Dunlap correctly, he already sent a pair of patches that do what you want.
I did, but I sent them to the Xen and PCI maintainers, not the x86 maintainers, but I will happily resend this patch. The Xen patch has already been applied whereas the patch to intel_mid_pci.c is in limbo. :(
Thomas, do you want me to send it to you/X86 people? (with 2 Reviewed-by: additions)
thanks.
Signature · 1 line
~Randy
Thomas Gleixner
Acked-byQuoted 3 lines · Randy Dunlap
Quoted 2 lines · Adam Borowski
If I understand Randy Dunlap correctly, he already sent a pair of patches that do what you want.
I replied before reading Randy's reply. Old habit of reading stuff from top and not getting biased by other peoples replies before doing so. Is most of the time the correct approach, but sometimes it would be better to do it the other way round :)
Quoted 7 lines
I did, but I sent them to the Xen and PCI maintainers, not the x86 maintainers, but I will happily resend this patch. The Xen patch has already been applied whereas the patch to
intel_mid_pci.cis in limbo. :(Thomas, do you want me to send it to you/X86 people? (with 2 Reviewed-by: additions)
Sure, but usually Bjorn handles the x86/pci/ stuff.
As I trust you, here is a blind
just in case.
Thanks,
tglx