lkml.org 
[lkml]   [2006]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [i386, x86-64] ioapic_register_intr() and assign_irq_vector() questions
From
Date
"Jan Beulich" <jbeulich@novell.com> writes:

> Since ioapic_register_intr() ties, for the PCI case, the interrupt
> gate for vector to interrupt[vector], doesn't this, since do_IRQ()
> derives the IRQ from the value loaded in the handler at that address
> (which is the value of vector), mean that here irq == vector in all
> cases? If so, why does this function need an if/else (the 'else'
> case would then be good for both cases)?

Yes agreed. irq should be always equal vector. IIRC this
stems from the MSI work from Tom Nguyen. Maybe he knows
why he coded it like this. I suppose it could be cleaned up.

>
> Looking at the call paths assign_irq_vector() can get called from, I
> would think this function, namely as it's using static variables,
> lacks synchronization - is there any (hidden) reason this is not
> needed here?

It is only called during system initialization which is single threaded.
If someone added ioapic hotplug they would need to do something about
this.

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

\
 
 \ /
  Last update: 2006-04-13 19:14    [W:0.027 / U:2.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site