aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-03-25 08:50:09 +0000
committerJohn Crispin <john@openwrt.org>2012-03-25 08:50:09 +0000
commit0f6a9d5c7c938f40657ca30f588479893606781e (patch)
treecdf2baca2c9b0021baa2c2aa256dee52b627028c /target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch
parentc49f66675e04441b7089abb2aec1e95bda0dfe78 (diff)
downloadupstream-0f6a9d5c7c938f40657ca30f588479893606781e.tar.gz
upstream-0f6a9d5c7c938f40657ca30f588479893606781e.tar.bz2
upstream-0f6a9d5c7c938f40657ca30f588479893606781e.zip
bump kernel to 3.2.12
SVN-Revision: 31060
Diffstat (limited to 'target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch')
-rw-r--r--target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch b/target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch
new file mode 100644
index 0000000000..ac8103d427
--- /dev/null
+++ b/target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch
@@ -0,0 +1,36 @@
+From 3be934b64f874e6cd2af7945f4fc441c7fadb34f Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Fri, 12 Aug 2011 16:27:38 +0200
+Subject: [PATCH 12/70] 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>
+---
+ 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 e3b1e25..acb8921 100644
+--- a/arch/mips/lantiq/prom.c
++++ b/arch/mips/lantiq/prom.c
+@@ -49,10 +49,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));
+ }
+--
+1.7.7.1
+