MIPS: FDT size is a be32
authorThomas Chou <[email protected]>
Wed, 24 Nov 2010 07:35:48 +0000 (15:35 +0800)
committerRalf Baechle <[email protected]>
Thu, 16 Dec 2010 18:10:58 +0000 (18:10 +0000)
The totalsize field was be32. And the reserve bootmem would cause failure.

Signed-off-by: Thomas Chou <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: David Daney <[email protected]>
Cc: Dezhong Diao <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/1838/
Signed-off-by: Ralf Baechle <[email protected]>
arch/mips/kernel/prom.c

index e000b278f0243cfdfa1986be89b728c5b371a480..9dbe58368953809f721e845a004f98cb57809dba 100644 (file)
@@ -100,7 +100,7 @@ void __init device_tree_init(void)
                return;
 
        base = virt_to_phys((void *)initial_boot_params);
-       size = initial_boot_params->totalsize;
+       size = be32_to_cpu(initial_boot_params->totalsize);
 
        /* Before we do anything, lets reserve the dt blob */
        reserve_mem_mach(base, size);