* [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses
@ 2010-01-21 10:01 Mike Frysinger
2010-01-21 10:01 ` [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code Mike Frysinger
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Mike Frysinger @ 2010-01-21 10:01 UTC (permalink / raw)
To: u-boot
This is based on the asm-arm/unaligned.h, but made generic so all arches
that cannot do unaligned accesses can utilize it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/asm-generic/unaligned.h | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
create mode 100644 include/asm-generic/unaligned.h
diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h
new file mode 100644
index 0000000..fd02550
--- /dev/null
+++ b/include/asm-generic/unaligned.h
@@ -0,0 +1,23 @@
+#ifndef _GENERIC_UNALIGNED_H
+#define _GENERIC_UNALIGNED_H
+
+#include <asm/byteorder.h>
+
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
+#include <linux/unaligned/generic.h>
+
+/*
+ * Select endianness
+ */
+#if defined(__LITTLE_ENDIAN)
+#define get_unaligned __get_unaligned_le
+#define put_unaligned __put_unaligned_le
+#elif defined(__BIG_ENDIAN)
+#define get_unaligned __get_unaligned_be
+#define put_unaligned __put_unaligned_be
+#else
+#error invalid endian
+#endif
+
+#endif
--
1.6.6
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code
2010-01-21 10:01 [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Mike Frysinger
@ 2010-01-21 10:01 ` Mike Frysinger
2010-03-13 23:11 ` Wolfgang Denk
2010-01-21 10:01 ` [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h Mike Frysinger
2010-03-13 23:10 ` [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Wolfgang Denk
2 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2010-01-21 10:01 UTC (permalink / raw)
To: u-boot
The new zlib code wants asm/unaligned.h, so have the Blackfin version pull
in the asm-generic/unaligned.h.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/asm-blackfin/unaligned.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 include/asm-blackfin/unaligned.h
diff --git a/include/asm-blackfin/unaligned.h b/include/asm-blackfin/unaligned.h
new file mode 100644
index 0000000..6cecbbb
--- /dev/null
+++ b/include/asm-blackfin/unaligned.h
@@ -0,0 +1 @@
+#include <asm-generic/unaligned.h>
--
1.6.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code
2010-01-21 10:01 ` [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code Mike Frysinger
@ 2010-03-13 23:11 ` Wolfgang Denk
0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2010-03-13 23:11 UTC (permalink / raw)
To: u-boot
Dear Mike Frysinger,
In message <1264068076-4504-2-git-send-email-vapier@gentoo.org> you wrote:
> The new zlib code wants asm/unaligned.h, so have the Blackfin version pull
> in the asm-generic/unaligned.h.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> include/asm-blackfin/unaligned.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 include/asm-blackfin/unaligned.h
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The greatest warriors are the ones who fight for peace."
- Holly Near
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h
2010-01-21 10:01 [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Mike Frysinger
2010-01-21 10:01 ` [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code Mike Frysinger
@ 2010-01-21 10:01 ` Mike Frysinger
2010-01-24 1:18 ` Tom
2010-03-13 23:10 ` [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Wolfgang Denk
2 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2010-01-21 10:01 UTC (permalink / raw)
To: u-boot
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
note: havent compile tested this, but it should be straight forward ...
include/asm-arm/unaligned.h | 20 +-------------------
1 files changed, 1 insertions(+), 19 deletions(-)
diff --git a/include/asm-arm/unaligned.h b/include/asm-arm/unaligned.h
index 44593a8..6cecbbb 100644
--- a/include/asm-arm/unaligned.h
+++ b/include/asm-arm/unaligned.h
@@ -1,19 +1 @@
-#ifndef _ASM_ARM_UNALIGNED_H
-#define _ASM_ARM_UNALIGNED_H
-
-#include <linux/unaligned/le_byteshift.h>
-#include <linux/unaligned/be_byteshift.h>
-#include <linux/unaligned/generic.h>
-
-/*
- * Select endianness
- */
-#ifndef __ARMEB__
-#define get_unaligned __get_unaligned_le
-#define put_unaligned __put_unaligned_le
-#else
-#define get_unaligned __get_unaligned_be
-#define put_unaligned __put_unaligned_be
-#endif
-
-#endif /* _ASM_ARM_UNALIGNED_H */
+#include <asm-generic/unaligned.h>
--
1.6.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h
2010-01-21 10:01 ` [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h Mike Frysinger
@ 2010-01-24 1:18 ` Tom
2010-01-24 1:42 ` Mike Frysinger
0 siblings, 1 reply; 9+ messages in thread
From: Tom @ 2010-01-24 1:18 UTC (permalink / raw)
To: u-boot
Mike Frysinger wrote:
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> note: havent compile tested this, but it should be straight forward ...
I have compile tested this.
It is fine.
Was this run tested ?
I see this was imported from the kernel.
Please include the version of the kernel this came from.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h
2010-01-24 1:18 ` Tom
@ 2010-01-24 1:42 ` Mike Frysinger
2010-01-24 16:07 ` Tom
0 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2010-01-24 1:42 UTC (permalink / raw)
To: u-boot
On Saturday 23 January 2010 20:18:04 Tom wrote:
> Mike Frysinger wrote:
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > ---
> > note: havent compile tested this, but it should be straight forward ...
>
> I have compile tested this.
> It is fine.
>
> Was this run tested ?
if i cant compile. i cant run
> I see this was imported from the kernel.
if that's true, that isnt "my problem". i modified files that existed in u-
boot already; i did not myself copy directly from the linux kernel. feel free
to add any comments/etc... you find appropriate.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100123/027620c9/attachment.pgp
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h
2010-01-24 1:42 ` Mike Frysinger
@ 2010-01-24 16:07 ` Tom
2010-01-24 18:23 ` Mike Frysinger
0 siblings, 1 reply; 9+ messages in thread
From: Tom @ 2010-01-24 16:07 UTC (permalink / raw)
To: u-boot
Mike Frysinger wrote:
> On Saturday 23 January 2010 20:18:04 Tom wrote:
>> Mike Frysinger wrote:
>>> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>>> ---
>>> note: havent compile tested this, but it should be straight forward ...
>> I have compile tested this.
>> It is fine.
>>
>> Was this run tested ?
>
> if i cant compile. i cant run
In some case people do a runtime test without doing a full compile test
with MAKEALL arm. I was hoping this was the case.
>
>> I see this was imported from the kernel.
>
> if that's true, that isnt "my problem". i modified files that existed in u-
> boot already; i did not myself copy directly from the linux kernel. feel free
> to add any comments/etc... you find appropriate.
> -mike
On reviewing 1/3 closer against the linux kernel
diff .../linux-2.6-arm/include/asm-generic/unaligned.h
.../u-boot-arm/include/asm-generic/unaligned.h
It looks like the version from the kernel could be used without
modifications. It looks very similar to your patch.
This is the commit from the kernel
aafe4dbed0bf6cbdb2e9f03e1d42f8a540d8541d
asm-generic: add generic versions of common headers
These are all kernel internal interfaces that get copied
around a lot. In most cases, architectures can provide
their own optimized versions, but these generic versions
can work as well.
I have tried to use the most common contents of each
header to allow existing architectures to migrate easily.
Thanks to Remis for suggesting a number of cleanups.
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I would prefer to reuse the kernel source where possible.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread* [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h
2010-01-24 16:07 ` Tom
@ 2010-01-24 18:23 ` Mike Frysinger
0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2010-01-24 18:23 UTC (permalink / raw)
To: u-boot
On Sunday 24 January 2010 11:07:10 Tom wrote:
> Mike Frysinger wrote:
> > On Saturday 23 January 2010 20:18:04 Tom wrote:
> >> I see this was imported from the kernel.
> >
> > if that's true, that isnt "my problem". i modified files that existed in
> > u- boot already; i did not myself copy directly from the linux kernel.
> > feel free to add any comments/etc... you find appropriate.
>
> On reviewing 1/3 closer against the linux kernel
>
> diff .../linux-2.6-arm/include/asm-generic/unaligned.h
> .../u-boot-arm/include/asm-generic/unaligned.h
>
> It looks like the version from the kernel could be used without
> modifications.
the kernel has more headers which u-boot lacks
> I would prefer to reuse the kernel source where possible.
if you feel like doing the license review to make sure this is OK, then have
at it. i dont which is why i tweaked existing u-boot files.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100124/38b23e47/attachment.pgp
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses
2010-01-21 10:01 [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Mike Frysinger
2010-01-21 10:01 ` [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code Mike Frysinger
2010-01-21 10:01 ` [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h Mike Frysinger
@ 2010-03-13 23:10 ` Wolfgang Denk
2 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2010-03-13 23:10 UTC (permalink / raw)
To: u-boot
Dear Mike Frysinger,
In message <1264068076-4504-1-git-send-email-vapier@gentoo.org> you wrote:
> This is based on the asm-arm/unaligned.h, but made generic so all arches
> that cannot do unaligned accesses can utilize it.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> include/asm-generic/unaligned.h | 23 +++++++++++++++++++++++
> 1 files changed, 23 insertions(+), 0 deletions(-)
> create mode 100644 include/asm-generic/unaligned.h
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"You're just jealous." "What, of an overgrown puppy with a single-
figure IQ?" - Terry Pratchett, _Moving Pictures_
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-03-13 23:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 10:01 [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Mike Frysinger
2010-01-21 10:01 ` [U-Boot] [PATCH 2/3] asm-blackfin/unaligned.h: add for zlib code Mike Frysinger
2010-03-13 23:11 ` Wolfgang Denk
2010-01-21 10:01 ` [U-Boot] [PATCH 3/3] asm-arm/unaligned.h: switch to asm-generic/unaligned.h Mike Frysinger
2010-01-24 1:18 ` Tom
2010-01-24 1:42 ` Mike Frysinger
2010-01-24 16:07 ` Tom
2010-01-24 18:23 ` Mike Frysinger
2010-03-13 23:10 ` [U-Boot] [PATCH 1/3] asm-generic/unaligned.h: dynamic default unaligned accesses Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox