Re: [PATCH] x86: let 32bit use apic_ops too

From: Suresh Siddha
Date: Sun Jul 13 2008 - 12:28:19 EST


On Sat, Jul 12, 2008 at 07:04:44PM -0700, Yinghai Lu wrote:
> On Sat, Jul 12, 2008 at 6:08 PM, Suresh Siddha
> <suresh.b.siddha@xxxxxxxxx> wrote:
> > Yinghai,
> >
> > We can now cleanup ack_APIC_irq() to use the native_apic_mem_write()
> > for both 32bit and 64bit
>
> apic_write_around(), in case 32bit not have CONFIG_X86_GOOD_APIC?
> or let 64 bit use that apic_write_around()?

hmm, yes this gets complicated.

Reason why I used native_apic_mem_write() in 64bit is, ack_APIC_irq()
is in the fast path (intr) and we are already sure (through irq_chip's) that
this ack is indeed for xapic. So instead of using function pointer, I directly
used the native access.

As we are now implementing apic ops for 32bit aswell, I though we should
also use the native access for perf reason.

So we should probably have native_apic_mem_write_around() and use that
in ack_APIC_irq() and for good apic it is native_apic_mem_write()
and for !CONFIG_X86_GOOD_APIC, it is native_apic_mem_write_atomic()

>
> >
> > And also arch/x86/kernel/ipi.c can also use native_apic_mem_write()
> > similar to include/asm-x86/ipi.h
>
> should remove duplicated functions in ipi.c

yes, if there are no differences.

BTW, as I mentioned in another thread, we need to take care of the paravirt
(lguest, vmi, xen etc) cases aswell.

thanks,
suresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/