Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-19 Thread Shinya Kuribayashi
On 12/18/09 10:06 PM, Stefan Roese wrote:
 Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out
 that it's different from the Linux version.

 I'm afraid 'LMO' needlessly makes you confused.  Or am I missing
 something?

 Yes, LMO was confusing me.

Sorry for that, and thanks for trying to check the diff.  I'll
respin the patch during the merge window, with proper words.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Himanshu Chauhan
Shinya Kuribayashi wrote:
 make -C lib_generic/
 zlib.c:31:27: error: asm/unaligned.h: No such file or directory
 zlib.c: In function 'inflate_fast':
 zlib.c:641: warning: implicit declaration of function 'get_unaligned'
 make[1]: *** [zlib.o] Error 1
 make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
 make: *** [lib_generic/libgeneric.a] Error 2
 
 Import relevant header file from LMO tree (slightly modified to U-Boot).
 
 Reported-by: Himanshu Chauhan himan...@symmetricore.com
 Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com
 ---
 
 Himanshu Chauhan wrote:
 I see that in include directory asm points to asm-mips. Inside 
 asm-mips there is another link arch-arch-mips which is a dead link. 
 THere is no directory named arch-mips there.
 
 This is another topic, let's ignore here.
 
 Whats the problem here? Should I pull only the MIPS custodian tree?
 
 I confirmed that this patch fixes the build error, but not sure
 it works or not.  Just build tested.  And note that there there's
 nothing interesting in the u-boot-mips tree, sorry.
 
 
 include/asm-mips/unaligned.h |   26 ++
 1 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-mips/unaligned.h
 
 diff --git a/include/asm-mips/unaligned.h b/include/asm-mips/unaligned.h
 new file mode 100644
 index 000..da6a347
 --- /dev/null
 +++ b/include/asm-mips/unaligned.h
 @@ -0,0 +1,26 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General 
 Public
 + * License.  See the file COPYING in the main directory of this archive
 + * for more details.
 + *
 + * Copyright (C) 2007 Ralf Baechle (r...@linux-mips.org)
 + */
 +#ifndef _ASM_MIPS_UNALIGNED_H
 +#define _ASM_MIPS_UNALIGNED_H
 +
 +#include compiler.h
 +#if defined(__MIPSEB__)
 +# define get_unaligned__get_unaligned_be
 +# define put_unaligned__put_unaligned_be
 +#elif defined(__MIPSEL__)
 +# define get_unaligned__get_unaligned_le
 +# define put_unaligned__put_unaligned_le
 +#else
 +#  error MIPS, but neither __MIPSEB__, nor __MIPSEL__???
 +#endif
 +
 +# include linux/unaligned/le_byteshift.h
 +# include linux/unaligned/be_byteshift.h
 +# include linux/unaligned/generic.h
 +
 +#endif /* _ASM_MIPS_UNALIGNED_H */

Thanks for sending this patch across. I will try this.

- Himanshu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Himanshu Chauhan
Stefan Roese wrote:
 On Friday 18 December 2009 11:32:13 Shinya Kuribayashi wrote:
 make -C lib_generic/
 zlib.c:31:27: error: asm/unaligned.h: No such file or directory
 zlib.c: In function 'inflate_fast':
 zlib.c:641: warning: implicit declaration of function 'get_unaligned'
 make[1]: *** [zlib.o] Error 1
 make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
 make: *** [lib_generic/libgeneric.a] Error 2

 Import relevant header file from LMO tree (slightly modified to U-Boot).
 
 Why don't you import this file from the Linux tree? This should work without 
 modifications. And that's what we've done for PPC and ARM as well.
  
 Cheers,
 Stefan
 
 --
 DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
 

I think thats what it is. Both are same.

-Himanshu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Stefan Roese
On Friday 18 December 2009 13:04:59 Himanshu Chauhan wrote:
  Import relevant header file from LMO tree (slightly modified to U-Boot).
 
  Why don't you import this file from the Linux tree? This should work
  without modifications. And that's what we've done for PPC and ARM as
  well.
 
  Cheers,
  Stefan
 
  --
  DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
  HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
  Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
 
 I think thats what it is. Both are same.

No, not exactly. They're nearly identical. But there are differences. Not sure 
if these differences are important though.

Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that 
it's different from the Linux version.

Cheers,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Stefan Roese
On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
  I think thats what it is. Both are same.
 
 No, not exactly. They're nearly identical. But there are differences. Not
  sure if these differences are important though.
 
 Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that
 it's different from the Linux version.

Just to make it clear. Here a diff between both versions:

--- u-boot/include/asm-mips/unaligned.h
+++ linux-2.6/linus/arch/mips/include/asm/unaligned.h
@@ -8,19 +8,21 @@
 #ifndef _ASM_MIPS_UNALIGNED_H
 #define _ASM_MIPS_UNALIGNED_H

-#include compiler.h
+#include linux/compiler.h
 #if defined(__MIPSEB__)
+# include linux/unaligned/be_struct.h
+# include linux/unaligned/le_byteshift.h
 # define get_unaligned __get_unaligned_be
 # define put_unaligned __put_unaligned_be
 #elif defined(__MIPSEL__)
+# include linux/unaligned/le_struct.h
+# include linux/unaligned/be_byteshift.h
 # define get_unaligned __get_unaligned_le
 # define put_unaligned __put_unaligned_le
 #else
 #  error MIPS, but neither __MIPSEB__, nor __MIPSEL__???
 #endif

-# include linux/unaligned/le_byteshift.h
-# include linux/unaligned/be_byteshift.h
 # include linux/unaligned/generic.h

 #endif /* _ASM_MIPS_UNALIGNED_H */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Himanshu Chauhan
Stefan Roese wrote:
 On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
 I think thats what it is. Both are same.
 No, not exactly. They're nearly identical. But there are differences. Not
  sure if these differences are important though.

 Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that
 it's different from the Linux version.
 
 Just to make it clear. Here a diff between both versions:
 
 --- u-boot/include/asm-mips/unaligned.h
 +++ linux-2.6/linus/arch/mips/include/asm/unaligned.h
 @@ -8,19 +8,21 @@
  #ifndef _ASM_MIPS_UNALIGNED_H
  #define _ASM_MIPS_UNALIGNED_H
 
 -#include compiler.h
 +#include linux/compiler.h
  #if defined(__MIPSEB__)
 +# include linux/unaligned/be_struct.h
 +# include linux/unaligned/le_byteshift.h
  # define get_unaligned __get_unaligned_be
  # define put_unaligned __put_unaligned_be
  #elif defined(__MIPSEL__)
 +# include linux/unaligned/le_struct.h
 +# include linux/unaligned/be_byteshift.h
  # define get_unaligned __get_unaligned_le
  # define put_unaligned __put_unaligned_le
  #else
  #  error MIPS, but neither __MIPSEB__, nor __MIPSEL__???
  #endif
 
 -# include linux/unaligned/le_byteshift.h
 -# include linux/unaligned/be_byteshift.h
  # include linux/unaligned/generic.h
 
  #endif /* _ASM_MIPS_UNALIGNED_H */
 

I think whatever Shinya sent was modified version of linux's unaligned.h 
and its working.

- Himanshu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Stefan Roese
On Friday 18 December 2009 14:02:01 Shinya Kuribayashi wrote:
  I think thats what it is. Both are same.
 
  No, not exactly. They're nearly identical. But there are differences. Not
  sure if these differences are important though.
 
 Hm, the original header is (lmo = linux-mips.org):
 http://git.kernel.org/?p=linux/kernel/git/ralf/linux.git;a=blob;f=arch/mips
 /include/asm/unaligned.h;h=42f66c311473abb98fe7a845e360e365ccfed837;hb=mast
 er
 
 Are you referring to another one?

I just took the one from the latest Linux tree (Linus from today).
 
  Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out
  that it's different from the Linux version.
 
 I'm afraid 'LMO' needlessly makes you confused.  Or am I missing
 something?

Yes, LMO was confusing me.

Cheers,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Shinya Kuribayashi
Stefan Roese wrote:
 On Friday 18 December 2009 13:04:59 Himanshu Chauhan wrote:
 Import relevant header file from LMO tree (slightly modified to U-Boot).
 Why don't you import this file from the Linux tree? This should work
 without modifications. And that's what we've done for PPC and ARM as
 well.
[...]
 I think thats what it is. Both are same.
 
 No, not exactly. They're nearly identical. But there are differences. Not 
 sure 
 if these differences are important though.

Hm, the original header is (lmo = linux-mips.org):
http://git.kernel.org/?p=linux/kernel/git/ralf/linux.git;a=blob;f=arch/mips/include/asm/unaligned.h;h=42f66c311473abb98fe7a845e360e365ccfed837;hb=master

Are you referring to another one?

 Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that 
 it's different from the Linux version.

I'm afraid 'LMO' needlessly makes you confused.  Or am I missing
something?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Himanshu Chauhan
Shinya Kuribayashi wrote:
 make -C lib_generic/
 zlib.c:31:27: error: asm/unaligned.h: No such file or directory
 zlib.c: In function 'inflate_fast':
 zlib.c:641: warning: implicit declaration of function 'get_unaligned'
 make[1]: *** [zlib.o] Error 1
 make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
 make: *** [lib_generic/libgeneric.a] Error 2
 
 Import relevant header file from LMO tree (slightly modified to U-Boot).
 
 Reported-by: Himanshu Chauhan himan...@symmetricore.com
 Signed-off-by: Shinya Kuribayashi shinya.kuribaya...@necel.com
 ---
 
 Himanshu Chauhan wrote:
 I see that in include directory asm points to asm-mips. Inside
 asm-mips there is another link arch-arch-mips which is a dead link.
 THere is no directory named arch-mips there.
 
 This is another topic, let's ignore here.
 

Is arch-mips scheduled to be added?

Himanshu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Shinya Kuribayashi
Himanshu Chauhan wrote:
 Himanshu Chauhan wrote:
 I see that in include directory asm points to asm-mips. Inside
 asm-mips there is another link arch-arch-mips which is a dead link.
 THere is no directory named arch-mips there.
 This is another topic, let's ignore here.
 
 Is arch-mips scheduled to be added?

Not at the moment.  I'm not sure how it works, in the first place.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: qemu_mips: Fix a build failure caused by missing asm/unaligned.h

2009-12-18 Thread Himanshu Chauhan
Wolfgang Denk wrote:
 Dear Himanshu Chauhan,
 
 In message 4b2b79a9.1000...@symmetricore.com you wrote:
 Stefan Roese wrote:
 On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
 I think thats what it is. Both are same.
 No, not exactly. They're nearly identical. But there are differences. Not
  sure if these differences are important though.

 Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that
 it's different from the Linux version.
 Just to make it clear. Here a diff between both versions:

 --- u-boot/include/asm-mips/unaligned.h
 +++ linux-2.6/linus/arch/mips/include/asm/unaligned.h
 I think whatever Shinya sent was modified version of linux's unaligned.h 
 and its working.
 
 Hm... has this really been tested on both big endian and on little
 endian MIPS systems?
 
 Best regards,
 
 Wolfgang Denk
 

Dear Wolfgang,

I am using MIPS emulation on QEMU for my U-Boot. This patch works on big-endian 
emulation. I haven't
tested it on little endian emulation. My statement of its working was for the 
build fix. So I
won't say its ready for commit before being *actually* tested thoroughly.

Best Regards
Himanshu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot