[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: A further fix to xen_in_range().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1263544047 0
# Node ID 88d2273c3942bff0c9cf0d202917d8d90fb00403
# Parent  db8a882f5515bbea739d7db3ddc79d5a754e8c3b
x86: A further fix to xen_in_range().

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/setup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r db8a882f5515 -r 88d2273c3942 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Thu Jan 14 14:11:25 2010 +0000
+++ b/xen/arch/x86/setup.c      Fri Jan 15 08:27:27 2010 +0000
@@ -1216,8 +1216,8 @@ int xen_in_range(unsigned long mfn)
         xen_regions[region_text].s =__pa(&_stext);
         xen_regions[region_text].e = __pa(&__init_begin);
         /* per-cpu data */
-        xen_regions[region_percpu].s = __pa(&__per_cpu_start);
-        xen_regions[region_percpu].e = xen_regions[2].s +
+        xen_regions[region_percpu].s = __pa(__per_cpu_start);
+        xen_regions[region_percpu].e = xen_regions[region_percpu].s +
             (((paddr_t)last_cpu(cpu_possible_map) + 1) << PERCPU_SHIFT);
         /* bss */
         xen_regions[region_bss].s = __pa(&__bss_start);
@@ -1238,7 +1238,7 @@ int xen_in_range(unsigned long mfn)
              * freed) section of the per-cpu data space. Each CPU's data
              * area is page-aligned, so the following arithmetic is safe.
              */
-            unsigned int off = ((start - (unsigned long)__per_cpu_start)
+            unsigned int off = ((start - __pa(__per_cpu_start))
                                 & (PERCPU_SIZE - 1));
             unsigned int data_sz = __per_cpu_data_end - __per_cpu_start;
             return off < data_sz;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.