ia64/xen-unstable

view xen/include/xen/irq_cpustat.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents a01199a95070
children
line source
1 #ifndef __irq_cpustat_h
2 #define __irq_cpustat_h
4 /*
5 * Contains default mappings for irq_cpustat_t, used by almost every
6 * architecture. Some arch (like s390) have per cpu hardware pages and
7 * they define their own mappings for irq_stat.
8 *
9 * Keith Owens <kaos@ocs.com.au> July 2000.
10 */
12 #include <xen/config.h>
13 #include <asm/hardirq.h>
15 /*
16 * Simple wrappers reducing source bloat. Define all irq_stat fields
17 * here, even ones that are arch dependent. That way we get common
18 * definitions instead of differing sets for each arch.
19 */
21 extern irq_cpustat_t irq_stat[];
23 #define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
25 /* arch independent irq_stat fields */
26 #define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
27 #define local_irq_count(cpu) __IRQ_STAT((cpu), __local_irq_count)
28 #define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count)
30 #endif /* __irq_cpustat_h */