Re: [PATCH v5 24/33] x86: Move declaration for mp_register_ioapic()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 3, 2014 at 1:24 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> On Thu, Jan 02, 2014 at 04:05:56PM -0800, Yinghai Lu wrote:
>> Address compiling problem that Fengguang report.
>
> Does this fix a problem that's already in the upstream tree?
>
> If it merely fixes a problem that was added somewhere in your patches,
> why don't you fold this fix into the patch that added the problem?
>
> If you included more details, like the exact problem report, I could
> probably have figured this out myself.

please check updated changelog:

---
Subject: [PATCH] x86: Move declaration for mp_register_ioapic()

Preparing patch for ioapic hotplug:
        PCI, x86, ACPI: Link acpi ioapic register to ioapic
as it adds calling in
        arch/x86/kernel/acpi/boot.c::acpi_register_ioapic()
                                     acpi_unregister_ioapic()

Address compiling problem when
 CONFIG_ACPI is defined
 CONFIG_X86_IOAPIC is not defined.

Change condition to X86_IO_APIC instead of ACPI.

-v2: update changelog requested by Bjorn.

-----
Subject: [PATCH] x86: Move declaration for mp_register_ioapic()

Preparing patch for ioapic hotplug:
	PCI, x86, ACPI: Link acpi ioapic register to ioapic
as it adds calling in
	arch/x86/kernel/acpi/boot.c::acpi_register_ioapic()
				     acpi_unregister_ioapic()

Address compiling problem when
 CONFIG_ACPI is defined
 CONFIG_X86_IOAPIC is not defined.

Change condition to X86_IO_APIC instead of ACPI.

-v2: update changelog requested by Bjorn.

Reported-by: Fengguang Wu <wfg@xxxxxxxxxxxxxxx>
Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
Cc: Jiang Liu <jiang.liu@xxxxxxxxxx>

---
 arch/x86/include/asm/io_apic.h |    1 -
 arch/x86/include/asm/mpspec.h  |   18 +++++++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/include/asm/mpspec.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/mpspec.h
+++ linux-2.6/arch/x86/include/asm/mpspec.h
@@ -95,10 +95,26 @@ static inline void early_reserve_e820_mp
 #endif
 
 int generic_processor_info(int apicid, int version);
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_X86_IO_APIC
 int __mp_register_ioapic(int id, u32 address, u32 gsi_base, bool hot);
 int mp_unregister_ioapic(u32 gsi_base);
 extern void mp_register_ioapic(int id, u32 address, u32 gsi_base);
+#else
+static inline int __mp_register_ioapic(int id, u32 address, u32 gsi_base,
+					 bool hot)
+{
+	return 0;
+}
+static inline int mp_unregister_ioapic(u32 gsi_base)
+{
+	return 0;
+}
+static inline void mp_register_ioapic(int id, u32 address, u32 gsi_base)
+{
+}
+#endif
+
+#ifdef CONFIG_ACPI
 extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
 				   u32 gsi);
 extern void mp_config_acpi_legacy_irqs(void);
Index: linux-2.6/arch/x86/include/asm/io_apic.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/io_apic.h
+++ linux-2.6/arch/x86/include/asm/io_apic.h
@@ -189,7 +189,6 @@ extern u32 gsi_top;
 int ioapic_gsi_to_irq(u32 gsi);
 int mp_find_ioapic(u32 gsi);
 int mp_find_ioapic_pin(int ioapic, u32 gsi);
-void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
 extern void __init pre_init_apic_IRQ0(void);
 
 extern void mp_save_irq(struct mpc_intsrc *m);

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux