ia64/xen-unstable

changeset 10303:c9e6255cb44a

[LINUX] Simply shared_info mapping code. Always use a fixmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 02 19:14:44 2006 +0100 (2006-06-02)
parents 40331b1545d2
children 8aca850f66ad
files linux-2.6-xen-sparse/arch/i386/mm/init-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c	Fri Jun 02 18:06:50 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c	Fri Jun 02 19:14:44 2006 +0100
     1.3 @@ -558,15 +558,11 @@ void __init paging_init(void)
     1.4  
     1.5  	kmap_init();
     1.6  
     1.7 -	if (!xen_feature(XENFEAT_auto_translated_physmap) ||
     1.8 -	    xen_start_info->shared_info >= xen_start_info->nr_pages) {
     1.9 -		/* Switch to the real shared_info page, and clear the
    1.10 -		 * dummy page. */
    1.11 -		set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    1.12 -		HYPERVISOR_shared_info =
    1.13 -			(shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    1.14 -		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    1.15 -	}
    1.16 +	/* Switch to the real shared_info page, and clear the
    1.17 +	 * dummy page. */
    1.18 +	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    1.19 +	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    1.20 +	memset(empty_zero_page, 0, sizeof(empty_zero_page));
    1.21  
    1.22  	/* Setup mapping of lower 1st MB */
    1.23  	for (i = 0; i < NR_FIX_ISAMAPS; i++)
     2.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Fri Jun 02 18:06:50 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Fri Jun 02 19:14:44 2006 +0100
     2.3 @@ -665,13 +665,6 @@ void __init setup_arch(char **cmdline_p)
     2.4  
     2.5  	setup_xen_features();
     2.6  
     2.7 -	if (xen_feature(XENFEAT_auto_translated_physmap) &&
     2.8 -	    xen_start_info->shared_info < xen_start_info->nr_pages) {
     2.9 -		HYPERVISOR_shared_info =
    2.10 -			(shared_info_t *)__va(xen_start_info->shared_info);
    2.11 -		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    2.12 -	}
    2.13 -
    2.14  	HYPERVISOR_vm_assist(VMASST_CMD_enable,
    2.15  			     VMASST_TYPE_writable_pagetables);
    2.16  
     3.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c	Fri Jun 02 18:06:50 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c	Fri Jun 02 19:14:44 2006 +0100
     3.3 @@ -763,15 +763,11 @@ void __init paging_init(void)
     3.4  	free_area_init_node(0, NODE_DATA(0), zones,
     3.5  			    __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes);
     3.6  
     3.7 -	if (!xen_feature(XENFEAT_auto_translated_physmap) ||
     3.8 -	    xen_start_info->shared_info >= xen_start_info->nr_pages) {
     3.9 -		/* Switch to the real shared_info page, and clear the
    3.10 -		 * dummy page. */
    3.11 -		set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    3.12 -		HYPERVISOR_shared_info =
    3.13 -			(shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    3.14 -		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    3.15 -	}
    3.16 +	/* Switch to the real shared_info page, and clear the
    3.17 +	 * dummy page. */
    3.18 +	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    3.19 +	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    3.20 +	memset(empty_zero_page, 0, sizeof(empty_zero_page));
    3.21  
    3.22  	init_mm.context.pinned = 1;
    3.23  
     4.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Fri Jun 02 18:06:50 2006 +0100
     4.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Fri Jun 02 19:14:44 2006 +0100
     4.3 @@ -61,13 +61,6 @@ static void __init machine_specific_arch
     4.4  		.address = { __KERNEL_CS, (unsigned long)nmi },
     4.5  	};
     4.6  
     4.7 -	if (xen_feature(XENFEAT_auto_translated_physmap) &&
     4.8 -	    xen_start_info->shared_info < xen_start_info->nr_pages) {
     4.9 -		HYPERVISOR_shared_info =
    4.10 -			(shared_info_t *)__va(xen_start_info->shared_info);
    4.11 -		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    4.12 -	}
    4.13 -
    4.14  	ret = HYPERVISOR_callback_op(CALLBACKOP_register, &event);
    4.15  	if (ret == 0)
    4.16  		ret = HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe);