From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: James Hogan <james.hogan@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: [PATCH v4 1/5] MIPS: Lonngson64: Copy kernel command line from arcs_cmdline
Date: Sat, 9 Dec 2017 14:49:49 +0800 [thread overview]
Message-ID: <20171209064953.8984-2-jiaxun.yang@flygoat.com> (raw)
In-Reply-To: <20171209064953.8984-1-jiaxun.yang@flygoat.com>
Since lemote-2f/marchtype.c need to get cmdline from loongson.h
this patch simply copy kernel command line from arcs_cmdline
to fix that issue
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
arch/mips/include/asm/mach-loongson64/loongson.h | 6 ++++++
arch/mips/loongson64/common/cmdline.c | 7 +++++++
2 files changed, 13 insertions(+)
diff --git a/arch/mips/include/asm/mach-loongson64/loongson.h b/arch/mips/include/asm/mach-loongson64/loongson.h
index c68c0cc879c6..1edf3a484e6a 100644
--- a/arch/mips/include/asm/mach-loongson64/loongson.h
+++ b/arch/mips/include/asm/mach-loongson64/loongson.h
@@ -45,6 +45,12 @@ static inline void prom_init_uart_base(void)
#endif
}
+/*
+ * Copy kernel command line from arcs_cmdline
+ */
+#include <asm/setup.h>
+extern char loongson_cmdline[COMMAND_LINE_SIZE];
+
/* irq operation functions */
extern void bonito_irqdispatch(void);
extern void __init bonito_irq_init(void);
diff --git a/arch/mips/loongson64/common/cmdline.c b/arch/mips/loongson64/common/cmdline.c
index 01fbed137028..49e172184e15 100644
--- a/arch/mips/loongson64/common/cmdline.c
+++ b/arch/mips/loongson64/common/cmdline.c
@@ -21,6 +21,11 @@
#include <loongson.h>
+/* the kernel command line copied from arcs_cmdline */
+#include <linux/export.h>
+char loongson_cmdline[COMMAND_LINE_SIZE];
+EXPORT_SYMBOL(loongson_cmdline);
+
void __init prom_init_cmdline(void)
{
int prom_argc;
@@ -45,4 +50,6 @@ void __init prom_init_cmdline(void)
}
prom_init_machtype();
+ /* copy arcs_cmdline into loongson_cmdline */
+ strncpy(loongson_cmdline, arcs_cmdline, COMMAND_LINE_SIZE);
}
--
2.15.0
next prev parent reply other threads:[~2017-12-09 6:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-09 6:49 [PATCH v4 0/5] add Lemote YeeLoong Laptop support Jiaxun Yang
2017-12-09 6:49 ` Jiaxun Yang [this message]
2017-12-09 6:49 ` [PATCH v4 2/5] MIPS: Loongson64: lemote-2f move ec_kb3310b.h to include dir and clean up Jiaxun Yang
2017-12-09 8:29 ` Philippe Ombredanne
2017-12-09 6:49 ` [PATCH v4 3/5] MIPS: Loongson64: Yeeloong add platform driver Jiaxun Yang
2017-12-09 6:49 ` [PATCH v4 4/5] MIPS: Loongson64: Load platform device during boot Jiaxun Yang
2017-12-09 6:49 ` [PATCH v4 5/5] MAINTAINERS: Add entry for Lemote YeeLoong Extra Driver Jiaxun Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171209064953.8984-2-jiaxun.yang@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=james.hogan@mips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).