[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v9 15/28] ARM: vITS: provide access to struct pending_irq

On 22/05/17 17:50, Andre Przywara wrote:

Hi Andre,

On 17/05/17 16:35, Julien Grall wrote:
+    }
+    spin_unlock(&d->arch.vgic.its_devices_lock);
+    return pirq;
+struct pending_irq *gicv3_its_get_event_pending_irq(struct domain *d,
+                                                    paddr_t
+                                                    uint32_t vdevid,
+                                                    uint32_t veventid)


+    return get_event_pending_irq(d, vdoorbell_address, vdevid,
veventid, NULL);

This wrapper looks a bit pointless to me. Why don't you directly expose

I don't want to expose host_lpi in the exported function, because it's
of no need for the callers and rather cumbersome for them to pass NULL
or the like. But then the algorithm to find host_lpi and pirq is
basically the same, so I came up with this joint static function and an
exported wrapper, which hides the host_lpi.
And there is one user (in gicv3_assign_guest_event()) which needs both,
so ...
If you can think of a better way to address this, I am all ears.

It is not that bad to pass NULL everywhere. We already have some other functions like that.

How about adding the wrapper as a static inline in the header?


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.