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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yinghai Lu
Date: Tuesday, December 7, 2010 - 11:43 am

On 12/07/2010 07:56 AM, Thomas Gleixner wrote:

ok, after look at code and git log,  i knew the reasons for those strange duplicated functions.

Alexy changed

 /* MP IRQ source entries */
-struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
+struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];

to make it decouple that with mpstable definition. so mptable will have mpc_intsrc, and acpi etc will use mp_config_intsrc

and he planed to add more member to mp_config_intsrc .... never happened.

then I added those functions with different parameters.

one year later JSR changed all back to mpc_instr...

so now have some duplicated functions....

even in mpparse.c we now have

static void print_MP_intsrc_info(struct mpc_intsrc *m)
{
        apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
                " IRQ %02x, APIC ID %x, APIC INT %02x\n",
                m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbus,
                m->srcbusirq, m->dstapic, m->dstirq);
}

static void __init print_mp_irq_info(struct mpc_intsrc *mp_irq)
{
        apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
                " IRQ %02x, APIC ID %x, APIC INT %02x\n",
                mp_irq->irqtype, mp_irq->irqflag & 3,
                (mp_irq->irqflag >> 2) & 3, mp_irq->srcbus,
                mp_irq->srcbusirq, mp_irq->dstapic, mp_irq->dstirq);
}

...

So yes, we should use simple versions in arch/x86/kernel/acpi/boot.c. ( assume functions mrst.c are copied from there)

and should kill print_mp_irq_info or print_MP_intsrc_info...

Thanks

	Yinghai
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[tip:x86/platform] x86: Unify current 3 similar ways of sa ..., tip-bot for Feng Tang, (Mon Dec 6, 8:01 am)
Re: [tip:x86/platform] x86: Unify current 3 similar ways o ..., Yinghai Lu, (Tue Dec 7, 11:43 am)
[tip:x86/apic-cleanups] x86: Unify 3 similar ways of savin ..., tip-bot for Feng Tang, (Thu Dec 9, 1:56 pm)
[tip:x86/apic-cleanups] x86: Further simplify mp_irq info ..., tip-bot for Feng Tang, (Thu Dec 9, 1:57 pm)