view xen/include/xen/cache.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 0a4b76b6b5a0
line source
1 #ifndef __LINUX_CACHE_H
2 #define __LINUX_CACHE_H
4 #include <xen/config.h>
5 #include <asm/cache.h>
7 #ifndef L1_CACHE_ALIGN
8 #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
9 #endif
11 #ifndef SMP_CACHE_BYTES
13 #endif
15 #ifndef __cacheline_aligned
16 #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
17 #endif
19 #endif /* __LINUX_CACHE_H */