# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c9e6255cb44a2ec123b7bec9c9447697c747a5f3
# Parent 40331b1545d2de761b3d4d2777ff9349eceb5c1a
[LINUX] Simply shared_info mapping code. Always use a fixmap.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c | 14
+++-------
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c | 7 -----
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c | 14
+++-------
linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h | 7 -----
4 files changed, 10 insertions(+), 32 deletions(-)
diff -r 40331b1545d2 -r c9e6255cb44a
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c Fri Jun 02 18:06:50
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c Fri Jun 02 19:14:44
2006 +0100
@@ -558,15 +558,11 @@ void __init paging_init(void)
kmap_init();
- if (!xen_feature(XENFEAT_auto_translated_physmap) ||
- xen_start_info->shared_info >= xen_start_info->nr_pages) {
- /* Switch to the real shared_info page, and clear the
- * dummy page. */
- set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
- HYPERVISOR_shared_info =
- (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
- memset(empty_zero_page, 0, sizeof(empty_zero_page));
- }
+ /* Switch to the real shared_info page, and clear the
+ * dummy page. */
+ set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
+ HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
+ memset(empty_zero_page, 0, sizeof(empty_zero_page));
/* Setup mapping of lower 1st MB */
for (i = 0; i < NR_FIX_ISAMAPS; i++)
diff -r 40331b1545d2 -r c9e6255cb44a
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c Fri Jun 02
18:06:50 2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c Fri Jun 02
19:14:44 2006 +0100
@@ -665,13 +665,6 @@ void __init setup_arch(char **cmdline_p)
setup_xen_features();
- if (xen_feature(XENFEAT_auto_translated_physmap) &&
- xen_start_info->shared_info < xen_start_info->nr_pages) {
- HYPERVISOR_shared_info =
- (shared_info_t *)__va(xen_start_info->shared_info);
- memset(empty_zero_page, 0, sizeof(empty_zero_page));
- }
-
HYPERVISOR_vm_assist(VMASST_CMD_enable,
VMASST_TYPE_writable_pagetables);
diff -r 40331b1545d2 -r c9e6255cb44a
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c Fri Jun 02 18:06:50
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c Fri Jun 02 19:14:44
2006 +0100
@@ -763,15 +763,11 @@ void __init paging_init(void)
free_area_init_node(0, NODE_DATA(0), zones,
__pa(PAGE_OFFSET) >> PAGE_SHIFT, holes);
- if (!xen_feature(XENFEAT_auto_translated_physmap) ||
- xen_start_info->shared_info >= xen_start_info->nr_pages) {
- /* Switch to the real shared_info page, and clear the
- * dummy page. */
- set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
- HYPERVISOR_shared_info =
- (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
- memset(empty_zero_page, 0, sizeof(empty_zero_page));
- }
+ /* Switch to the real shared_info page, and clear the
+ * dummy page. */
+ set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
+ HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
+ memset(empty_zero_page, 0, sizeof(empty_zero_page));
init_mm.context.pinned = 1;
diff -r 40331b1545d2 -r c9e6255cb44a
linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h Fri Jun
02 18:06:50 2006 +0100
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h Fri Jun
02 19:14:44 2006 +0100
@@ -61,13 +61,6 @@ static void __init machine_specific_arch
.address = { __KERNEL_CS, (unsigned long)nmi },
};
- if (xen_feature(XENFEAT_auto_translated_physmap) &&
- xen_start_info->shared_info < xen_start_info->nr_pages) {
- HYPERVISOR_shared_info =
- (shared_info_t *)__va(xen_start_info->shared_info);
- memset(empty_zero_page, 0, sizeof(empty_zero_page));
- }
-
ret = HYPERVISOR_callback_op(CALLBACKOP_register, &event);
if (ret == 0)
ret = HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe);
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|