From patchwork Thu Oct 11 20:32:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 10637411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 345431508 for ; Thu, 11 Oct 2018 20:41:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21F7F2C130 for ; Thu, 11 Oct 2018 20:41:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 163032C132; Thu, 11 Oct 2018 20:41:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 957DA2C130 for ; Thu, 11 Oct 2018 20:41:06 +0000 (UTC) Received: from localhost ([::1]:37029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAhlZ-0004od-VQ for patchwork-qemu-devel@patchwork.kernel.org; Thu, 11 Oct 2018 16:41:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAhdE-000707-Ek for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:32:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAhd7-0006tC-S7 for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:32:26 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:29214) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAhd6-0006qy-GQ for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:32:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1539289940; x=1570825940; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=d3rTqeYi/h0aavquOaKu2RfMkTOOaLLF0UqTKU/vcKQ=; b=Pl0ep1V9bMeiIev4lGFGqFV4qygSnAngc/4YaDKg+Vf2FZJ0Mfgz/iXb 1ir0nmiLiYejzMHoGp7n5PqhFtoHDCMFgQRUxe6u9siY8mU25HyTiNN1Z OtJxQ37kzszlsWPGxs1v+Y2szuaG+BPW2zIxg1VP6tMrSccr5DzYJrE9w Vjy79qAyKxUXAbKitrSFa7pdrofx+vjVs+vQUnIWclWoU8WIfK1dS2EFC Sm/UrwOWcRDTPF5XqVx9wB9OF8Xcw8UGKOW79f/hyXXsfC+aXgN40DoNk NvfSeAdl35eks3hv0PwBnZj8vfflJhIAtpd4qpJ67TT6MHH2EmMymtov7 w==; X-IronPort-AV: E=Sophos;i="5.54,369,1534780800"; d="scan'208";a="91781692" Received: from mail-by2nam03lp0053.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.53]) by ob1.hgst.iphmx.com with ESMTP; 12 Oct 2018 04:32:16 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d3rTqeYi/h0aavquOaKu2RfMkTOOaLLF0UqTKU/vcKQ=; b=A/UehNiVB5AV5SsenEAGF1xX9ut9iMZ0CLWAgQwznP9JwsFvtf7tI5dglozrXtm0cojkczbLcFrPtNH+mNYXLbpTvCN37rajKT/NRxgCSwGLDd1LOcfHai/XZWaQZMYVc2LsGZTt7E2DbTvVt69h3Yh+EdibT+jykIGQ9JdPCYg= Received: from CY4PR04MB0392.namprd04.prod.outlook.com (10.173.188.145) by CY4PR04MB1224.namprd04.prod.outlook.com (10.173.193.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.26; Thu, 11 Oct 2018 20:32:15 +0000 Received: from CY4PR04MB0392.namprd04.prod.outlook.com ([fe80::ddab:bdc2:6bc7:6d22]) by CY4PR04MB0392.namprd04.prod.outlook.com ([fe80::ddab:bdc2:6bc7:6d22%6]) with mapi id 15.20.1228.020; Thu, 11 Oct 2018 20:32:15 +0000 From: Alistair Francis To: "peter.maydell@linaro.org" Thread-Topic: [PULL 10/10] RISC-V: Don't add NULL bootargs to device-tree Thread-Index: AQHUYaF/unejNIr0yE+1H0XtMD3adg== Date: Thu, 11 Oct 2018 20:32:15 +0000 Message-ID: <20181011203115.18666-11-alistair.francis@wdc.com> References: <20181011203115.18666-1-alistair.francis@wdc.com> In-Reply-To: <20181011203115.18666-1-alistair.francis@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-clientproxiedby: SG2PR01CA0126.apcprd01.prod.exchangelabs.com (2603:1096:4:40::30) To CY4PR04MB0392.namprd04.prod.outlook.com (2603:10b6:903:b1::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alistair.Francis@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [199.255.44.250] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR04MB1224; 6:VlGyeTn71lLSvEJQGQd3dYrC4GSr0GGtqytY6t2uzH6ausj1O/vju11E1WulHiIFG7dMjXGxqb6fQujklJg6HO+9XniERbVPmm/eB6LZwgF8DMDcSr/6gnLsy9BcBkKZzyFIXsTl5xTB8/7xhXZr4uOcGlWx65dzh03Q8HYdLQO9jDnWmCwjVxz1m5xSfGIhPeTEZ+Yjziw8FFnLTNtfrdXINBYpmPPpPY0Qcna4Y9En4f/D40qFf1xXgUbc1yLmi/hWpHghZKNVFKYr4hnRLdZDOueenSKKaaIDPiFdjevaaA/8PDCZoxgLEshUQIK7ylrN/8xXFAvzm4HL35q7hKvwKuczNJbpZ50mpLPreGPwkGiyYgTSrCXfQqawLYhYyk6cQ+2klye8YroaEmOZm/lkhUx7SpCNW4/uyItBqVgBfRURpPW5t8CIRQEt8g7LS6DMOFMAetEr2YPlkbCZIw==; 5:k7rk+VdTTQkjXLJuvjA9pTH+1DMQbIye9pNi5gjZd3GZshLbhNxRNAUuVwqrgloi0bF02NPntQ9ZT8RJfvPFHcxnKbgH7Eg8/IsAANvH2jUx/gYfp15bI/nPGl1VecYy7Omgr1tnnrmxCddxvUAXdIQBvU/OUrk9ABZKlsRSLNw=; 7:x/8NWDvY8LyKXvVzAFBn2qQ03Ck2eppefHydBp4mgP8Thu6iizJtKWVvCIZ7Vv1G1SEQEbsGL32/mkGnA791v+iQbbsyZiZqJHH3k4WN7t491e1fVLvV0cHD29+1usEQvVz3ZGt/BzHAUu/ycvFeFiL/vW6hYesDtw2KxyF1CibxR8PndFS00876d+Qj16LYQ3DBjEjWUAPsVgBkgHHTcwd9mqymlQPRB1nTTQmsn2sJzP2a0znh+htJ2SV2WWQ3 x-ms-office365-filtering-correlation-id: 4060b6bb-e239-46ae-aa3e-08d62fb8a15e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:CY4PR04MB1224; x-ms-traffictypediagnostic: CY4PR04MB1224: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051); SRVR:CY4PR04MB1224; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB1224; x-forefront-prvs: 08220FA8D6 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(376002)(39860400002)(366004)(136003)(199004)(189003)(81156014)(8936002)(68736007)(36756003)(6506007)(86362001)(7736002)(6916009)(8676002)(105586002)(76176011)(2906002)(256004)(81166006)(50226002)(54906003)(5660300001)(5640700003)(6486002)(1076002)(4326008)(52116002)(486006)(11346002)(2900100001)(102836004)(2501003)(99286004)(2616005)(6436002)(478600001)(72206003)(44832011)(476003)(186003)(97736004)(2351001)(25786009)(71190400001)(53936002)(3846002)(14454004)(386003)(106356001)(316002)(6512007)(446003)(305945005)(71200400001)(26005)(66066001)(6116002)(5250100002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB1224; H:CY4PR04MB0392.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-microsoft-antispam-message-info: G9Uw3pOXglqfAoajfkmk2qOq6Se4S5PCwGWnBkqh/TwWhjGKvvNOGIfVfA0ELgnVmhWx7Y0Ep4lsJH054p7xUUopRG80ibkf06UB47jaIGQfEQE5gJvkqhuuMG1MzTojjR+p5qloz1BAQeQsd+Gka8YYWOGKEkijAsF+VY5YXryyPwg5r7Vu1aMwgW0SEraTo8AHWKEGzxTCx+K5R+4taSoHikcQuvn7OLFWV/Vks9Xl2EV+3nK93diSxoZI8BAOESeWKwD6uSH/5uxWv+xkeUiYeWCv+ciZKEB8UVhlFbemjMTztmRqHldY5351KrBaGdyp924RL/E8onfyzHsQeqKbHBAIsb+R/PAHs49paDM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4060b6bb-e239-46ae-aa3e-08d62fb8a15e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2018 20:32:15.2361 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB1224 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 216.71.154.42 Subject: [Qemu-devel] [PULL 10/10] RISC-V: Don't add NULL bootargs to device-tree X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , Michael Clark , Palmer Dabbelt , "qemu-devel@nongnu.org" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Michael Clark Cc: Palmer Dabbelt Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Palmer Dabbelt Signed-off-by: Alistair Francis --- hw/riscv/sifive_u.c | 4 +++- hw/riscv/spike.c | 6 ++++-- hw/riscv/virt.c | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 4e273119c3..0c51c61082 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -259,7 +259,9 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, qemu_fdt_add_subnode(fdt, "/chosen"); qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename); - qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + if (cmdline) { + qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + } g_free(nodename); } diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index be5ef85e81..8a712ed490 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -156,8 +156,10 @@ static void create_fdt(SpikeState *s, const struct MemmapEntry *memmap, g_free(cells); g_free(nodename); - qemu_fdt_add_subnode(fdt, "/chosen"); - qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + if (cmdline) { + qemu_fdt_add_subnode(fdt, "/chosen"); + qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + } } static void spike_v1_10_0_board_init(MachineState *machine) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 3f30eb74d2..62add47667 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -284,7 +284,9 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap, qemu_fdt_add_subnode(fdt, "/chosen"); qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename); - qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + if (cmdline) { + qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + } g_free(nodename); return fdt;