aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6-xen-sparse
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-07 10:13:39 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-07 10:13:39 +0000
commitbca5f6d82974e70ae34a90344c041b5d61dfe95f (patch)
treef8fe3c8160d146bc59ccb21e340a2839e3ee3f6d /linux-2.6-xen-sparse
parent786ad1ffaac5f4b9e22025a386be81376a99caf1 (diff)
downloadxen-bca5f6d82974e70ae34a90344c041b5d61dfe95f.tar.gz
xen-bca5f6d82974e70ae34a90344c041b5d61dfe95f.tar.bz2
xen-bca5f6d82974e70ae34a90344c041b5d61dfe95f.zip
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>
Diffstat (limited to 'linux-2.6-xen-sparse')
-rw-r--r--linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
index 472f5aea67..72efdce56f 100644
--- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
+++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
@@ -62,7 +62,8 @@ EXPORT_SYMBOL(machine_power_off);
static void pre_suspend(void)
{
HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
- clear_fixmap(FIX_SHARED_INFO);
+ HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
+ __pte_ma(0), 0);
xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn);
xen_start_info->console.domU.mfn =
@@ -72,6 +73,7 @@ static void pre_suspend(void)
static void post_suspend(int suspend_cancelled)
{
int i, j, k, fpp;
+ unsigned long shinfo_mfn;
extern unsigned long max_pfn;
extern unsigned long *pfn_to_mfn_frame_list_list;
extern unsigned long *pfn_to_mfn_frame_list[];
@@ -86,9 +88,10 @@ static void post_suspend(int suspend_cancelled)
cpu_initialized_map = cpumask_of_cpu(0);
#endif
}
-
- set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
+ shinfo_mfn = xen_start_info->shared_info >> PAGE_SHIFT;
+ HYPERVISOR_update_va_mapping(fix_to_virt(FIX_SHARED_INFO),
+ pfn_pte_ma(shinfo_mfn, PAGE_KERNEL), 0);
HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
memset(empty_zero_page, 0, PAGE_SIZE);