Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08DC4C5DF97 for ; Sun, 23 Aug 2026 15:10:39 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wy9oM-0007aQ-1v; Sun, 23 Aug 2026 11:08:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wy9oK-0007YL-83 for qemu-arm@nongnu.org; Sun, 23 Aug 2026 11:08:36 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wy9oG-0008St-J3 for qemu-arm@nongnu.org; Sun, 23 Aug 2026 11:08:35 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-38e42560ebcso1910889a91.1 for ; Sun, 23 Aug 2026 08:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787497711; x=1788102511; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=B4JrSdi8k8XQNQ8Elee+OQ20buAqlY2zey3O4M4RxH0=; b=XHDehT/+aZGSkgAIwXSw0j5dm1lP3ByZxZoJPW60HDr8dksiiiOkEEdox5fQfk4EwS XcnbP3nxe4J4l99R+D/rn02U105fiCkuZVRa+ijpEWjtR8+Kqb/znS0i42pbfbynB2Yu J6kw4PqsIxRyineRUK1dVz1l5CUTtKIsir5oyaLWEhNlRBz+ITkODWPQqJaSgZGXEb6l n1/nXu0POvJIHo3mQQc6JSHTzko/dlWnNhm7bF8uxQsIQsHimhqFF95B7AfsGCVon7WB g4/LuejG21t4wKevyNMX46yMwo0qS7RvOnbJVRhnKMDutH0Kxg6PgsqsEd9XdQwZ62Wm fkzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787497711; x=1788102511; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=B4JrSdi8k8XQNQ8Elee+OQ20buAqlY2zey3O4M4RxH0=; b=GFVsnwQAsn9OfLxd+VDCPQ/bSPiaxfe9tOuVWAcitrDRStp22e7zAqxJ6nJ3DZoT9z C1UTagbNsnxxS8JGU5W2EgUH7KXJyR60iursGqJa8NO2QL2jz6tZvterpncfz9ENl3K1 Hvw4fYZZ92+DCieMbZWgDaFWBg3tMCcJ3Axq7E22dEpCVoPaaCsBfdf38AJiqE54Om4K cz/YXzLyhRqyft/dUbUe4ze24hmu3herjqS589V2zFUoNv/hjf3/bI3fjYDouLfB/hH7 9N4Jkt++y5dcctfpHqnzARo2t1gGEC+kPO54Kp2ZinaYwif9yYMsZ93H5HzEv5NkNcYk mo+A== X-Forwarded-Encrypted: i=1; AHgh+RozgEpR7oWH1uQJyUTk397tBtnyVl6aM7oJjC7x1/SQlQ0OYeFUUSeJChV+Xfggq4nKIeEvaENfFA==@nongnu.org X-Gm-Message-State: AFuF++lyjlv1QjWBfRtnEfS3xs8NHGkgKaw1pfMn7wiBajf7OtN5aAk9 r2FqcriMXxVDUZA4QM0zffuIUTOJg3Xx2DnCZPU6ATFXmFmi5IiWUdHI X-Gm-Gg: AR+sD130JkTq6D5cARfZmnmD8txnWbzGPVD6RxKimsIvUCVZ1HxA33TeLbT12MLCf7h WIcejUYtC7pIp9JoVvXizadq98FsCiiwT4/JP6zOWEem+3fCafXqMn39nWeWDz3cbf3o8ncw89K tXSzYStkMM3kLZAOaXfaNcagGKTserO8su7dYiSL+YbakjvhMuWkXWsarniX1kKmx/0LXQzR0T4 nkexXFX52fuvi3jJJ+X7+u0oDZ3O6oZcGO2fId7HICjGKv/4+71cVuM3w1NdDQV+vweF4b8FAkp Nw3bkaWPF/Xoz5pipVh4vjBkVzZwKdcblFa6B1QvbBJG9cyPHn1jXorY6VK4+w0243GcSoRSgis GBbTz+9lKtSiVMgVpfwd0ehfXfwb7YnS74jM0gLFIIBrpwvDSA+s0suuj+4AlnDbkvQZb+acELk HqZNh3v3C4FFA+2ZZcJWzgyEuMG21dpBSgZ3sMcfXOYoCZrKHFHginlFcwcFhnv+vB+d6LKK5E6 PV2FHDbijXGuZ3gv2rWSA== X-Received: by 2002:a17:90b:4fc8:b0:38f:efed:5445 with SMTP id 98e67ed59e1d1-395c3573cecmr36286511a91.4.1787497711217; Sun, 23 Aug 2026 08:08:31 -0700 (PDT) Received: from WIN-BH9M8FJACR9 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1418619d6ecsm16024511c88.14.2026.08.23.08.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 08:08:29 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Xianglai Li , Alistair Francis , Chinmay Rath , Sunil V L , qemu-riscv@nongnu.org, Alexander Bulekov , Zhao Liu , Eric Farman , Laurent Vivier , Peter Maydell , Chao Liu , Liu Zhiwei , Palmer Dabbelt , Song Gao <17746591750@163.com>, Harsh Prateek Bora , Glenn Miles , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Daniel Henrique Barboza , Pierrick Bouvier , qemu-s390x@nongnu.org, Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Stefan Hajnoczi , =?UTF-8?q?Alex=20Benn=C3=A9e?= , David Hildenbrand , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Igor Mammedov , Aleksandar Rikalo , Nicholas Piggin , Cornelia Huck , Richard Henderson , Ilya Leoshkevich , Fabiano Rosas , Aurelien Jarno , Paolo Bonzini , Ani Sinha , Bibo Mao , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Matthew Rosato , Weiwei Li , Darren Kenny Subject: [PATCH 05/12] hw/riscv/virt: prefix ACPI helpers with riscv_virt_ Date: Sun, 23 Aug 2026 23:07:23 +0800 Message-ID: <20260823150731.896-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.52.0.windows.1 In-Reply-To: <20260823150731.896-1-luoyonggang@gmail.com> References: <20260823150731.896-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org - virt_acpi_setup and virt_is_acpi_enabled collide with ARM virt when both architectures are linked into one qemu-system binary. - Rename the RISC-V helpers to riscv_virt_acpi_setup and riscv_virt_is_acpi_enabled. Leave file-local virt_acpi_build* names unchanged. Signed-off-by: Yonggang Luo --- hw/riscv/virt-acpi-build.c | 2 +- hw/riscv/virt.c | 6 +++--- include/hw/riscv/virt.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 59c454f4f94..832261391d5 100644 --- a/hw/riscv/virt-acpi-build.c +++ b/hw/riscv/virt-acpi-build.c @@ -1017,7 +1017,7 @@ static const VMStateDescription vmstate_virt_acpi_build = { }, }; -void virt_acpi_setup(RISCVVirtState *s) +void riscv_virt_acpi_setup(RISCVVirtState *s) { AcpiBuildTables tables; AcpiBuildState *build_state; diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 1b672b2169d..16edad64f60 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1293,8 +1293,8 @@ static void virt_machine_done(Notifier *notifier, void *data) virt_build_smbios(s); - if (virt_is_acpi_enabled(s)) { - virt_acpi_setup(s); + if (riscv_virt_is_acpi_enabled(s)) { + riscv_virt_acpi_setup(s); } } @@ -1652,7 +1652,7 @@ static void virt_set_iommu_sys(Object *obj, Visitor *v, const char *name, visit_type_OnOffAuto(v, name, &s->iommu_sys, errp); } -bool virt_is_acpi_enabled(RISCVVirtState *s) +bool riscv_virt_is_acpi_enabled(RISCVVirtState *s) { return s->acpi != ON_OFF_AUTO_OFF; } diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 5559783aebb..38ad8b0097e 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -133,9 +133,9 @@ enum { #define FDT_APLIC_INT_MAP_WIDTH (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + \ 1 + FDT_APLIC_INT_CELLS) -bool virt_is_acpi_enabled(RISCVVirtState *s); +bool riscv_virt_is_acpi_enabled(RISCVVirtState *s); bool virt_is_iommu_sys_enabled(RISCVVirtState *s); -void virt_acpi_setup(RISCVVirtState *vms); +void riscv_virt_acpi_setup(RISCVVirtState *vms); /* * The virt machine physical address space used by some of the devices -- 2.52.0.windows.1