lkml.org 
[lkml]   [2008]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch 00/26] x64, x2apic/intr-remap: Interrupt-remapping and x2apic support
Ingo Molnar <mingo@elte.hu> writes:

> * Eric W. Biederman <ebiederm@xmission.com> wrote:
>
>> A lot of your code is generic, and some of it is for just x86_64.
>> Since the cpus are capable of running in 32bit mode. We really need
>> to implement x86_32 and x86_64 support in the same code base. Which I
>> believe means factoring out pieces of io_apic_N.c into things such as
>> msi.c that can be shared between the two architectures.
>
> i think the APIC code should be fully unified down the line - the
> APIC/IOAPIC knows little about the mode the CPU is running in and has to
> be programmed the same way independent of which mode the CPU is in. The
> current fork between the 32-bit and 64-bit APIC code is in good part
> artificial.

I completely agree. However
1) There is a fair amount of work involved in the unification so taking it in small pieces
is good.
2) We are doing much more then we should in ioapic_N.c anyway.

So it makes sense to grab the pieces we are actively working on factor them out and unify them
first.

The basic model I expect will end up looking something like:
Type of cpu irq reception. PIC mode, local APIC mode, ???? Virtualized modes????
Type of irq source. ioapic, msi, htirq, ??? Virtualized source ????
Type of configuration mptable, acpi mps table.

Some of this we have split out today and nicely factored. Other parts we don't.

In particular for setting up msi and ioapics we use exactly the same mapping
of bits. So we describe things a little differently from the irq reception layer
to the irq sending layer we should be able to reuse exactly the same msi and ioapic code
instead of having their setup methods test for irq_remapping().

Eric


\
 
 \ /
  Last update: 2008-07-10 23:15    [W:0.115 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site