Re: [PATCH 2/6] include/linux/unaligned/{l,b}e_byteshift.h: Fix usage for compressed kernels

2009-08-05 Thread Albin Tonnerre
On Tue, Aug 04, 2009 at 03:55:50PM -0700, Andrew Morton wrote :
 On Mon,  3 Aug 2009 16:58:17 +0200
 Albin Tonnerre albin.tonne...@free-electrons.com wrote:

  When unaligned accesses are required for uncompressing a kernel (such as
  for LZO decompression on ARM in a patch that follows), including
  linux/kernel.h causes issues as it brings in a lot of things that are
  not available in the decompression environment.
  However, those files apparently use nothing from linux/kernel.h, all
  they need is the declaration of types such as u32 or u64, so
  linux/types.h should be enough

 Again, please provide a full description of thes issues which a patch
 addresses so that the patch's importance can be understood by others,
 thanks.

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':
/home/albin/devel/free-electrons/gits/linux-2.6/arch/arm/include/asm/ptrace.h:158:
 undefined reference to `elf_hwcap'
arch/arm/boot/compressed/misc.o: In function `console_silent':
/home/albin/devel/free-electrons/gits/linux-2.6/include/linux/kernel.h:292: 
undefined reference to `console_printk'
arch/arm/boot/compressed/misc.o: In function `console_verbose':
/home/albin/devel/free-electrons/gits/linux-2.6/include/linux/kernel.h:297: 
undefined reference to `console_printk'
arch/arm/boot/compressed/misc.o: In function `pack_hex_byte':
/home/albin/devel/free-electrons/gits/linux-2.6/include/linux/kernel.h:360: 
undefined reference to `hex_asc'
arch/arm/boot/compressed/misc.o: In function `hweight_long':
/home/albin/devel/free-electrons/gits/linux-2.6/include/linux/bitops.h:45: 
undefined reference to `hweight32'
arch/arm/boot/compressed/misc.o: In function `__cmpxchg_local_generic':
/home/albin/devel/free-electrons/gits/linux-2.6/include/asm-generic/cmpxchg-local.h:21:
 undefined reference to `wrong_size_cmpxchg'
/home/albin/devel/free-electrons/gits/linux-2.6/include/asm-generic/cmpxchg-local.h:42:
 undefined reference to `wrong_size_cmpxchg'
arch/arm/boot/compressed/misc.o: In function `__xchg':
/home/albin/devel/free-electrons/gits/linux-2.6/arch/arm/include/asm/system.h:309:
 undefined reference to `__bad_xchg'
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2

Regards,
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/6] include/linux/unaligned/{l,b}e_byteshift.h: Fix usage for compressed kernels

2009-08-04 Thread Andrew Morton
On Mon,  3 Aug 2009 16:58:17 +0200
Albin Tonnerre albin.tonne...@free-electrons.com wrote:

 When unaligned accesses are required for uncompressing a kernel (such as
 for LZO decompression on ARM in a patch that follows), including
 linux/kernel.h causes issues as it brings in a lot of things that are
 not available in the decompression environment.
 However, those files apparently use nothing from linux/kernel.h, all
 they need is the declaration of types such as u32 or u64, so
 linux/types.h should be enough

Again, please provide a full description of thes issues which a patch
addresses so that the patch's importance can be understood by others,
thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/6] include/linux/unaligned/{l,b}e_byteshift.h: Fix usage for compressed kernels

2009-08-03 Thread Albin Tonnerre
When unaligned accesses are required for uncompressing a kernel (such as
for LZO decompression on ARM in a patch that follows), including
linux/kernel.h causes issues as it brings in a lot of things that are
not available in the decompression environment.
However, those files apparently use nothing from linux/kernel.h, all
they need is the declaration of types such as u32 or u64, so
linux/types.h should be enough

Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com
---
 include/linux/unaligned/be_byteshift.h |2 +-
 include/linux/unaligned/le_byteshift.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/unaligned/be_byteshift.h 
b/include/linux/unaligned/be_byteshift.h
index 46dd12c..9356b24 100644
--- 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 linux/kernel.h
+#include linux/types.h
 
 static inline u16 __get_unaligned_be16(const u8 *p)
 {
diff --git a/include/linux/unaligned/le_byteshift.h 
b/include/linux/unaligned/le_byteshift.h
index 59777e9..be376fb 100644
--- 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 linux/kernel.h
+#include linux/types.h
 
 static inline u16 __get_unaligned_le16(const u8 *p)
 {
-- 
1.6.3.3

--
To unsubscribe from this list: send the line unsubscribe linux-embedded in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html