ia64/linux-2.6.18-xen.hg

changeset 256:9514c93e8053

[IA64] Fix linux restore. It should reset opt feature.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Mon Oct 15 11:45:42 2007 -0600 (2007-10-15)
parents 4cf72481b5ed
children 6cac8ecd995d
files arch/ia64/kernel/setup.c arch/ia64/xen/hypervisor.c include/asm-ia64/hypervisor.h
line diff
     1.1 --- a/arch/ia64/kernel/setup.c	Fri Oct 12 14:21:34 2007 -0600
     1.2 +++ b/arch/ia64/kernel/setup.c	Mon Oct 15 11:45:42 2007 -0600
     1.3 @@ -522,8 +522,6 @@ setup_arch (char **cmdline_p)
     1.4  
     1.5  #ifdef CONFIG_XEN
     1.6  	if (is_running_on_xen()) {
     1.7 -		struct xen_ia64_opt_feature optf;
     1.8 -
     1.9  		/* Must be done before any hypercall.  */
    1.10  		xencomm_initialize();
    1.11  
    1.12 @@ -533,12 +531,7 @@ setup_arch (char **cmdline_p)
    1.13  		                               &xen_panic_block);
    1.14  		pm_power_off = xen_pm_power_off;
    1.15  
    1.16 -		/* Enable region 7 identity map optimizations in Xen */
    1.17 -		optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
    1.18 -		optf.on = XEN_IA64_OPTF_ON;
    1.19 -		optf.pgprot = pgprot_val(PAGE_KERNEL);
    1.20 -		optf.key = 0;	/* No key on linux. */
    1.21 -		HYPERVISOR_opt_feature(&optf);
    1.22 +		xen_ia64_enable_opt_feature();
    1.23  	}
    1.24  #endif
    1.25  
     2.1 --- a/arch/ia64/xen/hypervisor.c	Fri Oct 12 14:21:34 2007 -0600
     2.2 +++ b/arch/ia64/xen/hypervisor.c	Mon Oct 15 11:45:42 2007 -0600
     2.3 @@ -1478,6 +1478,21 @@ xen_ia64_unmap_resource(struct resource*
     2.4  EXPORT_SYMBOL_GPL(xen_ia64_unmap_resource);
     2.5  
     2.6  ///////////////////////////////////////////////////////////////////////////
     2.7 +// opt feature
     2.8 +void
     2.9 +xen_ia64_enable_opt_feature(void)
    2.10 +{
    2.11 +	/* Enable region 7 identity map optimizations in Xen */
    2.12 +	struct xen_ia64_opt_feature optf;
    2.13 +
    2.14 +	optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
    2.15 +	optf.on = XEN_IA64_OPTF_ON;
    2.16 +	optf.pgprot = pgprot_val(PAGE_KERNEL);
    2.17 +	optf.key = 0;	/* No key on linux. */
    2.18 +	HYPERVISOR_opt_feature(&optf);
    2.19 +}
    2.20 +
    2.21 +///////////////////////////////////////////////////////////////////////////
    2.22  // suspend/resume
    2.23  void
    2.24  xen_post_suspend(int suspend_cancelled)
    2.25 @@ -1486,5 +1501,6 @@ xen_post_suspend(int suspend_cancelled)
    2.26  		return;
    2.27  	
    2.28  	p2m_expose_resume();
    2.29 +	xen_ia64_enable_opt_feature();
    2.30  	/* add more if necessary */
    2.31  }
     3.1 --- a/include/asm-ia64/hypervisor.h	Fri Oct 12 14:21:34 2007 -0600
     3.2 +++ b/include/asm-ia64/hypervisor.h	Mon Oct 15 11:45:42 2007 -0600
     3.3 @@ -170,6 +170,9 @@ int xen_limit_pages_to_max_mfn(struct pa
     3.4  /* For drivers/xen/core/machine_reboot.c */
     3.5  #define HAVE_XEN_POST_SUSPEND
     3.6  void xen_post_suspend(int suspend_cancelled);
     3.7 +
     3.8 +/* For setup_arch() in arch/ia64/kernel/setup.c */
     3.9 +void xen_ia64_enable_opt_feature(void);
    3.10  #endif /* !CONFIG_VMX_GUEST */
    3.11  
    3.12  #define __pte_ma(_x)	((pte_t) {(_x)})        /* unmodified use */