This is a note to let you know that I've just added the patch titled

    x86, mkpiggy: Don't open code put_unaligned_le32()

to the 3.3-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-mkpiggy-don-t-open-code-put_unaligned_le32.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 12871c568305a0b20f116315479a18cd46882e9b Mon Sep 17 00:00:00 2001
From: Matt Fleming <[email protected]>
Date: Tue, 28 Feb 2012 13:37:22 +0000
Subject: x86, mkpiggy: Don't open code put_unaligned_le32()

From: Matt Fleming <[email protected]>

commit 12871c568305a0b20f116315479a18cd46882e9b upstream.

Use the new headers in tools/include instead of rolling our own
put_unaligned_le32() implementation.

Cc: H. Peter Anvin <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Link: 
http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 arch/x86/boot/compressed/Makefile  |    1 +
 arch/x86/boot/compressed/mkpiggy.c |   11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)

--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -22,6 +22,7 @@ LDFLAGS := -m elf_$(UTS_MACHINE)
 LDFLAGS_vmlinux := -T
 
 hostprogs-y    := mkpiggy
+HOST_EXTRACFLAGS += -I$(srctree)/tools/include
 
 VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \
        $(obj)/string.o $(obj)/cmdline.o $(obj)/early_serial_console.o \
--- a/arch/x86/boot/compressed/mkpiggy.c
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -29,14 +29,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-
-static uint32_t getle32(const void *p)
-{
-       const uint8_t *cp = p;
-
-       return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
-               ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
-}
+#include <tools/le_byteshift.h>
 
 int main(int argc, char *argv[])
 {
@@ -69,7 +62,7 @@ int main(int argc, char *argv[])
        }
 
        ilen = ftell(f);
-       olen = getle32(&olen);
+       olen = get_unaligned_le32(&olen);
        fclose(f);
 
        /*


Patches currently in stable-queue which might be from [email protected] are

queue-3.3/x86-boot-restrict-cflags-for-hostprogs.patch
queue-3.3/x86-efi-fix-endian-issues-and-unaligned-accesses.patch
queue-3.3/x86-efi-fix-pointer-math-issue-in-handle_ramdisks.patch
queue-3.3/tools-include-add-byteshift-headers-for-endian-access.patch
queue-3.3/x86-mkpiggy-don-t-open-code-put_unaligned_le32.patch
queue-3.3/x86-boot-correct-cflags-for-hostprogs.patch
queue-3.3/x86-efi-add-dedicated-efi-stub-entry-point.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to