From nobody Sun Feb 8 14:06:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1565021088; cv=none; d=zoho.com; s=zohoarc; b=lEvCK8U45pwuG5c8OMLeeDDgPAb0yfF4Jy0aSonRRuWCS0oI8Ja83JtwCzn1t4uqY16sg6VOQyHPOT2a9t21mrUXPGjvalP1dnmPxR9oPswRvLVNMOOgncyFfT6/Ce2HdHXX0upVDgw1YZxNg4m0KedhhUwzQlaqSkqPOBWVWZs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565021088; h=Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HmEOrQlPGOd0Y81l931aXbkGZtqwGBdfoUEd2ZirFRk=; b=gVQOi1EoqXp6vrr+8QDD9YVNnp9tJLNekyhVBMlhJKyjiSOuY9gZvbpCBxvK1tO+zdUjbwFmmQ7SruH25G569+Ot/1SH8Py+TisIW6cHFT2vZAsxu4840NrVDIKOC2rq5AukHJvGawynuwjAOnJZ465ZsrUXUc/idhegPNt5N98= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15650210885702.6483107947218514; Mon, 5 Aug 2019 09:04:48 -0700 (PDT) Received: from localhost ([::1]:55510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hufTb-0006Zh-Gw for importer@patchew.org; Mon, 05 Aug 2019 12:04:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58352) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hufPb-0000HI-1q for qemu-devel@nongnu.org; Mon, 05 Aug 2019 12:00:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hufPZ-0002qX-Vq for qemu-devel@nongnu.org; Mon, 05 Aug 2019 12:00:38 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:34067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hufPZ-0002pl-Nw; Mon, 05 Aug 2019 12:00:37 -0400 Received: by mail-pg1-x544.google.com with SMTP id n9so33750183pgc.1; Mon, 05 Aug 2019 09:00:37 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id d18sm47728793pgi.40.2019.08.05.09.00.35 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 05 Aug 2019 09:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=HmEOrQlPGOd0Y81l931aXbkGZtqwGBdfoUEd2ZirFRk=; b=fAG6hGCDvp2ioiFiIdPyhLs4odrCu2Mi2EaultibP5/mzhilRx7U/DzeeYYshpm/F1 Wr2lFsHZSevZ36xGMJObEhM41jYxM6uVrHOp6mvH5WoUE8dk6etDdjY7hhi0RmqVJ+Vg 1cEB1rYHvGJDdJfU7PouLCwrI8XQmERQ/w/el3aohxL9yQcxCwRVrHqkueMeTxZgvszV jLXO1rHYKNCkRUe7Ws9eCsYw2n4WgGe8RMdw9guunlJUb0fdKS3+uEjXpDkhblIM4eUJ ZGh8+UL31VLym6+gAHPXW85OLr0I2OhCe1x1SdGMvfB/UrZ61YpgLNGwTc1xucy4w4nr SBLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=HmEOrQlPGOd0Y81l931aXbkGZtqwGBdfoUEd2ZirFRk=; b=euLhq9F9QLwa/O2FvsjCgg5TMtezzBfyz2fsWLh450XJxqZQqJpUJNO45mxOb12bdJ rMoBp7o9VtIikx1FArS6Qp8gy9WEtZbQDVVVsnzuYML081qBe2EbeNhi2yV+mZEUVQOn BYavK88CRjBK8g4R5aaNMFb0WfX9DgPQrg1vPlhFI9wRZFOLtMwGACO0tYKUf4ARZbll lARJY+dgic99ZchZFZRMZDbG13HdLL2DrQwKaPJdgdgIJSNUi51DEk3IXA4U8C3U5tgi GlIZsfEC9anAX9N+wMyhiudkxu3ZuctfQl/tUJ424QcSmAnwRvxRBHWPnnrv+OiHNE/S Rvyg== X-Gm-Message-State: APjAAAUUtlt47ef77y14bGVtGXUKMFXt+0OeWQ9agcHyVpYUUeertXw+ ZW0Il6aucy5aFuIp+Zols68= X-Google-Smtp-Source: APXvYqznoOYCYswgx1X853oPmpSslnBBUugTuEj9/BjbAHgLRFlkUEXCcSEZ/zxCB+TllwWx3QAo0Q== X-Received: by 2002:aa7:9afc:: with SMTP id y28mr72451044pfp.252.1565020836907; Mon, 05 Aug 2019 09:00:36 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Date: Mon, 5 Aug 2019 09:00:03 -0700 Message-Id: <1565020823-24223-9-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1565020823-24223-1-git-send-email-bmeng.cn@gmail.com> References: <1565020823-24223-1-git-send-email-bmeng.cn@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH 08/28] riscv: sifive_u: Update PLIC hart topology configuration string X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" With heterogeneous harts config, the PLIC hart topology configuration string are "M,MS,.." because of the monitor hart #0. Suggested-by: Fabien Chouteau Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- hw/riscv/sifive_u.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 206eccc..b235f29 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -372,10 +372,11 @@ static void riscv_sifive_u_soc_realize(DeviceState *d= ev, Error **errp) plic_hart_config =3D g_malloc0(plic_hart_config_len); for (i =3D 0; i < ms->smp.cpus; i++) { if (i !=3D 0) { - strncat(plic_hart_config, ",", plic_hart_config_len); + strncat(plic_hart_config, "," SIFIVE_U_PLIC_HART_CONFIG, + plic_hart_config_len); + } else { + strncat(plic_hart_config, "M", plic_hart_config_len); } - strncat(plic_hart_config, SIFIVE_U_PLIC_HART_CONFIG, - plic_hart_config_len); plic_hart_config_len -=3D (strlen(SIFIVE_U_PLIC_HART_CONFIG) + 1); } =20 --=20 2.7.4