direct-io.hg

changeset 14274:228c3e05eb00

linux: Don't use set_fixmap/clear_fixmap after boot-time. It's not
allowed and the functions are marked __init on x86/64.
Use HYPERVISOR_update_va_mapping() directly instead.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Mar 07 10:13:39 2007 +0000 (2007-03-07)
parents 87f626f1d5f5
children c85d83074b54
files linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c	Wed Mar 07 09:43:36 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c	Wed Mar 07 10:13:39 2007 +0000
     1.3 @@ -62,7 +62,8 @@ EXPORT_SYMBOL(machine_power_off);
     1.4  static void pre_suspend(void)
     1.5  {
     1.6  	HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
     1.7 -	clear_fixmap(FIX_SHARED_INFO);
     1.8 +	HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
     1.9 +				     __pte_ma(0), 0);
    1.10  
    1.11  	xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn);
    1.12  	xen_start_info->console.domU.mfn =
    1.13 @@ -72,6 +73,7 @@ static void pre_suspend(void)
    1.14  static void post_suspend(int suspend_cancelled)
    1.15  {
    1.16  	int i, j, k, fpp;
    1.17 +	unsigned long shinfo_mfn;
    1.18  	extern unsigned long max_pfn;
    1.19  	extern unsigned long *pfn_to_mfn_frame_list_list;
    1.20  	extern unsigned long *pfn_to_mfn_frame_list[];
    1.21 @@ -86,9 +88,10 @@ static void post_suspend(int suspend_can
    1.22  		cpu_initialized_map = cpumask_of_cpu(0);
    1.23  #endif
    1.24  	}
    1.25 -	
    1.26 -	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    1.27  
    1.28 +	shinfo_mfn = xen_start_info->shared_info >> PAGE_SHIFT;
    1.29 +	HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
    1.30 +				     pfn_pte_ma(shinfo_mfn, PAGE_KERNEL), 0);
    1.31  	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    1.32  
    1.33  	memset(empty_zero_page, 0, PAGE_SIZE);