The patch titled

     optimise 64bit unaligned access on 32bit kernel

has been added to the -mm tree.  Its filename is

     optimise-64bit-unaligned-access-on-32bit-kernel.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

mips-remove-obsolete-giu-function-call-for-vr41xx.patch
mips-update-irq-handling-for-vr41xx.patch
mips-change-system-type-name-in-proc-for-vr41xx.patch
mips-remove-vr4181-support.patch
mips-remove-hp-laserjet-remains.patch
dec-pmag-aa-framebuffer-update.patch
dec-pmag-ba-frame-buffer-update.patch
dec-pmagb-b-framebuffer-update.patch
mips-add-support-for-qemu-system-architecture.patch
mips-technologies-pci-id-bits.patch
mips-add-tanbac-vr4131-multichip-module.patch
mips-add-default-select-configs-for-vr41xx.patch
mips-remove-vrc4171-config.patch
mips-changed-from-vr41xx-to-vr4100-series-in-kconfig.patch
mips-cleanup-32-64-bit-configuration.patch
mips-nuke-trailing-whitespace.patch
mips-fix-coherency-configuration.patch
mips-add-pcibios_select_root.patch
mips-add-pcibios_bus_to_resource.patch
mips-add-more-sys_support__kernel-and.patch
mips-fix-build-warnings.patch
strip-local-symbols-from-kallsyms.patch
delete-unused-do_nanosleep-declaration.patch
optimise-64bit-unaligned-access-on-32bit-kernel.patch
indycam--vino-drivers.patch
mips-fix-up-schedule_timeout-usage.patch



From: Ralf Baechle <[EMAIL PROTECTED]>

I've rewriten Atushi's fix for the 64-bit put_unaligned on 32-bit systems
bug to generate more efficient code.

This case has buzilla URL http://bugzilla.kernel.org/show_bug.cgi?id=5138.

Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 include/asm-generic/unaligned.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -puN 
include/asm-generic/unaligned.h~optimise-64bit-unaligned-access-on-32bit-kernel 
include/asm-generic/unaligned.h
--- 
devel/include/asm-generic/unaligned.h~optimise-64bit-unaligned-access-on-32bit-kernel
       2005-08-30 17:25:15.000000000 -0700
+++ devel-akpm/include/asm-generic/unaligned.h  2005-08-30 17:25:15.000000000 
-0700
@@ -16,9 +16,9 @@
  * The main single-value unaligned transfer routines.
  */
 #define get_unaligned(ptr) \
-       ((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr))))
+       __get_unaligned((ptr), sizeof(*(ptr)))
 #define put_unaligned(x,ptr) \
-       __put_unaligned((unsigned long)(x), (ptr), sizeof(*(ptr)))
+       __put_unaligned((__u64)(x), (ptr), sizeof(*(ptr)))
 
 /*
  * This function doesn't actually exist.  The idea is that when
@@ -36,19 +36,19 @@ struct __una_u16 { __u16 x __attribute__
  * Elemental unaligned loads 
  */
 
-static inline unsigned long __uldq(const __u64 *addr)
+static inline __u64 __uldq(const __u64 *addr)
 {
        const struct __una_u64 *ptr = (const struct __una_u64 *) addr;
        return ptr->x;
 }
 
-static inline unsigned long __uldl(const __u32 *addr)
+static inline __u32 __uldl(const __u32 *addr)
 {
        const struct __una_u32 *ptr = (const struct __una_u32 *) addr;
        return ptr->x;
 }
 
-static inline unsigned long __uldw(const __u16 *addr)
+static inline __u16 __uldw(const __u16 *addr)
 {
        const struct __una_u16 *ptr = (const struct __una_u16 *) addr;
        return ptr->x;
@@ -78,7 +78,7 @@ static inline void __ustw(__u16 val, __u
 
 #define __get_unaligned(ptr, size) ({          \
        const void *__gu_p = ptr;               \
-       unsigned long val;                      \
+       __typeof__(*(ptr)) val;                 \
        switch (size) {                         \
        case 1:                                 \
                val = *(const __u8 *)__gu_p;    \
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to