All of lore.kernel.org
 help / color / mirror / Atom feed
* map_domain_pirq(): pirq already mapped?
@ 2026-05-14  1:18 Jason Andryuk
  2026-05-14  8:26 ` Roger Pau Monné
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Andryuk @ 2026-05-14  1:18 UTC (permalink / raw)
  To: Xen-devel

Hi,

Early in map_domain_pirq(), we have this block:

     old_irq = domain_pirq_to_irq(d, pirq);
     old_pirq = domain_irq_to_pirq(d, irq);

     if ( (old_irq > 0 && (old_irq != irq) ) ||
          (old_pirq && (old_pirq != pirq)) )
     {
         dprintk(XENLOG_G_WARNING,
                 "dom%d: pirq %d or irq %d already mapped (%d,%d)\n",
                 d->domain_id, pirq, irq, old_pirq, old_irq);
         return 0;
     }

Why do we return 0 instead of -EEXIST?  Since the pirq is not updated, 
the caller doesn't know that pirq won't fire - only old_pirq.  For 
allocate_and_map_gsi_pirq(), the new pirq is still returned to the 
caller.  I would expect old_pirq to be returned so the caller knows what 
to use.  Am I missing something?

Thanks,
Jason


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-15  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  1:18 map_domain_pirq(): pirq already mapped? Jason Andryuk
2026-05-14  8:26 ` Roger Pau Monné
2026-05-15  1:01   ` Jason Andryuk
2026-05-15  8:35     ` Roger Pau Monné

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.