ia64/linux-2.6.18-xen.hg

changeset 695:75622c7943a9

dom0: Fix bad pte at booting time

Backport upstream kernel patch to fix Dom0's bad pte bug.
- In Dom0 kernel, at boot time, system will call bt_ioremap() to do
mappings for the Boot Time Fix Memory region. Also system will call
bt_iounmap() to unmap the memory region by setting phys=3D0. In this
case, system will encounter pte_ERROR(). This patch backports the
upstream kernel patch by Ingo Molnar <mingo@elte.hu>, with commit:
70c9f590ffc3f959cc81c1a3cecb6b8133caf35d

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Oct 09 10:11:13 2008 +0100 (2008-10-09)
parents 92094d768241
children 2b5cc22ab406
files arch/x86_64/mm/init-xen.c
line diff
     1.1 --- a/arch/x86_64/mm/init-xen.c	Wed Oct 08 14:13:52 2008 +0100
     1.2 +++ b/arch/x86_64/mm/init-xen.c	Thu Oct 09 10:11:13 2008 +0100
     1.3 @@ -274,7 +274,7 @@ static __init void set_pte_phys(unsigned
     1.4  		new_pte = __pte(0);
     1.5  
     1.6  	pte = pte_offset_kernel(pmd, vaddr);
     1.7 -	if (!pte_none(*pte) &&
     1.8 +	if (!pte_none(*pte) && pte_val(new_pte) &&
     1.9  	    __pte_val(*pte) != (__pte_val(new_pte) & __supported_pte_mask))
    1.10  		pte_ERROR(*pte);
    1.11  	set_pte(pte, new_pte);
    1.12 @@ -325,7 +325,7 @@ static __init void set_pte_phys_ma(unsig
    1.13  	new_pte = pfn_pte_ma(phys >> PAGE_SHIFT, prot);
    1.14  
    1.15  	pte = pte_offset_kernel(pmd, vaddr);
    1.16 -	if (!pte_none(*pte) &&
    1.17 +	if (!pte_none(*pte) && pte_val(new_pte) &&
    1.18  #ifdef CONFIG_ACPI
    1.19  	    /* __acpi_map_table() fails to properly call clear_fixmap() */
    1.20  	    (vaddr < __fix_to_virt(FIX_ACPI_END) ||