WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] linux: Don't use set_fixmap/clear_fixmap

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] linux: Don't use set_fixmap/clear_fixmap after boot-time. It's not
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Mar 2007 11:31:13 -0800
Delivery-date: Wed, 07 Mar 2007 12:59:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] linux: Don't use set_fixmap/clear_fixmap after boot-time. It's not, Xen patchbot-unstable <=