From 2a80634d675bff85c06b684e4d2f0d65c4e7cbe9 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 19 Dec 2012 16:04:49 +0000 Subject: xen: remove nr_irqs_gsi from generic code The concept is X86 specific. AFAICT the generic concept here is the number of static physical IRQs which the current hardware has, so call this nr_static_irqs. Also using "defined NR_IRQS" as a standin for x86 might have made sense at one point but its just cleaner to push the necessary definitions into asm/irq.h. Signed-off-by: Ian Campbell Acked-by: Keir Fraser Acked-by: Jan Beulich Committed-by: Ian Campbell --- xen/xsm/flask/hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xen/xsm') diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 0ca10d05ad..782e28c358 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -72,7 +72,7 @@ static int get_irq_sid(int irq, u32 *sid, struct avc_audit_data *ad) struct irq_desc *desc = irq_to_desc(irq); if ( irq >= nr_irqs || irq < 0 ) return -EINVAL; - if ( irq < nr_irqs_gsi ) { + if ( irq < nr_static_irqs ) { if (ad) { AVC_AUDIT_DATA_INIT(ad, IRQ); ad->irq = irq; @@ -699,7 +699,7 @@ static int flask_map_domain_pirq (struct domain *d, int irq, void *data) if ( rc ) return rc; - if ( irq >= nr_irqs_gsi && msi ) { + if ( irq >= nr_static_irqs && msi ) { u32 machine_bdf = (msi->seg << 16) | (msi->bus << 8) | msi->devfn; AVC_AUDIT_DATA_INIT(&ad, DEV); ad.device = machine_bdf; -- cgit v1.2.3