diff mbox

[2/4] x86: ioremap: fix physical address check

Message ID 4C11FFC0.1030006@jp.fujitsu.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Kenji Kaneshige June 11, 2010, 9:20 a.m. UTC
None
diff mbox

Patch

Index: linux-2.6.34/arch/x86/mm/physaddr.h
===================================================================
--- linux-2.6.34.orig/arch/x86/mm/physaddr.h	2010-06-10 07:28:28.177229689 +0900
+++ linux-2.6.34/arch/x86/mm/physaddr.h	2010-06-10 07:28:32.587190857 +0900
@@ -3,8 +3,12 @@ 
 static inline int phys_addr_valid(resource_size_t addr)
 {
 #ifdef CONFIG_PHYS_ADDR_T_64BIT
+#ifdef CONFIG_X86_64
 	return !(addr >> boot_cpu_data.x86_phys_bits);
 #else
+	return !(addr >> 36);
+#endif
+#else
 	return 1;
 #endif
 }