lkml.org 
[lkml]   [2005]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [RFC][2.6.12.3] IRQ compression/sharing patch
Date
From
> > int gsi_irq_sharing(int gsi)
> > {
> > int i, irq, vector;
> >
> > BUG_ON(gsi >= NR_IRQ_VECTORS);
> >
> > if (platform_legacy_irq(gsi)) {
> > gsi_2_irq[gsi] = gsi;
> > return gsi;
> > }
> >
> > if (gsi_2_irq[gsi] != 0xFF)
> > return (int)gsi_2_irq[gsi];
> >
> > vector = assign_irq_vector(gsi); // this part here==========
>
> I thought I had this case covered earlier, given that in both i386 and
> x86_64:
>
> #define platform_legacy_irq(irq) ((irq) < 16)

Yes, you are absolutely correct, I don't need the (gsi<16) part, this
takes care of PCI IRQs that happened to be <16.

> In the deleted vector sharing code, I also check
> platform_legacy_irq, to avoid inadvertently sharing vectors
> already assigned to legacy IRQs.
>
> Am I missing your point here?
>
> > if (gsi < 16) {
> > irq = gsi;
> > gsi_2_irq[gsi] = irq;
> > } else {
> > irq = next_irq++;
> > gsi_2_irq[gsi] = irq;
> > }
> > //====================
>
> I can't explain the gaps in the numbers with the original
> version. I'll give your variant a try.

The only problem is here:

+ if (i < NR_IRQS) {
+ gsi_2_irq[gsi] = i;
+ printk(KERN_INFO "GSI %d sharing vector 0x%02X and IRQ
%d\n",
+ gsi, vector, i);
+ return i;
+ }
+
+ i = next_irq++;

That means for any IRQ < NR_IRQS you allow it to be identity mapped,
with all the gaps, and only for ones exceeding 224 you'll assign
consecutive next_irqs++, whereas you can do it for all PCI IRQs above
15. So, the alternative clause should probably come down to just:
irq = next_irq++;
gsi_2_irq[gsi] = irq; - which means just removing the
one above...
(although we better test that :)...I will definitely test vector sharing
when manage to get on max configuration partition here.

Regards,
--Natalie

-
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: 2005-08-11 02:24    [W:0.063 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site