#ifdef CONFIG_XEN
if (is_running_on_xen()) {
- struct xen_ia64_opt_feature optf;
-
/* Must be done before any hypercall. */
xencomm_initialize();
&xen_panic_block);
pm_power_off = xen_pm_power_off;
- /* Enable region 7 identity map optimizations in Xen */
- optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
- optf.on = XEN_IA64_OPTF_ON;
- optf.pgprot = pgprot_val(PAGE_KERNEL);
- optf.key = 0; /* No key on linux. */
- HYPERVISOR_opt_feature(&optf);
+ xen_ia64_enable_opt_feature();
}
#endif
}
EXPORT_SYMBOL_GPL(xen_ia64_unmap_resource);
+///////////////////////////////////////////////////////////////////////////
+// opt feature
+void
+xen_ia64_enable_opt_feature(void)
+{
+ /* Enable region 7 identity map optimizations in Xen */
+ struct xen_ia64_opt_feature optf;
+
+ optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
+ optf.on = XEN_IA64_OPTF_ON;
+ optf.pgprot = pgprot_val(PAGE_KERNEL);
+ optf.key = 0; /* No key on linux. */
+ HYPERVISOR_opt_feature(&optf);
+}
+
///////////////////////////////////////////////////////////////////////////
// suspend/resume
void
return;
p2m_expose_resume();
+ xen_ia64_enable_opt_feature();
/* add more if necessary */
}
/* For drivers/xen/core/machine_reboot.c */
#define HAVE_XEN_POST_SUSPEND
void xen_post_suspend(int suspend_cancelled);
+
+/* For setup_arch() in arch/ia64/kernel/setup.c */
+void xen_ia64_enable_opt_feature(void);
#endif /* !CONFIG_VMX_GUEST */
#define __pte_ma(_x) ((pte_t) {(_x)}) /* unmodified use */