ia64/xen-unstable

annotate xen/include/xen/numa.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 2f9e1348aa98
children
rev   line source
kfraser@11971 1 #ifndef _XEN_NUMA_H
kfraser@11971 2 #define _XEN_NUMA_H
kfraser@11971 3
kfraser@11971 4 #include <xen/config.h>
kfraser@11998 5 #include <asm/numa.h>
kfraser@11971 6
kfraser@11971 7 #ifndef NODES_SHIFT
kfraser@11971 8 #define NODES_SHIFT 0
kfraser@11971 9 #endif
kfraser@11971 10
keir@17385 11 #define NUMA_NO_NODE 0xFF
keir@17385 12
kfraser@11971 13 #define MAX_NUMNODES (1 << NODES_SHIFT)
kfraser@11971 14
keir@17395 15 #define vcpu_to_node(v) (cpu_to_node((v)->processor))
keir@17385 16
keir@17385 17 #define domain_to_node(d) \
keir@19788 18 (((d)->vcpu != NULL && (d)->vcpu[0] != NULL) \
keir@19788 19 ? vcpu_to_node((d)->vcpu[0]) : NUMA_NO_NODE)
keir@17385 20
kfraser@11971 21 #endif /* _XEN_NUMA_H */