debuggers.hg

changeset 20855:88d2273c3942

x86: A further fix to xen_in_range().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 15 08:27:27 2010 +0000 (2010-01-15)
parents db8a882f5515
children 2d3869cfa90f
files xen/arch/x86/setup.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Thu Jan 14 14:11:25 2010 +0000
     1.2 +++ b/xen/arch/x86/setup.c	Fri Jan 15 08:27:27 2010 +0000
     1.3 @@ -1216,8 +1216,8 @@ int xen_in_range(unsigned long mfn)
     1.4          xen_regions[region_text].s =__pa(&_stext);
     1.5          xen_regions[region_text].e = __pa(&__init_begin);
     1.6          /* per-cpu data */
     1.7 -        xen_regions[region_percpu].s = __pa(&__per_cpu_start);
     1.8 -        xen_regions[region_percpu].e = xen_regions[2].s +
     1.9 +        xen_regions[region_percpu].s = __pa(__per_cpu_start);
    1.10 +        xen_regions[region_percpu].e = xen_regions[region_percpu].s +
    1.11              (((paddr_t)last_cpu(cpu_possible_map) + 1) << PERCPU_SHIFT);
    1.12          /* bss */
    1.13          xen_regions[region_bss].s = __pa(&__bss_start);
    1.14 @@ -1238,7 +1238,7 @@ int xen_in_range(unsigned long mfn)
    1.15               * freed) section of the per-cpu data space. Each CPU's data
    1.16               * area is page-aligned, so the following arithmetic is safe.
    1.17               */
    1.18 -            unsigned int off = ((start - (unsigned long)__per_cpu_start)
    1.19 +            unsigned int off = ((start - __pa(__per_cpu_start))
    1.20                                  & (PERCPU_SIZE - 1));
    1.21              unsigned int data_sz = __per_cpu_data_end - __per_cpu_start;
    1.22              return off < data_sz;