ia64/xen-unstable

changeset 14024:ecb6cd61a9cf

linux: Fix swiotlb bug-out due to uninitialised end_pfn/max_mapnr.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Feb 20 12:27:03 2007 +0000 (2007-02-20)
parents 93035b689834
children d907467f08cd e4ddec3dffb0
files linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h	Tue Feb 20 12:22:40 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h	Tue Feb 20 12:27:03 2007 +0000
     1.3 @@ -103,7 +103,7 @@ static inline unsigned long mfn_to_local
     1.4  
     1.5  static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
     1.6  {
     1.7 -	BUG_ON(pfn >= max_mapnr);
     1.8 +	BUG_ON(max_mapnr && pfn >= max_mapnr);
     1.9  	if (xen_feature(XENFEAT_auto_translated_physmap)) {
    1.10  		BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
    1.11  		return;
     2.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h	Tue Feb 20 12:22:40 2007 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h	Tue Feb 20 12:27:03 2007 +0000
     2.3 @@ -97,7 +97,7 @@ static inline unsigned long mfn_to_local
     2.4  
     2.5  static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
     2.6  {
     2.7 -	BUG_ON(pfn >= end_pfn);
     2.8 +	BUG_ON(end_pfn && pfn >= end_pfn);
     2.9  	if (xen_feature(XENFEAT_auto_translated_physmap)) {
    2.10  		BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
    2.11  		return;