From 7a9f663ac7ef1218ffe3aaab66f1bf66d54eaf0a Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 15 Mar 2006 18:59:24 -0700 Subject: [PATCH] The problem is that asm_emit_cell() was swapping its asm output when it shouldn't be (because the assembler will do the necessary swapping). The cell values (asm_emit_cell()) are different from the data values (asm_emit_data()) because the cell values are generated within the program and don't get swapped like the data values read from the dts file. They should be left as they are so that the assembler will swap them, if necessary. For example, when the property length field was 4, the asm output contained ".long 0x4000000" and sent the kernel prom.c dt parsing code into the weeds. Pointed out by Mark Greer. --- flattree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flattree.c b/flattree.c index 474f1c1..73dd409 100644 --- a/flattree.c +++ b/flattree.c @@ -121,7 +121,7 @@ static void asm_emit_cell(void *e, cell_t val) { FILE *f = e; - fprintf(f, "\t.long\t0x%x\n", be32_to_cpu(val)); + fprintf(f, "\t.long\t0x%x\n", val); } static void asm_emit_string(void *e, char *str, int len)