[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 02/12] arm/mem_access: Move PAGE_SHIFT_* macros to lib.h
The following commits introduce a software guest page table walk software implementation that supports varying guest page size granularities. This commit moves already existing PAGE_SHIFT_(4K|64K) and the new PAGE_SHIFT_16K defines to a common place in xen/lib.h as to allow the following commits to use the consolidated defines. Signed-off-by: Sergej Proskurin <proskurin@xxxxxxxxxxxxx> --- Cc: Jan Beulich <jbeulich@xxxxxxxx> --- xen/include/xen/iommu.h | 3 +-- xen/include/xen/lib.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 5803e3f95b..75746e55b0 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -20,6 +20,7 @@ #define _IOMMU_H_ #include <xen/init.h> +#include <xen/lib.h> #include <xen/spinlock.h> #include <xen/pci.h> #include <public/hvm/ioreq.h> @@ -41,12 +42,10 @@ extern unsigned int iommu_dev_iotlb_timeout; #define IOMMU_PAGE_MASK(sz) (~(u64)0 << PAGE_SHIFT_##sz) #define IOMMU_PAGE_ALIGN(sz, addr) (((addr) + ~PAGE_MASK_##sz) & PAGE_MASK_##sz) -#define PAGE_SHIFT_4K (12) #define PAGE_SIZE_4K IOMMU_PAGE_SIZE(4K) #define PAGE_MASK_4K IOMMU_PAGE_MASK(4K) #define PAGE_ALIGN_4K(addr) IOMMU_PAGE_ALIGN(4K, addr) -#define PAGE_SHIFT_64K (16) #define PAGE_SIZE_64K IOMMU_PAGE_SIZE(64K) #define PAGE_MASK_64K IOMMU_PAGE_MASK(64K) #define PAGE_ALIGN_64K(addr) IOMMU_PAGE_ALIGN(64K, addr) diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 995a85a7db..8e2777ac67 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -8,6 +8,10 @@ #include <xen/string.h> #include <asm/bug.h> +#define PAGE_SHIFT_4K (12) +#define PAGE_SHIFT_16K (14) +#define PAGE_SHIFT_64K (16) + #define BUG_ON(p) do { if (unlikely(p)) BUG(); } while (0) #define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0) -- 2.13.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |