lkml.org 
[lkml]   [2010]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [tip:x86/irq] x86, acpi/irq: Handle isa irqs that are not identity mapped to gsi's.
Yinghai <yinghai.lu@oracle.com> writes:

>> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
>> index 9f3f6ca..594827c 100644
>> --- a/arch/x86/kernel/apic/io_apic.c
>> +++ b/arch/x86/kernel/apic/io_apic.c
>> @@ -1037,7 +1037,11 @@ static int pin_2_irq(int idx, int apic, int pin)
>> */
>> if (ioapic_renumber_irq)
>> gsi = ioapic_renumber_irq(apic, gsi);
>> - irq = gsi;
>> +
>> + if (gsi >= NR_IRQS_LEGACY)
>> + irq = gsi;
>> + else
>> + irq = gsi_end + 1 + gsi;
>> }
>>
>> #ifdef CONFIG_X86_32
>> @@ -3852,7 +3856,7 @@ void __init probe_nr_irqs_gsi(void)
>> {
>> int nr;
>>
>> - nr = gsi_end + 1;
>> + nr = gsi_end + 1 + NR_IRQS_LEGACY;
>> if (nr > nr_irqs_gsi)
>> nr_irqs_gsi = nr;
>
> can you use legacy_irq->nr_legacy_irqs instead of NR_IRQS_LEGACY ?

No. legacy_irq->nr_legacy_irqs is just for dealing with hardware that
does not have i8259 pics.

Here I am reserving 16 irqs above the gsi range in case we get a
weird gsi to isa irq mapping.

Currently the sfi spec doesn't mention anything explicitly. I
took a quick read through it and sfi and I presume Moorestown
is talking about non pci irqs. So I would not be surprised
if we didn't have isa device drivers running on platforms
without i8259s.

Currently the code had a small bug dealing with multiple ioapics and
the spec really is incomplete about how you map irqs from pci devices
to interrupts. So it looks like SFI and Moorestown are more a lab
experiment than real hardware at the moment. So I expect when
it gets completely fleshed out we will have to jump through a
similar set of hoops as we do with acpi to ensure the first 16
irqs are not used for anything except isa irqs.

Eric


\
 
 \ /
  Last update: 2010-05-05 11:35    [W:0.072 / U:2.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site