]> git.openfabrics.org - ~aditr/compat.git/commitdiff
compat: extend phys_addr_t backport to 2.6.24
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Wed, 8 Feb 2012 04:01:55 +0000 (20:01 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Wed, 8 Feb 2012 04:01:55 +0000 (20:01 -0800)
x86 only got phys_addr_t as of 2.6.25. This patch addresses
that. The only arch that had phys_addr_t prior to that is
PPC.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
include/linux/compat-2.6.25.h
include/linux/compat-2.6.28.h

index ad3220a7521c4a704d41048a2b49e5e99a64c1bf..c389ab2c18e67218ab113cee1a7140f6726475e4 100644 (file)
 #include <linux/pm_qos_params.h>
 #include <linux/pci.h>
 
+/*
+ * phys_addr_t was added as a generic arch typedef on 2.6.28,
+ * that backport is dealt with in compat-2.6.28.h
+ */
+#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
+
+#if defined(CONFIG_64BIT) || defined(CONFIG_X86_PAE) || defined(CONFIG_PHYS_64BIT)
+typedef u64 phys_addr_t;
+#else
+typedef u32 phys_addr_t;
+#endif
+
+#endif /* x86 */
+
 /* The macro below uses a const upstream, this differs */
 
 /**
index c4865f0919ed3bb75d924edd0680139acde3dc8d..c0ca70b1da98eaa657f9657f1fa1b578a78c7fe7 100644 (file)
@@ -19,7 +19,8 @@
 #if defined(CONFIG_X86) || defined(CONFIG_X86_64) || defined(CONFIG_PPC)
 /*
  * CONFIG_PHYS_ADDR_T_64BIT was added as new to all architectures
- * as of 2.6.28 but x86 and ppc had it already.
+ * as of 2.6.28 but x86 and ppc had it already. x86 only got phys_addr_t
+ * as of 2.6.25 but then is backported in compat-2.6.25.h
  */
 #else
 #if defined(CONFIG_64BIT) || defined(CONFIG_X86_PAE) || defned(CONFIG_PPC64) || defined(CONFIG_PHYS_64BIT)