mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
ARM/vgic: Use for_each_set_bit() in vgic_check_inflight_irqs_pending()
... which is better optimised for scalar values, rather than using the arbitrary-sized bitmap helpers. Additionally, unlike other vgic helpers, this takes both a domain and vcpu pointer. The domain parameter isn't used, and the callers pass v->domain. Strip out the domain pointer. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
1 parent
e58a2858d5
commit
8d820e3581
4 files changed
+5
-9
No files matched your search
@@ -315,7 +315,7 @@ extern bool vgic_to_sgi(struct vcpu *v, register_t sgir,
|
||||
enum gic_sgi_mode irqmode, int virq,
|
||||
const struct sgi_target *target);
|
||||
extern bool vgic_migrate_irq(struct vcpu *old, struct vcpu *new, unsigned int irq);
|
||||
extern void vgic_check_inflight_irqs_pending(struct domain *d, struct vcpu *v,
|
||||
extern void vgic_check_inflight_irqs_pending(struct vcpu *v,
|
||||
unsigned int rank, uint32_t r);
|
||||
|
||||
#endif /* !CONFIG_NEW_VGIC */
|
||||
|
||||
@@ -483,7 +483,7 @@ static int vgic_v2_distr_mmio_write(struct vcpu *v, mmio_info_t *info,
|
||||
rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ICPENDR, DABT_WORD);
|
||||
if ( rank == NULL ) goto write_ignore;
|
||||
|
||||
vgic_check_inflight_irqs_pending(v->domain, v, rank->index, r);
|
||||
vgic_check_inflight_irqs_pending(v, rank->index, r);
|
||||
|
||||
goto write_ignore;
|
||||
|
||||
|
||||
@@ -820,7 +820,7 @@ static int __vgic_v3_distr_common_mmio_write(const char *name, struct vcpu *v,
|
||||
rank = vgic_rank_offset(v, 1, reg - GICD_ICPENDR, DABT_WORD);
|
||||
if ( rank == NULL ) goto write_ignore;
|
||||
|
||||
vgic_check_inflight_irqs_pending(v->domain, v, rank->index, r);
|
||||
vgic_check_inflight_irqs_pending(v, rank->index, r);
|
||||
|
||||
goto write_ignore;
|
||||
|
||||
|
||||
+2
-6
@@ -720,13 +720,9 @@ unsigned int vgic_max_vcpus(unsigned int domctl_vgic_version)
|
||||
}
|
||||
}
|
||||
|
||||
void vgic_check_inflight_irqs_pending(struct domain *d, struct vcpu *v,
|
||||
unsigned int rank, uint32_t r)
|
||||
void vgic_check_inflight_irqs_pending(struct vcpu *v, unsigned int rank, uint32_t r)
|
||||
{
|
||||
const unsigned long mask = r;
|
||||
unsigned int i;
|
||||
|
||||
bitmap_for_each ( i, &mask, 32 )
|
||||
for_each_set_bit ( i, r )
|
||||
{
|
||||
struct pending_irq *p;
|
||||
struct vcpu *v_target;
|
||||
|
||||