|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] x86: convert frame_table to a #define
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
--- 2009-08-18.orig/xen/arch/x86/mm.c 2009-09-04 14:39:14.000000000 +0200
+++ 2009-08-18/xen/arch/x86/mm.c 2009-09-04 14:09:39.000000000 +0200
@@ -154,8 +154,7 @@ static DEFINE_PER_CPU(struct percpu_mm_i
/* Private domain structs for DOMID_XEN and DOMID_IO. */
struct domain *dom_xen, *dom_io;
-/* Frame table and its size in pages. */
-struct page_info *__read_mostly frame_table;
+/* Frame table size in pages. */
unsigned long max_page;
unsigned long total_pages;
@@ -184,8 +183,6 @@ void __init init_frametable(void)
{
unsigned long nr_pages, page_step, i, mfn;
- frame_table = (struct page_info *)FRAMETABLE_VIRT_START;
-
nr_pages = PFN_UP(max_page * sizeof(*frame_table));
page_step = 1 << (cpu_has_page1gb ? L3_PAGETABLE_SHIFT - PAGE_SHIFT
: L2_PAGETABLE_SHIFT - PAGE_SHIFT);
--- 2009-08-18.orig/xen/common/kexec.c 2009-09-04 14:39:14.000000000 +0200
+++ 2009-08-18/xen/common/kexec.c 2009-09-04 14:21:35.000000000 +0200
@@ -338,7 +338,14 @@ static void crash_save_vmcoreinfo(void)
VMCOREINFO_PAGESIZE(PAGE_SIZE);
VMCOREINFO_SYMBOL(domain_list);
+#ifndef frame_table
VMCOREINFO_SYMBOL(frame_table);
+#else
+ {
+ static const void *const _frame_table = frame_table;
+ VMCOREINFO_SYMBOL_ALIAS(frame_table, _frame_table);
+ }
+#endif
VMCOREINFO_SYMBOL(max_page);
VMCOREINFO_STRUCT_SIZE(page_info);
--- 2009-08-18.orig/xen/include/asm-x86/mm.h 2009-09-04 14:39:14.000000000
+0200
+++ 2009-08-18/xen/include/asm-x86/mm.h 2009-09-04 14:39:48.000000000 +0200
@@ -259,7 +259,7 @@ extern void share_xen_page_with_guest(
extern void share_xen_page_with_privileged_guests(
struct page_info *page, int readonly);
-extern struct page_info *frame_table;
+#define frame_table ((struct page_info *)FRAMETABLE_VIRT_START)
extern unsigned long max_page;
extern unsigned long total_pages;
void init_frametable(void);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] x86: convert frame_table to a #define,
Jan Beulich <=
|
|
|
|
|