From nobody Fri Dec 19 04:32:15 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734096936; cv=none; d=zohomail.com; s=zohoarc; b=doLjpyDodTFce5/QDUZ3OwqURKc68wPDklgcyOYEkp0HSo24x3etZmkVZDsOMAcM83sMLou60z1E9AWsYRxBOY22zFuMan+bra6Kzs/r8ZSHepVwkpTciHLlvLvMFI3jcJz408ak4P7ipBtxnDgaurKghX2xRZvBfOrRW2enYds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734096936; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=U2qKUJQXHTauredWvRg6VWWi6TihRO/ewf0svr7HQas=; b=aVizYIh2kJqdDQE4JvAtESwr0iynmn70UiiQUbrlgl66IJZclXpNtokG9Cm3tb+eeZRxEX2eQpAoeg3rcD8o2hMAeQnmzkGE048jwpEBw2B7HudhbMhdil+VSpwB/o1jqM6HuCRNKOq6uDfIn4awP+xSUgj9HwNUHa6T2wwZmTU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734096936377897.3780831982041; Fri, 13 Dec 2024 05:35:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM5pC-00066D-MO; Fri, 13 Dec 2024 08:35:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM5oV-0005OZ-N9 for qemu-devel@nongnu.org; Fri, 13 Dec 2024 08:34:39 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM5oT-00018j-Gh for qemu-devel@nongnu.org; Fri, 13 Dec 2024 08:34:39 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-385e87b25f0so1881367f8f.0 for ; Fri, 13 Dec 2024 05:34:29 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387823f1606sm7271653f8f.0.2024.12.13.05.34.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Dec 2024 05:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734096868; x=1734701668; 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; bh=U2qKUJQXHTauredWvRg6VWWi6TihRO/ewf0svr7HQas=; b=uUZImyce+XGjmiPBNbQiOUVoXk7op4akmi0Fuc+RPswTs6EGbspREbcVUUkAE2QLdA 0fRpvwJIOnbCKsU8vhdfIY6YPycHWOCH5fLw5VSVptDixUcnpEUpErdSE2gC+lBIzgjC gnladO32ntHnRbp336evwkc1zYnUNTzzSiYQmFeed+Mmz+NdStQfkvs82f0N6sr+oZJ5 jOMtOrY13CLmhl6/0F6dqEhnD9UPaQDwcZRalhqEBIWr9fzQ6+HuS7T0WuaAIDY+ipCi 17XoYqsMpTFMP/WnhBWwS4gZKd2RjZqdAmakAA6XEu5cfwVyL0u7wgKsd9kmc3lfE40/ nJ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734096868; x=1734701668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U2qKUJQXHTauredWvRg6VWWi6TihRO/ewf0svr7HQas=; b=sTjFPfOc4XOzuO82yIYNXRYzyqSgJWlf/xHG7IF8F8/9XkKQYWSJEajt3kxklVpLwv d6ZixP6lq5cX+5AyioBuhEJLgHixQd9jpOaDcQsDtlefyXb1gYFIMp9hmn+Nx19jfgM/ 7qPlfOpgB7LxaGsIgv6FYuyqdIvW0K3GXFZT0xmCCJKPpDu9LraJjfqVWCjQNpe8YI2H hqJL78/Q64d9pxtATi7Fap/y+JtxcHptkSflAnL2ipt97N3OQTzPYXWlH/7nnADQBhB9 v+2h8OZFDFUmUPEzuha1vE1tCJstek4AQwUSJTb5Z5piUTm8mDutp5ww1OifYH9u/KfX n6Hg== X-Gm-Message-State: AOJu0YyzlQ7jL6yCEfgW8/u1D9imTfa4cU3hGC7DnCOm2amQBCBS1BO6 9oFVlPtKwDUO2vpH6c43tmnWKAVuZU3f4p4Fr0VcyEZuG9RTZSZqXErasMA6VXIEtz7Zo8h82eL R X-Gm-Gg: ASbGnctbbB4hDUM67uwOmnli5D7c4fodvTporSQBJOa6SLP/fy0+2oXMQmucepcEqtp NQHIlZTthzXl3q5B0crNn0Y69HtaUk3I1DmY1Iteq4XRE+3dz8kExGYXxX241JYixuISHz5JLqI e69DUwrPsi6Hci1dnXP/RD771PDMrjo6+4l19/FuwNN7V6/s7Vqm0p/PEK/4wZ24fG8grjuiKdp Xffe5hZbgJVnJrUXZYhHKEAy1RNByi1mBkCAhj4GWK3G2e2PSJ1VjF4LXGnlgVtfrv3+xVZ03x0 /y2EfI6RZZhdcC2QMysVlmgssnr3szyGphD3 X-Google-Smtp-Source: AGHT+IEKB+oSY/XFteMRP1+vSsK8D57gc84/L4Pa+LmvapOY7su9VntvOrlUKpaBr0b/B9gZMHX3qw== X-Received: by 2002:a05:6000:4612:b0:385:faf5:ebb8 with SMTP id ffacd0b85a97d-388c3651797mr1976046f8f.7.1734096867795; Fri, 13 Dec 2024 05:34:27 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Gerd Hoffmann , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 7/7] hw/nvram/fw_cfg: Remove fw_cfg_add_extra_pci_roots() Date: Fri, 13 Dec 2024 14:33:52 +0100 Message-ID: <20241213133352.10915-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241213133352.10915-1-philmd@linaro.org> References: <20241213133352.10915-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734096938365116600 Now that all uses of fw_cfg_add_extra_pci_roots() have been converted to the newer pci_bus_add_fw_cfg_extra_pci_roots(), we can remove that bogus method. hw/nvram/fw_cfg must stay generic. Device specific entries have to be implemented using TYPE_FW_CFG_DATA_GENERATOR_INTERFACE. This mostly reverts commit 0abd38885ac0fcdb08653922f339849cad387961 ("fw_cfg: Refactor extra pci roots addition"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- include/hw/nvram/fw_cfg.h | 9 --------- hw/nvram/fw_cfg.c | 23 ----------------------- 2 files changed, 32 deletions(-) diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index 5211018fd8f..152e049819b 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -315,15 +315,6 @@ bool fw_cfg_add_file_from_generator(FWCfgState *s, Object *parent, const char *part, const char *filename, Error **errp); =20 -/** - * fw_cfg_add_extra_pci_roots: - * @bus: main pci root bus to be scanned from - * @s: fw_cfg device being modified - * - * Add a new fw_cfg item... - */ -void fw_cfg_add_extra_pci_roots(PCIBus *bus, FWCfgState *s); - FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, AddressSpace *dma_as); FWCfgState *fw_cfg_init_mem(hwaddr ctl_addr, hwaddr data_addr); diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 7e1065e5f50..d56feca6bfe 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -41,7 +41,6 @@ #include "qemu/cutils.h" #include "qapi/error.h" #include "hw/acpi/aml-build.h" -#include "hw/pci/pci_bus.h" #include "hw/loader.h" =20 #define FW_CFG_FILE_SLOTS_DFLT 0x20 @@ -1059,28 +1058,6 @@ bool fw_cfg_add_file_from_generator(FWCfgState *s, return true; } =20 -void fw_cfg_add_extra_pci_roots(PCIBus *bus, FWCfgState *s) -{ - int extra_hosts =3D 0; - - if (!bus) { - return; - } - - QLIST_FOREACH(bus, &bus->child, sibling) { - /* look for expander root buses */ - if (pci_bus_is_root(bus)) { - extra_hosts++; - } - } - - if (extra_hosts && s) { - uint64_t *val =3D g_malloc(sizeof(*val)); - *val =3D cpu_to_le64(extra_hosts); - fw_cfg_add_file(s, "etc/extra-pci-roots", val, sizeof(*val)); - } -} - static void fw_cfg_machine_reset(void *opaque) { MachineClass *mc =3D MACHINE_GET_CLASS(qdev_get_machine()); --=20 2.45.2