Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3998619pxf; Mon, 29 Mar 2021 18:12:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOzDdxWi4vZkzzlYf6sP00YtaceeQcaBFtulICbR8VPyCCM54fWdohvxillBZZZo0Jos7l X-Received: by 2002:a17:907:37a:: with SMTP id rs26mr30782249ejb.336.1617066747749; Mon, 29 Mar 2021 18:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617066747; cv=none; d=google.com; s=arc-20160816; b=taHEHb3Fk+hGOYMbkgxLNe+s9osphOxsJ2Q4ME4RY5vmMWoM7jd5Yhue0bU3ejMSpy s7oItvw3dzOHGullm7L3DsbJDpr7l6P9g/tNnSgADE3slwU/vlqrbl+QdlhtIG2g3Sly YzzIDFa63WcVN6z8iC/1GanhuO6jPB+R+sMbT1bwEoHZcB+ZAFQGwpKDKQ2jUtKbNoG3 8Hp9BpWPfsoGRxxyYpp6BMV9WOTDj1BKmbGZ087JwJcVtpROs7nqni/tczVCDJCh86Lu Xj3oruCKQ2ogf0RjkbvJGRLloTnbMuN9dJ8CHzGqdGwQxZURlcu0ifZ1dLIgNXe0Oe/l 1MMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :organization:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=r8odB/kgkL+lEEJAgcITJO4yvKy814kcSteBzf27d8A=; b=qs3rYfYIDf8h+H9H0MBCdtzVme7I2G2KanFoVPcoF65MCkkPxvs1E5NVd6jyg/4wQm EVfNOTo+GNxsFotVgAvw0YqX77cIFLdRIZqcp1Z1D1kX/CWmdl7RBVAOpAd2xvm2R/s2 uu2J/qOT5AdjFog0n+DDIZ3X0AJgAT3kpS8K/x+fBZT3z6noHHyFluMjzM0pt7JTJViQ a+Jok7wqIhygqS0+9hCcrsIOFdIGYLCNrmy8HVOW0V3Xxfu7F41XVhR6RBoRu/yAwd1o yQQ9rY4/EpQIqOfzOgd7M601PbUfF5K0LjSPitun3KuW+Jxk70/KEgOysWZ9XuEHkzDq VvTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@ics.forth.gr header.s=av header.b=CXdKG8Ae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ics.forth.gr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si15506972ejx.637.2021.03.29.18.12.04; Mon, 29 Mar 2021 18:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@ics.forth.gr header.s=av header.b=CXdKG8Ae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ics.forth.gr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229628AbhC3BLJ (ORCPT + 99 others); Mon, 29 Mar 2021 21:11:09 -0400 Received: from mailgate.ics.forth.gr ([139.91.1.2]:58703 "EHLO mailgate.ics.forth.gr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbhC3BKg (ORCPT ); Mon, 29 Mar 2021 21:10:36 -0400 X-Greylist: delayed 1088 seconds by postgrey-1.27 at vger.kernel.org; Mon, 29 Mar 2021 21:10:36 EDT Received: from av3.ics.forth.gr (av3in.ics.forth.gr [139.91.1.77]) by mailgate.ics.forth.gr (8.15.2/ICS-FORTH/V10-1.8-GATE) with ESMTP id 12U0qOic066171 for ; Tue, 30 Mar 2021 03:52:24 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; d=ics.forth.gr; s=av; c=relaxed/simple; q=dns/txt; i=@ics.forth.gr; t=1617065539; x=1619657539; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4Ytp87wkA+alvM5YO/7dlXgP5/jZJBWXepwASfozGUU=; b=CXdKG8AeuRZiwZ+qSuU9itQVeS+S6jzZD+LSRTjBq4uIMwy1EtYl2LFohFQ3P0aL 1snhQLBfGMnJPLlMUvta1R1ExG60xpMGjvqAzE108mPHfXrfMlKUizgfR2G3CWnj dKei0YP7+vI+q9xmsTyWmdWtYdS0hBwgkfMMp+y/DHsFRhQlCWvNoRqg2neDGsDy A/MbNsCxbPucEdxZvgGboLEud/obw/iKdEC8cDqcfAJRCeFRpho58PpEswmR8XMQ DBZlttMlmL7pkMgUDfZroBTVf9b7EC2+ikG/v595zLMuOGi9LkWZ5Pgiy0gLVEtB d2DVMQG/q9QvZWbAMsyDiw==; X-AuditID: 8b5b014d-a4c337000000209f-f6-60627642ff7a Received: from enigma.ics.forth.gr (enigma-2.ics.forth.gr [139.91.151.35]) by av3.ics.forth.gr (Symantec Messaging Gateway) with SMTP id 86.6D.08351.24672606; Tue, 30 Mar 2021 03:52:18 +0300 (EEST) X-ICS-AUTH-INFO: Authenticated user: at ics.forth.gr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 30 Mar 2021 03:52:17 +0300 From: Nick Kossifidis To: Rob Herring Cc: Christophe Leroy , Andreas Schwab , Will Deacon , Daniel Walker , Daniel Gimpelevich , "open list:GENERIC INCLUDE/ASM HEADER FILES" , devicetree@vger.kernel.org, linuxppc-dev , linux-kernel@vger.kernel.org, linux-arm-kernel , microblaze , "open list:MIPS" , nios2 , Openrisc , linux-hexagon@vger.kernel.org, linux-riscv , X86 ML , linux-xtensa@linux-xtensa.org, SH-Linux , sparclinux , paul.walmsley@sifive.com Subject: Re: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE Organization: FORTH In-Reply-To: References: <46745e07b04139a22b5bd01dc37df97e6981e643.1616765870.git.christophe.leroy@csgroup.eu> <87zgyqdn3d.fsf@igel.home> <81a7e63f-57d4-5c81-acc5-35278fe5bb04@csgroup.eu> Message-ID: <3ae0c2faa08f76efb8a446f262b712df@mailhost.ics.forth.gr> X-Sender: mick@mailhost.ics.forth.gr User-Agent: Roundcube Webmail/1.3.16 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsXSHT1dWde5LCnB4AO/xZ1Jz9ktjh7vZbZo XriE2WL+kXOsFvd3NzJadOz6ymKx6fE1Vov3LTvYLC7vmsNm0blpK6PFts8tbBZz/kxhtlh5 di27xe/v/1gtnnw8DVTceZnNom0Wv8X/PTvYLfqXdrBZNJxcwWrRcsfU4seGx6wOYh5Tfm9k 9fh68xyTx/0Hz1k9Fu95yeSxaVUnm8ehwx2MHi8Obmf22Lyk3mP9hm2MHudnLGT0+Ns1hdnj UvN1do/Pm+QCeKO4bFJSczLLUov07RK4MpqW3GYuuMdT8eD2fOYGxrVcXYycHBICJhKb5j1j 72Lk4hASOM4ocWFHFwtEwlRi9t5ORhCbV0BQ4uTMJ2BxZgELialX9jNC2PISzVtnM4PYLAKq Els+QMTZBDQl5l86CFYvIqAo8bttGivIAmaBz+wSj242AhVxcAgL2Essn2UHUsMvICzx6e5F VhCbUyBQ4uqL32wQB61hkjh69A8zxBEuEv8+TmeFOE5F4sPvB+wgc0SB7M1zlSYwCs5Ccuos JKfOQnLqAkbmVYwCiWXGepnJxXpp+UUlGXrpRZsYwRHN6LuD8fbmt3qHGJk4GA8xSnAwK4nw Ch9ITBDiTUmsrEotyo8vKs1JLT7EKM3BoiTOy6s3IV5IID2xJDU7NbUgtQgmy8TBKdXAZDF7 Ibu7bpJ0S056lY5T1mb7vUI9xyRZInM7SjMP8ahbfi7Uu/0qNq1njospX8DU78dj3x2SfDtV xHr+FbGLEcWvzua/LQj7ONkr3DCLIUHfakKWSpDXwry3fhOKIt/ODEo56nXrAdt29SnP+nMU /0fe/8z4TdbTnDN88c+XOWxtenuYQhzmfH6zlLlrvXps4O6P71n8I2qa5vKWSe5VsPzLdTHu SsfRmr9zrF4xMis2pC6wc3hy+6X3kX3s6p2BTRKZ765un2UqyV7ZejbXdqbCqqDP7v8XdzH4 y8tEl3xTvfqpobI9Nip3m3ir+7L5W7548iblXFzk8i1x838fU8lVvJ6yk1SXnTbzEFViKc5I NNRiLipOBAC7YhWKVwMAAA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Στις 2021-03-26 17:26, Rob Herring έγραψε: > On Fri, Mar 26, 2021 at 8:20 AM Christophe Leroy > wrote: >> >> >> >> Le 26/03/2021 à 15:08, Andreas Schwab a écrit : >> > On Mär 26 2021, Christophe Leroy wrote: >> > >> >> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c >> >> index f8f15332caa2..e7c91ee478d1 100644 >> >> --- a/arch/riscv/kernel/setup.c >> >> +++ b/arch/riscv/kernel/setup.c >> >> @@ -20,6 +20,7 @@ >> >> #include >> >> #include >> >> #include >> >> +#include >> >> >> >> #include >> >> #include >> >> @@ -228,10 +229,8 @@ static void __init parse_dtb(void) >> >> } >> >> >> >> pr_err("No DTB passed to the kernel\n"); >> >> -#ifdef CONFIG_CMDLINE_FORCE >> >> - strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); >> >> + cmdline_build(boot_command_line, NULL, COMMAND_LINE_SIZE); >> >> pr_info("Forcing kernel command line to: %s\n", boot_command_line); >> > >> > Shouldn't that message become conditional in some way? >> > >> >> You are right, I did something similar on ARM but looks like I missed >> it on RISCV. > > How is this hunk even useful? Under what conditions can you boot > without a DTB? Even with a built-in DTB, the DT cmdline handling would > be called. > > Rob > cced Paul who introduced this: https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/arch/riscv/kernel/setup.c?id=8fd6e05c7463b635e51ec7df0a1858c1b5a6e350