Skip to contentSkip to conversation

arm: Do not overwrite __machine_arch_type

PATCH In review Peng Fan 2 participants 3 messages Aug 19, 2014 Arm (32-bit)

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 arm: Do not overwrite __machine_arch_type

If using DT_MACHINE_START when enabled CONFIG_OF, the nr of mdesc is ~0. The value of __machine_arch_type is passsed from bootloader using reigster r1, and assigned in head-common.S. Remove this line to avoid overwrite it.

---
 arch/arm/kernel/devtree.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/kernel/devtree.c +0 -3
index 11c54de..3a04486 100644
@@ -243,8 +243,5 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
 
 	early_init_dt_scan_nodes();
 
-	/* Change machine number to match the mdesc we're using */
-	__machine_arch_type = mdesc->nr;
-
 	return mdesc;
 }
Signature · 1 line
1.8.4
#1 lore raw
Quoted 3 lines · Peng Fan

If using DT_MACHINE_START when enabled CONFIG_OF, the nr of mdesc is ~0. The value of __machine_arch_type is passsed from bootloader using reigster r1, and assigned in head-common.S. Remove this line to avoid overwrite it.

No. The idea here is that the machine_is_xxx() methods are not used when using DT, so this disables them.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
author
#2 lore raw
Quoted 8 lines · Russell King - ARM Linux
Quoted 3 lines · Peng Fan

If using DT_MACHINE_START when enabled CONFIG_OF, the nr of mdesc is ~0. The value of __machine_arch_type is passsed from bootloader using reigster r1, and assigned in head-common.S. Remove this line to avoid overwrite it.

No. The idea here is that the machine_is_xxx() methods are not used when using DT, so this disables them.

Got it. Thanks.

Regards,
Peng.