The patch titled byteorder: parisc: use the new byteorder headers has been added to the -mm tree. Its filename is byteorder-parisc-use-the-new-byteorder-headers.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: byteorder: parisc: use the new byteorder headers From: Harvey Harrison <harvey.harrison@xxxxxxxxx> Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx> Cc: Kyle McMartin <kyle@xxxxxxxxxxx> Cc: Matthew Wilcox <matthew@xxxxxx> Cc: Grant Grundler <grundler@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/parisc/include/asm/byteorder.h | 37 ++++++++------------------ 1 file changed, 12 insertions(+), 25 deletions(-) diff -puN arch/parisc/include/asm/byteorder.h~byteorder-parisc-use-the-new-byteorder-headers arch/parisc/include/asm/byteorder.h --- a/arch/parisc/include/asm/byteorder.h~byteorder-parisc-use-the-new-byteorder-headers +++ a/arch/parisc/include/asm/byteorder.h @@ -4,9 +4,10 @@ #include <asm/types.h> #include <linux/compiler.h> -#ifdef __GNUC__ +#define __BIG_ENDIAN +#define __SWAB_64_THRU_32__ -static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) +static inline __attribute_const__ __u16 __arch_swab16(__u16 x) { __asm__("dep %0, 15, 8, %0\n\t" /* deposit 00ab -> 0bab */ "shd %%r0, %0, 8, %0" /* shift 000000ab -> 00ba */ @@ -14,8 +15,9 @@ static __inline__ __attribute_const__ __ : "0" (x)); return x; } +#define __arch_swab16 __arch_swab16 -static __inline__ __attribute_const__ __u32 ___arch__swab24(__u32 x) +static inline __attribute_const__ __u32 __arch_swab24(__u32 x) { __asm__("shd %0, %0, 8, %0\n\t" /* shift xabcxabc -> cxab */ "dep %0, 15, 8, %0\n\t" /* deposit cxab -> cbab */ @@ -25,7 +27,7 @@ static __inline__ __attribute_const__ __ return x; } -static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) +static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { unsigned int temp; __asm__("shd %0, %0, 16, %1\n\t" /* shift abcdabcd -> cdab */ @@ -35,7 +37,7 @@ static __inline__ __attribute_const__ __ : "0" (x)); return x; } - +#define __arch_swab32 __arch_swab32 #if BITS_PER_LONG > 32 /* @@ -48,7 +50,8 @@ static __inline__ __attribute_const__ __ ** HSHR 67452301 -> *6*4*2*0 into %0 ** OR %0 | %1 -> 76543210 into %0 (all done!) */ -static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x) { +static inline __attribute_const__ __u64 __arch_swab64(__u64 x) +{ __u64 temp; __asm__("permh,3210 %0, %0\n\t" "hshl %0, 8, %1\n\t" @@ -58,25 +61,9 @@ static __inline__ __attribute_const__ __ : "0" (x)); return x; } -#define __arch__swab64(x) ___arch__swab64(x) -#define __BYTEORDER_HAS_U64__ -#elif !defined(__STRICT_ANSI__) -static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x) -{ - __u32 t1 = ___arch__swab32((__u32) x); - __u32 t2 = ___arch__swab32((__u32) (x >> 32)); - return (((__u64) t1 << 32) | t2); -} -#define __arch__swab64(x) ___arch__swab64(x) -#define __BYTEORDER_HAS_U64__ -#endif - -#define __arch__swab16(x) ___arch__swab16(x) -#define __arch__swab24(x) ___arch__swab24(x) -#define __arch__swab32(x) ___arch__swab32(x) - -#endif /* __GNUC__ */ +#define __arch_swab64 __arch_swab64 +#endif /* BITS_PER_LONG > 32 */ -#include <linux/byteorder/big_endian.h> +#include <linux/byteorder.h> #endif /* _PARISC_BYTEORDER_H */ _ Patches currently in -mm which might be from harvey.harrison@xxxxxxxxx are byteorder-add-a-new-include-linux-swabh-to-define-byteswapping-functions.patch byteorder-add-include-linux-byteorderh-to-define-endian-helpers.patch linux-next.patch x86-fix-shadowed-variable-warning.patch cifs-remove-global_extern-macro.patch ppc-use-the-common-ascii-hex-helpers.patch powerpc-replace-__function__-with-__func__.patch v4l-drx397xdc-sparse-annotations.patch input-ads7846c-sparse-lock-annotation.patch kvm-make-functions-static.patch misdn-endian-annotations-for-struct-zt.patch misdn-annotate-iomem-pointer-and-add-statics.patch drivers-net-replace-__function__-with-__func__.patch scsi-replace-__inline-with-inline.patch scsi-aic79xx_core-fix-shadowed-variables-add-statics.patch scsi-aic79xx-aic79xx_pcic-fix-shadowed-variables.patch scsi-gdthc-use-unaligned-access-helpers.patch scsi-use-the-common-hex_asc-array-rather-than-a-private-one.patch wireless-replace-__function__-with-__func__.patch xfs-use-get_unaligned_-helpers.patch xtensa-replace-remaining-__function__-occurences.patch olpc-olpc_batteryc-sparse-endian-annotations.patch include-replace-__function__-with-__func__.patch misc-replace-__function__-with-__func__.patch befs-annotate-fs32-on-tests-for-superblock-endianness.patch byteorder-alpha-use-the-new-byteorder-headers.patch byteorder-arm-use-the-new-byteorder-headers.patch byteorder-avr32-use-the-new-byteorder-headers.patch byteorder-blackfin-use-the-new-byteorder-headers.patch byteorder-cris-use-the-new-byteorder-headers.patch byteorder-frv-use-the-new-byteorder-headers.patch byteorder-h8300-use-the-new-byteorder-headers.patch byteorder-ia64-use-the-new-byteorder-headers.patch byteorder-m32r-use-the-new-byteorder-headers.patch byteorder-m68k-use-the-new-byteorder-headers.patch byteorder-m68knommu-use-the-new-byteorder-headers.patch byteorder-mips-use-the-new-byteorder-headers.patch byteorder-mn10300-use-the-new-byteorder-headers.patch byteorder-parisc-use-the-new-byteorder-headers.patch byteorder-powerpc-use-the-new-byteorder-headers.patch byteorder-s390-use-the-new-byteorder-headers.patch byteorder-sh-use-the-new-byteorder-headers.patch byteorder-sparc-use-the-new-byteorder-headers.patch byteorder-x86-use-the-new-byteorder-headers.patch byteorder-xtensa-use-the-new-byteorder-headers.patch byteorder-fix-direct-byteswap-includes.patch byteorder-remove-the-old-byteorder-implementation.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html