# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173262419 0
# Node ID 228c3e05eb0056e7fc5383d7064372e8a8ec818e
# Parent 87f626f1d5f57f504116074698ae7affcd580b9d
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@xxxxxxxxxxxxx>
---
linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff -r 87f626f1d5f5 -r 228c3e05eb00
linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c Wed Mar 07
09:43:36 2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c Wed Mar 07
10:13:39 2007 +0000
@@ -62,7 +62,8 @@ static void pre_suspend(void)
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 post_suspend(int suspend_can
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_can
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);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|