Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754053AbdLDJYi (ORCPT ); Mon, 4 Dec 2017 04:24:38 -0500 Received: from forward102o.mail.yandex.net ([37.140.190.182]:44714 "EHLO forward102o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753983AbdLDJXg (ORCPT ); Mon, 4 Dec 2017 04:23:36 -0500 Authentication-Results: smtp3p.mail.yandex.net; dkim=pass header.i=@flygoat.com From: Jiaxun Yang To: James Hogan Cc: Ralf Baechle , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Jiaxun Yang Subject: [PATCH RESEND v3 1/4] MIPS: Lonngson64: Copy kernel command line from arcs_cmdline Date: Mon, 4 Dec 2017 17:23:09 +0800 Message-Id: <20171204092312.11256-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171204092312.11256-1-jiaxun.yang@flygoat.com> References: <20171204092312.11256-1-jiaxun.yang@flygoat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1637 Lines: 52 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 --- 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 +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 +/* the kernel command line copied from arcs_cmdline */ +#include +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