mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: mhklinux@outlook.com
Cc: rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI/ACPI: Remove Hyper-V special case in pcibios_root_bridge_prepare()
Date: Thu, 22 Oct 2026 15:47:53 -0500	[thread overview]
Message-ID: <20261022204753.GA2740623@bhelgaas> (raw)
In-Reply-To: <20260929181056.4746-1-mhklinux@outlook.com>

On Tue, Sep 29, 2026 at 11:10:56AM -0700, Michael Kelley wrote:
> pcibios_root_bridge_prepare() currently has code to handle Hyper-V
> guest root bridges with the sysdata parent field set to NULL. While
> this special case existed when commit 7d40c0f70d92 ("arm64: PCI:
> Support root bridge preparation for Hyper-V") was accepted, more
> recent commit 8d21732475c6 ("PCI: hv: Propagate coherence from VMbus
> device to PCI device") always sets the sysdata parent field to a
> non-NULL value.
> 
> No harm is caused by leaving the special case in place, even
> though it is no longer needed. But in the interest of overall
> code cleanliness, remove it.
> 
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>

Applied to pci/pending/controller/hv for v7.5, thanks!  The branch
will be renamed and rebased to v7.4-rc1 after that is tagged.

> ---
> This patch does not just do a revert of 7d40c0f70d92 because
> an intervening commit moved the code to a new source code
> file.
> 
>  drivers/pci/pci-acpi.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index 42d545edd7fa..452a90317c58 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -1572,17 +1572,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
>  		return 0;
>  
>  	cfg = bridge->bus->sysdata;
> -
> -	/*
> -	 * On Hyper-V there is no corresponding ACPI device for a root bridge,
> -	 * therefore ->parent is set as NULL by the driver. And set 'adev' as
> -	 * NULL in this case because there is no proper ACPI device.
> -	 */
> -	if (!cfg->parent)
> -		adev = NULL;
> -	else
> -		adev = to_acpi_device(cfg->parent);
> -
> +	adev = to_acpi_device(cfg->parent);
>  	bus_dev = &bridge->bus->dev;
>  
>  	ACPI_COMPANION_SET(&bridge->dev, adev);
> -- 
> 2.25.1
> 

      parent reply	other threads:[~2026-10-22 20:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 18:10 Michael Kelley
2026-09-29 18:23 ` Rafael J. Wysocki (Intel)
2026-10-22 17:14   ` Michael Kelley
2026-10-22 17:48     ` Rafael J. Wysocki (Intel)
2026-10-15 15:35 ` Saurabh Singh Sengar
2026-10-22 20:47 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261022204753.GA2740623@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®