From patchwork Fri Dec 13 23:30:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 850305 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1779888wry; Fri, 13 Dec 2024 15:35:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUloVZ0uDfgKkBifoIcXTvA2QWB8VX8FQPbi1cWvbbzxT01Vv6TLEg7tqlIygtY5kS5aeGywg==@linaro.org X-Google-Smtp-Source: AGHT+IFW3g59MXfSmvsZRCAMBcFReKCqMdVRh0y9q3f0HOomMcQ9W2o9+CKIurCV03eZ7KyUSqIo X-Received: by 2002:ac8:7fc2:0:b0:466:a7d8:fd21 with SMTP id d75a77b69052e-467a57895d6mr83283511cf.24.1734132907563; Fri, 13 Dec 2024 15:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734132907; cv=none; d=google.com; s=arc-20240605; b=Gm2W2jQwtfDMtRTCwo01POKhmLeFoPtpQq+65Y5j4X3E4gP2mmpuD7jQn0pKwq2atd lQOsETUvSfD8A4f8eTS5fdIYNCAOZ9GVBtHEF8h++L5oTo6JSGSplJrp2wc6He9qzLCn Kgd04ADnGolmpmOdDFS8a9d7fqZMNp5eSGIVh/2YFvyKGiNpojdikjC5Gfhvp4MOt5x8 kjcRH0Vqm64CgINoEZX+p+mB4gX/l663EnTFDF1bEAc+w2Sxm5MyepMZ4zrdzrLYTi7E k+hXlh5zxTyPKSRg+VvzyVEk6g3LhFQMG9AGmuUTfHiOeUIogChzD7/U2WYerQonWk34 v8iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=98G7xGgH42NoM+rpRevb74bw82XH4wpKnmxY8jqwlAI=; fh=iBCV4w7YK1vyHYfwyxOoXBCd3sIBF9+yH+94qSO9meY=; b=Tbs8ElaBOproLGrdwQF3qZkqAeydBnGmSFjAgD3rzZI9V3VhUkyYv8gLXIAtN5TDfs LeUMvrnaqcpFhSN5I+O9roI+pt2Gk2PpKu5KwG5vfPJHE9LwadT6Or9WuIA+2m5vlC6P UNeMUvw0i482YO2lNK3lcJ04XnKb336w7j6wzxg031AMY6Ec1gp2NQ1OlAvLia+04T7R /2yNkviIqho/cf9oKGsGpRuQOrcUdFlb78wiumKJhGB6m0Aafohc9Hq7R5aOTL26hk/F bk+7ML4fkNpWtD1nSYINsTNiWZWayFNYi3A0k30mvWBsM5xK9mg1rBnegyR3SJCW258F B+yQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kChkK25V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-467b2ed3da4si6495041cf.427.2024.12.13.15.35.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2024 15:35:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kChkK25V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMF8x-0003hq-TM; Fri, 13 Dec 2024 18:32:27 -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 1tMF8W-0003Ky-Au for qemu-devel@nongnu.org; Fri, 13 Dec 2024 18:31:59 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMF8T-00033E-LW for qemu-devel@nongnu.org; Fri, 13 Dec 2024 18:31:56 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43625c4a50dso15706065e9.0 for ; Fri, 13 Dec 2024 15:31:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734132710; x=1734737510; 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=98G7xGgH42NoM+rpRevb74bw82XH4wpKnmxY8jqwlAI=; b=kChkK25VddsA/DX66gokTD61h9FD8XoDkX9/vEITaSZf6YcHKs6jLzeCsfcwCvRhr2 2ekLU/xVmcR1upFC+MpoHoTzJSR7Q8KYlQ+mfXsaTtFDfjMviDahmn6D78Cqmocff0jD EfFCtPXcmUNdOrnW+lSI6NM+6kTouDwRBZF+BcNsKwAfPIbBVcIA1aSmvifZZQ+H7zEb TIOUbF7sFJ4yy3glTGP5DQotex3XFBfYu8mPcc6HAIUzVrovkEFNSDxnXwDD88k2Xn8l QipqOo6cfhN3oPCA8MFm74MUuDnN5Ly9ZyS8Q+pLo6j2e0Xc4zZHCGg3R6PG7tI2tTq9 OzEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734132710; x=1734737510; 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=98G7xGgH42NoM+rpRevb74bw82XH4wpKnmxY8jqwlAI=; b=YHbLBHg+j7wH4evAMBKod7j7cZCcBk3a8ENBxrZExDBcNxqRgcwaSx/a0kkz/FuAFB uRpKYqP3F04eSf+Gfc2GBRQYAkQwan6KvELPQ5fzOVgsJeiJCxagmdHYk9wIkBv7KL7S m6oHJo7BYhGd0y3wQ5EqW+xw9gtYJ8PRn/4N48VApXsFgQfTEkMDS+/fsxgWrNh8XAdG g13De/6K1G9/mYd/Oc34JqSPX/Tdu5+arYGy6ptXJkNzwm08xJXPl8MQ+13gAsoZmeoc t1x9WFsGz8f/guexyeT/erMtkc15EMtcvQ2BWtMHiOO2MQwW9zyHQec6Rl9YDyKfNgE0 UWCg== X-Gm-Message-State: AOJu0YwmauB2chtPeyNZGe4BJNd/xQs6F0/CDkX4lFkH5rK0z1wNS0bY por6fxS5575YgAG5sxJvC/G1okHoaF1crPjCxtD8qUBJtW7Cd6Kl5GK5iOdlNELgtLtSzHDHlJu nKDY= X-Gm-Gg: ASbGncvG4Oh64AlO9grQv0msu1varu6FubfvcQioGYZpa7jrgC6Y8EIWlKr76nFJ/NT q4RoyLoZLEEcy4uCwjOscMfrHOfkk+UA2iuQWVvReEF7szJhrThKXn6igmlcKWmYg2QtyIQa2Tg yLhalVk9tCMuL7OwF7g/Hzs4N5aIMxi2KyKKF8dgo+iFJVQL3UgMA802Q2kDooH6+IiuALpykL3 cJomCu9a0NhxrHqMrnpsKtiastS/6xDDKPhXx1w2Vwz6+pfewZ1Bx+AcB4iJNLzOgwM5+b8XxIm vbbPgw== X-Received: by 2002:a05:6000:4710:b0:386:1cd3:8a0b with SMTP id ffacd0b85a97d-3888dcd467fmr3133349f8f.17.1734132710462; Fri, 13 Dec 2024 15:31:50 -0800 (PST) Received: from localhost.localdomain ([45.93.146.194]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8046c71sm796788f8f.65.2024.12.13.15.31.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Dec 2024 15:31:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 10/20] hw: Use pci_bus_add_fw_cfg_extra_pci_roots() Date: Sat, 14 Dec 2024 00:30:45 +0100 Message-ID: <20241213233055.39574-11-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241213233055.39574-1-philmd@linaro.org> References: <20241213233055.39574-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We want to remove fw_cfg_add_extra_pci_roots() which introduced PCI bus knowledge within the generic hw/nvram/fw_cfg.c file. Replace the calls by the pci_bus_add_fw_cfg_extra_pci_roots() which is a 1:1 equivalent, but using correct API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20241206181352.6836-6-philmd@linaro.org> --- hw/arm/virt.c | 3 ++- hw/hppa/machine.c | 2 +- hw/i386/pc.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3bd9dd0f863..333eaf67ea3 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1750,7 +1750,8 @@ void virt_machine_done(Notifier *notifier, void *data) exit(1); } - fw_cfg_add_extra_pci_roots(vms->bus, vms->fw_cfg); + pci_bus_add_fw_cfg_extra_pci_roots(vms->fw_cfg, vms->bus, + &error_abort); virt_acpi_setup(vms); virt_build_smbios(vms); diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index a31dc32a9f7..4e673353225 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -240,7 +240,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms, PCIBus *pci_bus, g_memdup2(qemu_version, sizeof(qemu_version)), sizeof(qemu_version)); - fw_cfg_add_extra_pci_roots(pci_bus, fw_cfg); + pci_bus_add_fw_cfg_extra_pci_roots(fw_cfg, pci_bus, &error_abort); return fw_cfg; } diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 99b9b105e26..92047ce8c9d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -631,7 +631,8 @@ void pc_machine_done(Notifier *notifier, void *data) /* set the number of CPUs */ x86_rtc_set_cpus_count(x86ms->rtc, x86ms->boot_cpus); - fw_cfg_add_extra_pci_roots(pcms->pcibus, x86ms->fw_cfg); + pci_bus_add_fw_cfg_extra_pci_roots(x86ms->fw_cfg, pcms->pcibus, + &error_abort); acpi_setup(); if (x86ms->fw_cfg) {