diff options
author | Thomas Langer <thomas.langer@lantiq.com> | 2012-05-02 12:27:39 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-05-15 17:49:22 +0200 |
commit | 730fa039f16df58c2dc3ff2894b7d767f100cf6e (patch) | |
tree | aac6f2460a5bfae54473abc896643ab0a9d4277b /arch | |
parent | 7705f6867bfc6f2ea42c3965a85df72abf070c86 (diff) | |
download | blackbird-op-linux-730fa039f16df58c2dc3ff2894b7d767f100cf6e.tar.gz blackbird-op-linux-730fa039f16df58c2dc3ff2894b7d767f100cf6e.zip |
MIPS: lantiq: fix cmdline parsing
The code tested if the KSEG1 mapped address of argv was != 0. We need to use
CPHYSADDR instead to make the conditional actually work.
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3722/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/lantiq/prom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c index 664b7b722248..cd568921f191 100644 --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c @@ -45,10 +45,12 @@ static void __init prom_init_cmdline(void) char **argv = (char **) KSEG1ADDR(fw_arg1); int i; + arcs_cmdline[0] = '\0'; + for (i = 0; i < argc; i++) { - char *p = (char *) KSEG1ADDR(argv[i]); + char *p = (char *) KSEG1ADDR(argv[i]); - if (p && *p) { + if (CPHYSADDR(p) && *p) { strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); } |