Thread (10 messages) flat view 10 messages, 3 authors, 2011-01-22
STALE5717d

Revision v2 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v2 current
  4. v2 [diff vs current]

[PATCH 2/3] support ARM BE8 mode on a little endian machine

From: Russell King - ARM Linux <hidden>
Date: 2011-01-21 09:46:49

On Wed, Jan 19, 2011 at 02:44:46PM +0800, Stanley.Miao wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index a00055d..a33075b 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -131,6 +131,9 @@ start:
 		mov	r0, r0
 		.endr
 
+#ifdef CONFIG_BE8_ON_LE
+		setend	be
+#endif
This should not be before the magic numbers.
quoted hunk ↗ jump to hunk
 		b	1f
 		.word	0x016f2818		@ Magic numbers to help the loader
 		.word	start			@ absolute load/run zImage address
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index f1e5a9b..1504d09 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -173,15 +173,20 @@ struct tagtable {
 	int (*parse)(const struct tag *);
 };
 
+#ifdef CONFIG_BE8_ON_LE
+#define read_tag(a)	le32_to_cpu(a)
+#else
+#define read_tag(a)	a
+#endif
I think this is going to cause sparse errors.  Has it been checked with
sparse?

What about those structures which contain u8's and u16's ?  These can't
be dealt with a le32_to_cpu().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help