2011-07-01 21:31:25 +02:00
|
|
|
References: fate#311376, fate#311529, bnc#578927, bnc#628554
|
|
|
|
|
|
|
|
# HG changeset patch
|
|
|
|
# User Keir Fraser <keir@xen.org>
|
|
|
|
# Date 1300887295 0
|
|
|
|
# Node ID c80e0fb4fe932b4d8379ea5739af93ae22a30ea5
|
|
|
|
# Parent 3831bd253e02aa0536ed32e936777d026abb955e
|
|
|
|
Define new <pfn.h> header for PFN_{DOWN,UP} macros.
|
|
|
|
|
|
|
|
Signed-off-by: Keir Fraser <keir@xen.org>
|
|
|
|
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/domain_build.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/domain_build.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/domain_build.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -21,6 +21,7 @@
|
|
|
|
#include <xen/bitops.h>
|
|
|
|
#include <xen/compat.h>
|
|
|
|
#include <xen/libelf.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/regs.h>
|
|
|
|
#include <asm/system.h>
|
|
|
|
#include <asm/io.h>
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/e820.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/e820.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/e820.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -4,6 +4,7 @@
|
|
|
|
#include <xen/mm.h>
|
|
|
|
#include <xen/compat.h>
|
|
|
|
#include <xen/dmi.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/e820.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/processor.h>
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -99,6 +99,7 @@
|
|
|
|
#include <xen/event.h>
|
|
|
|
#include <xen/iocap.h>
|
|
|
|
#include <xen/guest_access.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/paging.h>
|
|
|
|
#include <asm/shadow.h>
|
|
|
|
#include <asm/page.h>
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/msi.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/msi.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/msi.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -18,6 +18,7 @@
|
|
|
|
#include <xen/pci_regs.h>
|
|
|
|
#include <xen/iocap.h>
|
|
|
|
#include <xen/keyhandler.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/smp.h>
|
|
|
|
#include <asm/desc.h>
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/numa.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/numa.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/numa.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
#include <xen/keyhandler.h>
|
|
|
|
#include <xen/time.h>
|
|
|
|
#include <xen/smp.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/acpi.h>
|
|
|
|
#include <xen/sched.h>
|
|
|
|
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/setup.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/setup.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/setup.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -21,6 +21,7 @@
|
|
|
|
#include <xen/rcupdate.h>
|
|
|
|
#include <xen/vga.h>
|
|
|
|
#include <xen/dmi.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <xen/nodemask.h>
|
|
|
|
#include <public/version.h>
|
|
|
|
#ifdef CONFIG_COMPAT
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/srat.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/srat.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/srat.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -17,6 +17,7 @@
|
|
|
|
#include <xen/nodemask.h>
|
|
|
|
#include <xen/acpi.h>
|
|
|
|
#include <xen/numa.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/e820.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/arch/x86/tboot.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/tboot.c
|
|
|
|
+++ xen-4.1.2-testing/xen/arch/x86/tboot.c
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -6,6 +6,7 @@
|
|
|
|
#include <xen/domain_page.h>
|
|
|
|
#include <xen/iommu.h>
|
|
|
|
#include <xen/acpi.h>
|
|
|
|
+#include <xen/pfn.h>
|
|
|
|
#include <asm/fixmap.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/processor.h>
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/include/asm-x86/page.h
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.2-testing.orig/xen/include/asm-x86/page.h
|
|
|
|
+++ xen-4.1.2-testing/xen/include/asm-x86/page.h
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -396,8 +396,6 @@ static inline uint32_t cacheattr_to_pte_
|
|
|
|
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
|
|
|
|
-#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
|
|
|
|
-#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
|
|
|
|
#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK)
|
|
|
|
|
|
|
|
#endif /* __X86_PAGE_H__ */
|
2011-09-15 23:43:21 +02:00
|
|
|
Index: xen-4.1.2-testing/xen/include/xen/pfn.h
|
|
|
|
===================================================================
|
2011-07-01 21:31:25 +02:00
|
|
|
--- /dev/null
|
2011-09-15 23:43:21 +02:00
|
|
|
+++ xen-4.1.2-testing/xen/include/xen/pfn.h
|
2011-07-01 21:31:25 +02:00
|
|
|
@@ -0,0 +1,9 @@
|
|
|
|
+#ifndef __XEN_PFN_H__
|
|
|
|
+#define __XEN_PFN_H__
|
|
|
|
+
|
|
|
|
+#include <asm/page.h>
|
|
|
|
+
|
|
|
|
+#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
|
|
|
|
+#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
|
|
|
|
+
|
|
|
|
+#endif /* __XEN_PFN_H__ */
|