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=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E58A8C432BE for ; Mon, 23 Aug 2021 09:45:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AC04261372 for ; Mon, 23 Aug 2021 09:45:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AC04261372 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: 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: List-Owner; bh=bnsgT5r62b4LoLqTrIwYHr35IKgz/APXAUa3+ob2J/4=; b=KIlLGMQAidR3Nc Hh7SWZoXyJEkF5x8uv0HK2PNnFdbzuEVNP3bxLKH55oGpqiWJjwJK7tD2CwdAQaW7Zt6dj+dx5F+e TBKbOiZogoMQOGnpygFhJ0bry95rQ7FGugqdFR1x+lFNeceNYDERibHw1DgN5xvZVNtOKHAGKJqgl NaKFJcR1VJNYZgxUvjl9dVL5eycLa+iKpTP4mGdRNjINXsMsSm3OScMLFdPvLbgfXW2QWUyqRN9xj pd81W4oK7i3SN4GBQR+y9Yir8Hm7aQtEeGvttcmr9FGfbs/X0t9+4KG0CmOkXpKu6XNvsLAll752e a9SSy/C8+uwqTKNqcZXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI6Uk-00GB9Q-4W; Mon, 23 Aug 2021 09:43:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI6Uf-00GB8b-VL for linux-arm-kernel@lists.infradead.org; Mon, 23 Aug 2021 09:43:51 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADF8661372; Mon, 23 Aug 2021 09:43:46 +0000 (UTC) Date: Mon, 23 Aug 2021 10:43:44 +0100 From: Catalin Marinas To: Boqun Feng Cc: Bjorn Helgaas , Arnd Bergmann , Marc Zyngier , Lorenzo Pieralisi , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, Sunil Muthuswamy , Mike Rapoport Subject: Re: [PATCH v6 4/8] arm64: PCI: Support root bridge preparation for Hyper-V Message-ID: <20210823094343.GB8603@arm.com> References: <20210726180657.142727-1-boqun.feng@gmail.com> <20210726180657.142727-5-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210726180657.142727-5-boqun.feng@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210823_024350_068699_2C2A14FE X-CRM114-Status: GOOD ( 14.63 ) 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 On Tue, Jul 27, 2021 at 02:06:53AM +0800, Boqun Feng wrote: > Currently at root bridge preparation, the corresponding ACPI device will > be set as the companion, however for a Hyper-V virtual PCI root bridge, > there is no corresponding ACPI device, because a Hyper-V virtual PCI > root bridge is discovered via VMBus rather than ACPI table. In order to > support this, we need to make pcibios_root_bridge_prepare() work with > cfg->parent being NULL. > > Use a NULL pointer as the ACPI device if there is no corresponding ACPI > device, and this is fine because: 1) ACPI_COMPANION_SET() can work with > the second parameter being NULL, 2) semantically, if a NULL pointer is > set via ACPI_COMPANION_SET(), ACPI_COMPANION() (the read API for this > field) will return NULL, and since ACPI_COMPANION() may return NULL, so > users must have handled the cases where it returns NULL, and 3) since > there is no corresponding ACPI device, it would be wrong to use any > other value here. > > Signed-off-by: Boqun Feng Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel