[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] linux: Fix swiotlb bug-out due to uninitialised end_pfn/max_mapnr.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1171974423 0
# Node ID ecb6cd61a9cfa70be364aace1cb183bae03b04fd
# Parent  93035b689834f805ad62a70b3e7585593758987d
linux: Fix swiotlb bug-out due to uninitialised end_pfn/max_mapnr.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h   |    2 +-
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 93035b689834 -r ecb6cd61a9cf 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h        Tue Feb 
20 12:22:40 2007 +0000
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h        Tue Feb 
20 12:27:03 2007 +0000
@@ -103,7 +103,7 @@ static inline unsigned long mfn_to_local
 
 static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 {
-       BUG_ON(pfn >= max_mapnr);
+       BUG_ON(max_mapnr && pfn >= max_mapnr);
        if (xen_feature(XENFEAT_auto_translated_physmap)) {
                BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
                return;
diff -r 93035b689834 -r ecb6cd61a9cf 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h      Tue Feb 
20 12:22:40 2007 +0000
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h      Tue Feb 
20 12:27:03 2007 +0000
@@ -97,7 +97,7 @@ static inline unsigned long mfn_to_local
 
 static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 {
-       BUG_ON(pfn >= end_pfn);
+       BUG_ON(end_pfn && pfn >= end_pfn);
        if (xen_feature(XENFEAT_auto_translated_physmap)) {
                BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
                return;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.