From patchwork Wed Aug 11 15:36:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 12431463 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=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 09043C4338F for ; Wed, 11 Aug 2021 15:39:49 +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 905A660F46 for ; Wed, 11 Aug 2021 15:39:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 905A660F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fuXbeXiAnCLdMYnx9s4XpTwnzFkJkZXdiXwY+uCY3uA=; b=nxyz2rf3wycGke Pzr1Sw5tGiR67jNNxNVBq00EVpzQV0exkG9D00Zmbm+apG1OdpdF89xWwJnVFEBhyFYfAkrYMNKQS As0yAeyUrKD29LupPlG7/CBGUWjaYs1l1TxQCkPaG059mTjWe6/E8F+OzneX5tu/gTgHh2M2J+bz1 rsyCGl9JEHHGStgiyzOnWfPYiAZKcnNfhu1LTQcBUDrqQqV3z1nJN9434cjY9mZGctNIWbX5ek2WO Uk6v372EzoCfr2BoBTvae9qxAwCizqcXo8zq9sudD8B9UOVHB8LC4+qeaq3cwkEVFM/BrZMnCLjXS pSeyqrovfKEUAtdhLWHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDqHY-007Z6A-Pn; Wed, 11 Aug 2021 15:36:41 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDqHU-007Z4j-Ar for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 15:36:37 +0000 Received: by mail-il1-x130.google.com with SMTP id i9so3278755ilk.9 for ; Wed, 11 Aug 2021 08:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C4Yippe1FfLHJnm/bBg0Tev596XLEVnx9ptKT8Tmv1w=; b=tuo0NJhlbsE1cgJWOCTQMJGME0TyKH6WbYQBRHNGe6yb4vS8khVqpRBj9CelO4Drcu ipgawXlzgK+T4+0OBbYZXrAC1LFA5a7zBBMAxXttMA0xiNXNci6NbPSr29QvVBGM+LzW 29epQDHdAjX31mv91AAwgsMS8FmaqZJ2+oJcz/nKZExo2GdJ6bM9tSj48TZSrpoMKC02 c+JeSib3R+Nz6EjTa6xDUcvTxRMEGNVg12BZ4RkXpr1AUdAsrvuWuBm2oTzNFEZOw4S7 PMChY9ksUDnIApH0yl+pHTagBMzZoevhZZ0489tbZYC1FLezbgfwtDnFmSd48OU9F4Sr Cgpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C4Yippe1FfLHJnm/bBg0Tev596XLEVnx9ptKT8Tmv1w=; b=uPWg3mHTlpsfHNdsqbGvCSTZyJ8W12wk03ByCDZs7EtwXuwAlSzARcQ02DXmfoQn1h zkFiu2eVn0Jrijur96dM2rn6KPK+d5BHZAYcy+Ps+F8pbUX7oT0G04sk7q8xMcyQrCL3 3l3Suu77Z+omI5QI1OLQLYhayvh/MP1OHjvn1V80aIRZ0NIzbTppiqZefM0PnFtEKUSf YNxIhT6QoS6TxlKw7Nh47erRZfQi8AKomgnS0vUpXoyfffv22JMkgM/wcg4oJ3KRzbKp uA89aORMXHbzWpOutG0EIXYu7v62P9lKmy32Nl01SlKJLULqF3ClhWq3t5BXoJaM+2vq LSfA== X-Gm-Message-State: AOAM530EsBEDsTd6m3QkH/wucRUg0xqS4eNYgs6AH7/5ztfJG/Gdlc6P +bsjBMNapQD5Bsvt4/2GA20= X-Google-Smtp-Source: ABdhPJyNTPz4hVjuOvkYyoJGprZOIGKlvLeq9sYzEWOuFruqzCYMdKQk+WsJtr3StkToCnA5pmFe0A== X-Received: by 2002:a05:6e02:1aaf:: with SMTP id l15mr51523ilv.128.1628696195512; Wed, 11 Aug 2021 08:36:35 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id r1sm12858165ilt.37.2021.08.11.08.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 08:36:35 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 1293C27C0054; Wed, 11 Aug 2021 11:36:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 11 Aug 2021 11:36:34 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrkedugdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepuehoqhhunhcuhfgv nhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrghtthgvrh hnpeeiueevjeelheduteefveeflefgjeetfeehvdekudekgfegudeghfduhfetveejuden ucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhs ohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnh hgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Aug 2021 11:36:31 -0400 (EDT) From: Boqun Feng To: Lorenzo Pieralisi Cc: Catalin Marinas , Will Deacon , Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Rob Herring , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Boqun Feng , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-hyperv@vger.kernel.org, Sunil Muthuswamy , Marc Zyngier , Arnd Bergmann Subject: [RFC 0/5] PCI: Use the private field of pci_host_bridge for ACPI device Date: Wed, 11 Aug 2021 23:36:14 +0800 Message-Id: <20210811153619.88922-1-boqun.feng@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_083636_414316_F7CD0B76 X-CRM114-Status: GOOD ( 11.23 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Lorenzo, As our previous discussion, I make a patchset showing the required effort if we want to use ->private in pci_host_bridge to store ACPI device pointer on ARM64. This patchset is mostly for discussion purpose. This patchset is based onto the v5 of my Hyper-V PCI on ARM64 patchset: https://lore.kernel.org/lkml/20210726180657.142727-1-boqun.feng@gmail.com/ , and I've tested it with other code under development to fully enable Hyper-V virtual PCI on ARM64. Regards, Boqun Boqun Feng (5): PCI: Introduce pci_create_root_bus_priv() PCI/ACPI: Store ACPI device information in the host bridge structure PCI: hv: Set NULL as the ACPI device for the PCI host bridge arm64: PCI: Retrieve ACPI device information directly from host bridges PCI: hv: Remove the dependency of pci_config_window arch/arm64/kernel/pci.c | 14 +------------- drivers/acpi/pci_root.c | 5 +++-- drivers/pci/controller/pci-hyperv.c | 20 +++++++++++++++----- drivers/pci/probe.c | 15 ++++++++++++--- include/linux/pci-acpi.h | 5 +++++ include/linux/pci.h | 3 +++ 6 files changed, 39 insertions(+), 23 deletions(-)