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 A83D9C61DCD for ; Wed, 26 Aug 2026 18:44:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wzIbR-00023M-MW; Wed, 26 Aug 2026 14:44:01 -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 1wzIbQ-0001t3-5a for qemu-arm@nongnu.org; Wed, 26 Aug 2026 14:44:00 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wzIbL-0002Z7-5t for qemu-arm@nongnu.org; Wed, 26 Aug 2026 14:43:59 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-cc149372c14so1014698a12.1 for ; Wed, 26 Aug 2026 11:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787769834; x=1788374634; darn=nongnu.org; h=content-transfer-encoding:content-type: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=MAgTvhPJuUZv8l3S0IaG46RWM0hrZ4KFv/YgJfLhx0k=; b=PHyEWXnTHY/UmOr13InFzmO4sun6gwFjjrr3JoHA4Jp8O1cGvkqiCjfqYlZtqcSjng DlLjWn2Tac04Yaf2QkYNG/1iwB/nCFfZQOzMXJGLIvtRmz44Z2l3ZVlX1PUqxRdTnP1o SRiebGRMYdkpIcuiyfO5AmJdCefE5ABiftaCUO4tBZIg+ONf++m6U9Jwz8eXJar4CzsZ PdtyczIRrMsJin7sJY6S5DWwy+cLSHeaHeR4Ks+5dts7TooWeyeU1nq0gOk8kmLYSMYw pL2FP1BVzNJwPIxezYU6XlxSN4K/PBaCFa4Eqe9cBbWkcJ9VDK0LbqWP168WYBR7o7Vq pnvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787769834; x=1788374634; h=content-transfer-encoding:content-type: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=MAgTvhPJuUZv8l3S0IaG46RWM0hrZ4KFv/YgJfLhx0k=; b=DiLo0PfsMjEGwCG8EDbVP0855/FW653FswvxyRUf6+o5eARjPpof9nzYKvga0nDtvk Ttz37GvuCgKShDRsIrQTv8TPIVFhTFu3o9DtA2DwvhZdjLqEW1Sb3AuujDs0RntQULA8 KZutg2ka1jqcQlZLEERIcnPyK2SJRdXkURXGOHafKiAklGgM2xrgJ7cafN4yAx8qhYNr FvICkRioeGx0sfGi500EtVMq0aYaEp3HEVg7ugvfNZhIjzMpVEAABOCMCD4XDiDCn85p BRGOrSkKXS+I+43473lG2IPXeVFUiyMzqvqnAe4UUtTO+nfj/K4LddintH8/fws+KSrF sUCw== X-Forwarded-Encrypted: i=1; AHgh+RqRX5DgJuw5A4RZfu9VGBQSS/Aygp/3o6+gk8qyTFQzA7dHTJwPmk4O+fYSJxrvQnrKV40r8xesuw==@nongnu.org X-Gm-Message-State: AFuF++mZZase134nlBPbzESLvCqApsCvoH9Xjk9U62KswyzS2UiajF2a r0mk9U6UBDwd+bZ36OSJUBMtu2uyGm3KppFEhZQZtL17E0nroAshpx6i X-Gm-Gg: AR+sD11EJ0k5USwKi49NRQ0aMjAj58VTJOvFFiucAnH5BnVsQsuKoKhTyPOhl6oqu1X aEaghlcxiY66l9n7SSWvZiJaFmfDY8Enq1CGBF4Jf8THixpjJC6z+Cu+cCF9rBV8Xkbws5C6ub6 bltMiLM6lkY7ZARGMZw8I4Bq0g1jHRgpn/J8e8u85lLUvnOW9Z2naB1ecZGnhs6mgEThAY5015w ogFHREvtEVJQhwyPkfeMetiC+FIkKkwNGkEt5bTMDomvu+PsEUDQI+nmGcyVcYzRYRtA44HWXRN /7x0eKYp5LiUJUU6A3bc3Cd9+H1B2gG7Y/O+Ib+OCM3E0TT/uBd0YvK+tDCLIUvMq/vOU494adg buEA9NyO1xd7e/g6XgIwHcDFhQabO8Yx5zqGxi+YisE8Z5AaLBp8zHtKtdXI8UMPxAg+KOWSxmY B69afRIcKkxMVbrVVOfFN4XTH9U5Ck9xfKDqzcyCdtu/r+o9J7gCWf5Zi314MWYQdXBEutPklrU qF1JGNJLbWQRgfvc6t3qdceku2Mom0d X-Received: by 2002:a05:6a21:3a83:b0:3cc:841d:bb26 with SMTP id adf61e73a8af0-3cf8485c070mr16100519637.15.1787769833619; Wed, 26 Aug 2026 11:43:53 -0700 (PDT) Received: from WIN-BH9M8FJACR9 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-3283d60c291sm17681846eec.6.2026.08.26.11.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 11:43:52 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Peter Maydell , Fabiano Rosas , Aurelien Jarno , qemu-riscv@nongnu.org, Song Gao <17746591750@163.com>, "Michael S. Tsirkin" , Jiaxun Yang , qemu-ppc@nongnu.org, Xianglai Li , David Hildenbrand , Richard Henderson , Palmer Dabbelt , Aleksandar Rikalo , Harsh Prateek Bora , Bibo Mao , Weiwei Li , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Matthew Rosato , Chinmay Rath , Alistair Francis , Alexander Bulekov , Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Glenn Miles , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pierrick Bouvier , Laurent Vivier , Cornelia Huck , Zhao Liu , Eric Farman , qemu-s390x@nongnu.org, Paolo Bonzini , Stefan Hajnoczi , qemu-arm@nongnu.org, Ilya Leoshkevich , Darren Kenny , Sunil V L , Daniel Henrique Barboza , Ani Sinha , Nicholas Piggin , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Liu Zhiwei , Igor Mammedov Subject: [PATCH v2 08/13] hw/riscv/virt: prefix ACPI helpers with riscv_virt_ Date: Thu, 27 Aug 2026 02:42:22 +0800 Message-ID: <20260826184229.1145-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.52.0.windows.1 In-Reply-To: <20260826184229.1145-1-luoyonggang@gmail.com> References: <20260826184229.1145-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52e.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 Reviewed-by: Philippe Mathieu-Daudé --- 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 9019a0a04d6..c53370a35f5 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