From 85f60ae4ee817174b0f78928bc7066f28c3551ab Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Fri, 29 Apr 2011 00:18:16 -0600 Subject: dt/flattree: explicitly pass command line pointer to early_init_dt_scan_chosen This patch drops the reference to a global 'cmd_line' variable from early_init_dt_scan_chosen, and instead passes the pointer to the command line string via the *data argument. Each architecture does something slightly different with the initial command line, so it makes sense for the architecture to be able to specify the variable name. Signed-off-by: Grant Likely --- arch/microblaze/kernel/prom.c | 2 +- arch/mips/include/asm/prom.h | 3 --- arch/mips/kernel/prom.c | 3 ++- arch/powerpc/kernel/prom.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 00ee90f0834..b15cc219b1d 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c @@ -130,7 +130,7 @@ void __init early_init_devtree(void *params) * device-tree, including the platform type, initrd location and * size, TCE reserve, and more ... */ - of_scan_flat_dt(early_init_dt_scan_chosen, NULL); + of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line); /* Scan memory nodes and rebuild MEMBLOCKs */ memblock_init(); diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h index f29b862d9db..857d9b7858a 100644 --- a/arch/mips/include/asm/prom.h +++ b/arch/mips/include/asm/prom.h @@ -14,9 +14,6 @@ #ifdef CONFIG_OF #include -/* which is compatible with the flattened device tree (FDT) */ -#define cmd_line arcs_cmdline - extern int early_init_dt_scan_memory_arch(unsigned long node, const char *uname, int depth, void *data); diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index a19811e98a4..5b7eade41fa 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c @@ -83,7 +83,8 @@ void __init early_init_devtree(void *params) * device-tree, including the platform type, initrd location and * size, and more ... */ - of_scan_flat_dt(early_init_dt_scan_chosen, NULL); + of_scan_flat_dt(early_init_dt_scan_chosen, arcs_cmdline); + /* Scan memory nodes */ of_scan_flat_dt(early_init_dt_scan_root, NULL); diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index e74fa12afc8..c173bee09ce 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -691,7 +691,7 @@ void __init early_init_devtree(void *params) * device-tree, including the platform type, initrd location and * size, TCE reserve, and more ... */ - of_scan_flat_dt(early_init_dt_scan_chosen_ppc, NULL); + of_scan_flat_dt(early_init_dt_scan_chosen_ppc, cmd_line); /* Scan memory nodes and rebuild MEMBLOCKs */ memblock_init(); -- cgit v1.2.3