ia64/linux-2.6.18-xen.hg

changeset 888:9090872bac23

xen/x86-64: fix phys_pmd_init() (regression from c/s 547)

I didn't pay attention to the fact that 'end' must always be an upper
bound, while xen_start_info->nr_pages must be additionally during
boot.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri May 29 09:17:16 2009 +0100 (2009-05-29)
parents 85a4c18ad9aa
children 97e0d58411d4
files arch/x86_64/mm/init-xen.c
line diff
     1.1 --- a/arch/x86_64/mm/init-xen.c	Fri May 29 09:16:37 2009 +0100
     1.2 +++ b/arch/x86_64/mm/init-xen.c	Fri May 29 09:17:16 2009 +0100
     1.3 @@ -457,9 +457,9 @@ phys_pmd_init(pmd_t *pmd, unsigned long 
     1.4  		for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
     1.5  			unsigned long pteval = address | _PAGE_NX | _KERNPG_TABLE;
     1.6  
     1.7 -			if (address >= (after_bootmem
     1.8 -			                ? end
     1.9 -			                : xen_start_info->nr_pages << PAGE_SHIFT))
    1.10 +			if (address >= end ||
    1.11 +			    (!after_bootmem &&
    1.12 +			     (address >> PAGE_SHIFT) >= xen_start_info->nr_pages))
    1.13  				pteval = 0;
    1.14  			else if (make_readonly(address))
    1.15  				pteval &= ~_PAGE_RW;