From mboxrd@z Thu Jan 1 00:00:00 1970 From: danielwa@cisco.com (Daniel Walker) Date: Tue, 20 Oct 2015 12:54:52 -0700 Subject: [PATCH-RFC 5/7] arm: convert to generic builtin command line In-Reply-To: References: <1444146434-12776-5-git-send-email-danielwa@cisco.com> Message-ID: <56269C0C.3030400@cisco.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 10/07/2015 02:48 PM, Rob Herring wrote: >> #ifndef MEM_SIZE >> > #define MEM_SIZE (16*1024*1024) >> >@@ -125,16 +126,9 @@ __tagtable(ATAG_REVISION, parse_tag_revision); >> > >> > static int __init parse_tag_cmdline(const struct tag *tag) >> > { >> >-#if defined(CONFIG_CMDLINE_EXTEND) >> >- strlcat(default_command_line, " ", COMMAND_LINE_SIZE); >> > strlcat(default_command_line, tag->u.cmdline.cmdline, >> > COMMAND_LINE_SIZE); > Just do this here: > > cmdline_add_builtin(boot_command_line, tag->u.cmdline.cmdline, > COMMAND_LINE_SIZE); > > and remove everything from setup_machine_tags. > > Also, I don't think there is any reason to have cmd_line and copy > boot_command_line to it in setup.c. > I don't think this function runs if there's no cmdline atag, so if the code is here then without a atag for cmdline you wouldn't get the builtin command line either which I don't think make sense. We should get the builtin regardless of this atag appearing, or if there's a DT bootargs. Daniel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752932AbbJTTzA (ORCPT ); Tue, 20 Oct 2015 15:55:00 -0400 Received: from rcdn-iport-1.cisco.com ([173.37.86.72]:1461 "EHLO rcdn-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbbJTTy5 (ORCPT ); Tue, 20 Oct 2015 15:54:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D3AQArmyZW/5ldJa1dgza7R4QhAQ2BWoNGglgCgUE4FAEBAQEBAQGBCoQuAQEEIwQRQAEQCxgCAgUWCwICCQMCAQIBRQYNCAEBiCywaJMiAQEBAQEBAQEBAQEBAQEBAQEBGwuBF4VVhH6FDQeCaYFFAQSOB4gdjR+JGJMJHwEBQoQjHoYbAQEB X-IronPort-AV: E=Sophos;i="5.17,708,1437436800"; d="scan'208";a="43215446" Subject: Re: [PATCH-RFC 5/7] arm: convert to generic builtin command line To: Rob Herring References: <1444146434-12776-5-git-send-email-danielwa@cisco.com> Cc: xe-kernel@external.cisco.com, Russell King , Daniel Walker , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" From: Daniel Walker Message-ID: <56269C0C.3030400@cisco.com> Date: Tue, 20 Oct 2015 12:54:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/2015 02:48 PM, Rob Herring wrote: >> #ifndef MEM_SIZE >> > #define MEM_SIZE (16*1024*1024) >> >@@ -125,16 +126,9 @@ __tagtable(ATAG_REVISION, parse_tag_revision); >> > >> > static int __init parse_tag_cmdline(const struct tag *tag) >> > { >> >-#if defined(CONFIG_CMDLINE_EXTEND) >> >- strlcat(default_command_line, " ", COMMAND_LINE_SIZE); >> > strlcat(default_command_line, tag->u.cmdline.cmdline, >> > COMMAND_LINE_SIZE); > Just do this here: > > cmdline_add_builtin(boot_command_line, tag->u.cmdline.cmdline, > COMMAND_LINE_SIZE); > > and remove everything from setup_machine_tags. > > Also, I don't think there is any reason to have cmd_line and copy > boot_command_line to it in setup.c. > I don't think this function runs if there's no cmdline atag, so if the code is here then without a atag for cmdline you wouldn't get the builtin command line either which I don't think make sense. We should get the builtin regardless of this atag appearing, or if there's a DT bootargs. Daniel