From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9B47C433ED for ; Thu, 6 May 2021 22:28:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23F9461177 for ; Thu, 6 May 2021 22:28:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23F9461177 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=PymPkNWdcic6hy3KbJPprQ/TQC+vc3bPJ8l7GK8BNU4=; b=B/HNb77LEGIhc2dixMln/gPoY 7dnlo2Hg1EuAv2KlkK4A8ZZAHKU5nPPZiYnUDvfP2rFjKgB/1GxQ7IOQmmbk3XYpGRMZZ2ptXGlyd dZ+3pveRB3BrGihCVyvAwhF1Ac6znTv4v+6KwkVlNGrbaWvVdt8sCbKcUH/AXTyeAhy/mH4oodtQB VXMWXGZ+CzCYFmPFXkDnHqsciNWKdCv2giCQelyHVwNI0pxJI7KRb5kPafPMLJbM3dVIigtEwi43P /dlw0ARJlMJ+jxmSGqlCqUdbt6Lk+2R0GhekY3ZxcTButvx0LPx4xzECNVexqcJ45xJ7FOIUnUemz 62rH2FMEQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lemR7-005TnM-NP; Thu, 06 May 2021 22:25:37 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lemR5-005TnD-Kn for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 22:25:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:References; bh=cbtXwTJM966hf3sbJvpnKBsZ61wLNnyTFZpgy9rtDyA=; b=14NWkDyV5evy5EQeTgs/+gBNT4 9pGaUwAu65/zndF4O1aNka9xzoYn0mexTFi6uqJYFmtxBzB5YPzIg5koaOLIk0P7k3Etr6+oNdIw9 oeuJXLu6S6FGEEv1+Kt8mH0kF9d48uW/9Sl/8PLO3B1UET+RXdxM8qo2Ae4WSXXFGdxb39JS2y4Zp WzUWyIHcKBHTYO0Vd6zUM8II1jrCPwS4JiUUuvzJavkYUkqQj7migaPNsLsOQ+o8P2WzDMTNvdaYE pmo/yS1e0mRX2Aas5Ze9KtSPPSm1KY1CJZ5+Xs5zxPCCOs4lqYTnScTTdeah36Vo3vUBazGRKVdve uTO7AUnA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lemR3-006Qnh-1s for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 22:25:34 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id DCDCB61057; Thu, 6 May 2021 22:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620339932; bh=NJ1s9KsbTwMRkgcGjSh2NdaFzXd0HMKRyslD8lM2WzY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=LWAvu+8wVKwzJctAgyb0KBP9FpGjbaiAGHrbf/xOuUPL6BB0y03P/zGOVzk4Pk025 mqDHIzAHE4eWFQm4/0iDxcv5x9Y/GpdHc3XEQc03uxPZBKiEtYXG8XfPxZn7/2W5YS Z6mdJIlofH0c5Ery0WW4yLEDrMdYM4asO8IiuONBhlwzCGWJ4jFTxjV+SVCzTaFlch 7f7OOi95dFSrU15AV9UhdBLvQlkoLLNVkFJ0ys7u4+caYQacDfP5tmiSoKG4eAEXa7 0dhIeyzRhBhjQe7TN4FSABaHKOEYu/vUdfUscvGWZEAdMI5RaFlhugXJLNKI3J6N8g Jtl95d53f3V8Q== Date: Thu, 6 May 2021 17:25:30 -0500 From: Bjorn Helgaas To: Boqun Feng Cc: Bjorn Helgaas , Arnd Bergmann , Marc Zyngier , Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Lorenzo Pieralisi , Rob Herring , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thomas Petazzoni , Mike Rapoport , Robin Murphy , Thomas Gleixner , Jon Derrick , Sunil Muthuswamy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [RFC v2 6/7] PCI: arm64: Allow pci_config_window::parent to be NULL Message-ID: <20210506222530.GA1441653@bjorn-Precision-5520> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210503144635.2297386-7-boqun.feng@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_152533_139612_E8248AF8 X-CRM114-Status: GOOD ( 20.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Make your subject something like this so it matches previous practice: arm64: PCI: ... The "::" notation probably comes from C++, but doesn't really apply in C. In C, we would say "cfg.parent" or "cfg->parent". But pci_config_window and cfg->parent are probably too low-level for the subject anyway. Seems like it should mention Hyper-V, for instance. On Mon, May 03, 2021 at 10:46:34PM +0800, Boqun Feng wrote: > This is purely a hack, for ARM64 Hyper-V guest, there is no > corresponding ACPI device for the root bridge, so the best we can > provide is an all-zeroed pci_config_window, and in this case make > pcibios_root_bridge_prepare() act as the ACPI device is NULL. Why is there no ACPI device? Is this a needless arch dependency? Or is this related to using DT instead of ACPI? The cover letter hints that this might be related to PCI_DOMAINS_GENERIC=y, but that doesn't sound like a very convincing reason (and the cover letter can provide an overview, but the commit logs of individual patches shouldn't assume knowledge of the cover letter). > Signed-off-by: Boqun Feng > --- > arch/arm64/kernel/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c > index e9a6eeb6a694..f159df903ccb 100644 > --- a/arch/arm64/kernel/pci.c > +++ b/arch/arm64/kernel/pci.c > @@ -83,7 +83,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) > { > if (!acpi_disabled) { > struct pci_config_window *cfg = bridge->bus->sysdata; > - struct acpi_device *adev = to_acpi_device(cfg->parent); > + struct acpi_device *adev = cfg->parent ? to_acpi_device(cfg->parent) : NULL; > struct device *bus_dev = &bridge->bus->dev; > > ACPI_COMPANION_SET(&bridge->dev, adev); > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel