Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751269AbeABRGG (ORCPT + 1 other); Tue, 2 Jan 2018 12:06:06 -0500 Received: from mail-ua0-f196.google.com ([209.85.217.196]:41262 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbeABRGE (ORCPT ); Tue, 2 Jan 2018 12:06:04 -0500 X-Google-Smtp-Source: ACJfBotK57c0gXIVbpDFyitXnXnFkek/0h/CabtyLs03DS2FyfEM1LNdcor+q8IfAWAsBElZ1I9dpgw/800AQuS1N68= MIME-Version: 1.0 In-Reply-To: <20180102150848.11314-7-paul@crapouillou.net> References: <20180102150848.11314-1-paul@crapouillou.net> <20180102150848.11314-7-paul@crapouillou.net> From: Mathieu Malaterre Date: Tue, 2 Jan 2018 18:05:43 +0100 X-Google-Sender-Auth: oPD-3gIgXWM6GFJYy2M89JpJwCw Message-ID: Subject: Re: [PATCH v5 07/15] MIPS: Setup boot_command_line before plat_mem_setup To: Paul Cercueil Cc: Ralf Baechle , Maarten ter Huurne , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, linux-clk@vger.kernel.org, Paul Burton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 2, 2018 at 4:08 PM, Paul Cercueil wrote: > From: Paul Burton > > Platforms using DT will typically call __dt_setup_arch from > plat_mem_setup. This in turn calls early_init_dt_scan. When > CONFIG_CMDLINE is set, this leads to its value being copied into > boot_command_line by early_init_dt_scan_chosen. If this happens before > the code setting up boot_command_line in arch_mem_init runs, that code > will go on to append CONFIG_CMDLINE (via builtin_cmdline) to > boot_command_line again, duplicating it. For some command line > parameters (eg. earlycon) this can be a problem. Set up > boot_command_line before early_init_dt_scan_chosen gets called such that > it will not write CONFIG_CMDLINE in this scenario & the arguments aren't > duplicated. > > Signed-off-by: Paul Burton > --- > arch/mips/kernel/setup.c | 39 ++++++++++++++++++++------------------- > 1 file changed, 20 insertions(+), 19 deletions(-) > > v2: New patch in this series > v3: No change > v4: No change > v5: No change I would have used @mips email. Anyway: Acked-by: Mathieu Malaterre