aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-01-15 08:27:27 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-01-15 08:27:27 +0000
commit4a7e23445795a8a46f5bd1cbc349a3bf0ae726f6 (patch)
tree1b79abb1e0949a6363b2ddbb147a29006103e725
parent46785b54f8cda84811f02bdeee8d9bd780fa29dc (diff)
downloadxen-4a7e23445795a8a46f5bd1cbc349a3bf0ae726f6.tar.gz
xen-4a7e23445795a8a46f5bd1cbc349a3bf0ae726f6.tar.bz2
xen-4a7e23445795a8a46f5bd1cbc349a3bf0ae726f6.zip
x86: A further fix to xen_in_range().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r--xen/arch/x86/setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 1c8848e127..5f5be02bbe 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -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;