Re: [tip:x86/platform] x86: Unify current 3 similar ways of savingIRQ info

From: Feng Tang
Date: Tue Dec 07 2010 - 00:34:26 EST


On Tue, 7 Dec 2010 01:50:36 +0800
Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> On 12/06/2010 07:01 AM, tip-bot for Feng Tang wrote:
> > Commit-ID: a6427a341985e0379060c86b50fcdb59883e4102
> > Gitweb:
> > http://git.kernel.org/tip/a6427a341985e0379060c86b50fcdb59883e4102
> > Author: Feng Tang <feng.tang@xxxxxxxxx> AuthorDate: Fri, 3 Dec
> > 2010 12:11:58 +0800 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > CommitDate: Mon, 6 Dec 2010 15:58:26 +0100
> >
> > x86: Unify current 3 similar ways of saving IRQ info
> >
> > There are 3 places defining the similar function of saving IRQ
> > vector info into mp_irqs[] array: mmparse/acpi/mrst. This patch
> > will reduce the redundant code, and make it only one API:
> > void mp_save_irq(struct mpc_intsrc *m);
> >
> > Signed-off-by: Feng Tang <feng.tang@xxxxxxxxx>
> > Cc: Alan Cox <alan@xxxxxxxxxxxxxxx>
> > Cc: Len Brown <len.brown@xxxxxxxxx>
> > LKML-Reference:
> > <1291349518-3502-1-git-send-email-feng.tang@xxxxxxxxx>
> > Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> ---
> > arch/x86/include/asm/mpspec.h | 6 ++++++
> > arch/x86/kernel/acpi/boot.c | 32
> > +++----------------------------- arch/x86/kernel/mpparse.c |
> > 14 +++++++------- arch/x86/platform/mrst/mrst.c | 30
> > ++---------------------------- 4 files changed, 18 insertions(+),
> > 64 deletions(-)
> >
>
> it breaks compiling when CONFIG_X86_MPPARSE is not defined.
>
> obj-$(CONFIG_X86_MPPARSE) += mpparse.o
>
>
> config X86_MPPARSE
> bool "Enable MPS table" if ACPI
> default y
> depends on X86_LOCAL_APIC
> ---help---
> For old smp systems that do not have proper acpi support.
> Newer systems (esp with 64bit cpus) with acpi support, MADT and DSDT
> will override it
>
>
>
> Yinghai

Thanks for the good catch! I only tried allyes/allno/allmod/def configs.

How about move the code into io_apic.c as mp_save_irq() only will get
called when CONFIG_X86_IO_APIC=y, pls review the following patch which
is against x86/platform branch of tip tree

Thanks,
Feng