From: Luis R. Rodriguez Date: Wed, 8 Feb 2012 04:01:55 +0000 (-0800) Subject: compat: extend phys_addr_t backport to 2.6.24 X-Git-Tag: compat-2012-07-02~23 X-Git-Url: https://git.openfabrics.org/?p=~emulex%2Ffor-vlad%2Fold%2Fcompat.git;a=commitdiff_plain;h=b861c7e684d90598f8662f7cbb9ca7f7df0d5efc;ds=sidebyside compat: extend phys_addr_t backport to 2.6.24 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 --- diff --git a/include/linux/compat-2.6.25.h b/include/linux/compat-2.6.25.h index ad3220a..c389ab2 100644 --- a/include/linux/compat-2.6.25.h +++ b/include/linux/compat-2.6.25.h @@ -17,6 +17,20 @@ #include #include +/* + * 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 */ /** diff --git a/include/linux/compat-2.6.28.h b/include/linux/compat-2.6.28.h index c4865f0..c0ca70b 100644 --- a/include/linux/compat-2.6.28.h +++ b/include/linux/compat-2.6.28.h @@ -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)