From c5552ad03973839d83d32d7108f20c00f192633b Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 26 Jun 2010 20:42:58 +0000 Subject: rename target/linux/generic-2.6 to generic git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21952 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...eshift_h_fix_usage_for_compressed_kernels.patch | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 target/linux/generic/patches-2.6.31/049-byteshift_h_fix_usage_for_compressed_kernels.patch (limited to 'target/linux/generic/patches-2.6.31/049-byteshift_h_fix_usage_for_compressed_kernels.patch') diff --git a/target/linux/generic/patches-2.6.31/049-byteshift_h_fix_usage_for_compressed_kernels.patch b/target/linux/generic/patches-2.6.31/049-byteshift_h_fix_usage_for_compressed_kernels.patch new file mode 100644 index 000000000..5cd81070e --- /dev/null +++ b/target/linux/generic/patches-2.6.31/049-byteshift_h_fix_usage_for_compressed_kernels.patch @@ -0,0 +1,72 @@ +From 2fa4341074cd02fb39aa23410740764948755635 Mon Sep 17 00:00:00 2001 +From: Albin Tonnerre +Date: Wed, 23 Sep 2009 15:57:38 -0700 +Subject: [PATCH] include/linux/unaligned/{l,b}e_byteshift.h: fix usage for compressed kernels + +When unaligned accesses are required for uncompressing a kernel (such as +for LZO decompression on ARM in a patch that follows), including + causes issues as it brings in a lot of things that are +not available in the decompression environment. + +linux/kernel.h brings at least: +extern int console_printk[]; +extern const char hex_asc[]; +which causes errors at link-time as they are not available when +compiling the pre-boot environement. There are also a few others: + + arch/arm/boot/compressed/misc.o: In function `valid_user_regs': + arch/arm/include/asm/ptrace.h:158: undefined reference to `elf_hwcap' + arch/arm/boot/compressed/misc.o: In function `console_silent': + include/linux/kernel.h:292: undefined reference to `console_printk' + arch/arm/boot/compressed/misc.o: In function `console_verbose': + include/linux/kernel.h:297: undefined reference to `console_printk' + arch/arm/boot/compressed/misc.o: In function `pack_hex_byte': + include/linux/kernel.h:360: undefined reference to `hex_asc' + arch/arm/boot/compressed/misc.o: In function `hweight_long': + include/linux/bitops.h:45: undefined reference to `hweight32' + arch/arm/boot/compressed/misc.o: In function `__cmpxchg_local_generic': + include/asm-generic/cmpxchg-local.h:21: undefined reference to `wrong_size_cmpxchg' + include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' + arch/arm/boot/compressed/misc.o: In function `__xchg': + arch/arm/include/asm/system.h:309: undefined reference to `__bad_xchg' + +However, those files apparently use nothing from , all +they need is the declaration of types such as u32 or u64, so + should be enough + +Signed-off-by: Albin Tonnerre +Cc: Sam Ravnborg +Cc: Russell King +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: "H. Peter Anvin" +Cc: Phillip Lougher +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + include/linux/unaligned/be_byteshift.h | 2 +- + include/linux/unaligned/le_byteshift.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/include/linux/unaligned/be_byteshift.h ++++ b/include/linux/unaligned/be_byteshift.h +@@ -1,7 +1,7 @@ + #ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H + #define _LINUX_UNALIGNED_BE_BYTESHIFT_H + +-#include ++#include + + static inline u16 __get_unaligned_be16(const u8 *p) + { +--- a/include/linux/unaligned/le_byteshift.h ++++ b/include/linux/unaligned/le_byteshift.h +@@ -1,7 +1,7 @@ + #ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H + #define _LINUX_UNALIGNED_LE_BYTESHIFT_H + +-#include ++#include + + static inline u16 __get_unaligned_le16(const u8 *p) + { -- cgit v1.2.3