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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 F1B22C6377A for ; Tue, 20 Jul 2021 15:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC64261009 for ; Tue, 20 Jul 2021 15:12:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240476AbhGTOa6 (ORCPT ); Tue, 20 Jul 2021 10:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240142AbhGTOXk (ORCPT ); Tue, 20 Jul 2021 10:23:40 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FFBAC0613E6; Tue, 20 Jul 2021 08:01:41 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id k16so24267080ios.10; Tue, 20 Jul 2021 08:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rqh2j+Ayr+W6oCbgsaoRs3C9KQ2NwKX2qzDHqghJU8A=; b=QDQ2StR3eOJ9DSz/XEED4UdJYEaTc9e1ntF49N/yJK/ddvSKNU+F+Q/k4RimnL0U1l Q1mch4xfPqaMnUMOZvar0GwkHY9vwD3hYFeVqaJuP8jq+Bq1WkPSbOmzNBs7W0vWalxc Vv4AM9PWqWTsh6JyiCBv4ecyhoxJZ1qPj4gm8hck7zzXH6kDaNaLVya9a4sKurqkSr4j fLzdskYvexAWDxhR2pKql2nV4QmlfPVr3C/xlxL+12XbFPoi6vCtXd7nFDGXlhDwwHn/ ILS+gupaAGCD4w08yIG/0DM6LaCHTISgy0w5alqcqYjdZQ8jx2m1YLIHeRxT47MTN80W Z/iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rqh2j+Ayr+W6oCbgsaoRs3C9KQ2NwKX2qzDHqghJU8A=; b=SnHwr4Rk3MVTDSX7ZX6o4n6MfXj05pamSchIY2qfimGWKF6tMdQuK043j3SsbsrtRw k1qlRcySpShk2G2tWE8/1geKsxjqIHiSaUDklXDOPfSREOp1barPVNYmnrB+FFnoabrX P2j7wyh9CMqxRgu+wTPMZm60j/GBGbKnMV6+AH28MTZxI89AMAFEjma8JllBhRFD7HKf UuNxiVW8J828uYHLjP40byIkJbYd8gebEz6FuECecBuDCnd7crJAbBlOHECBXrmlOw6A MqZ1Z43b6EMMZ67QkpjgEEavD0oxBK5B0hpyBJOXV4e+Ar/3nonNQAtQ2Vo07yRODSbG VkbA== X-Gm-Message-State: AOAM533YD38GSM+InLJcyrJnGKw8xQHHnXVqqSFPExGUvvvDDC+K2Wi2 qN8E/o1X8D3evVtHDcz79Ok= X-Google-Smtp-Source: ABdhPJxhaXBgFSmd11R8aI9lQGwxuq4ljnVnDeDK96jRlx+t6kKHRJJPyC9TcQlbTm8vyuUHIKj8PQ== X-Received: by 2002:a05:6602:2155:: with SMTP id y21mr7441790ioy.16.1626793301015; Tue, 20 Jul 2021 08:01:41 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id h1sm6841841ioz.22.2021.07.20.08.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 08:01:40 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 4359027C005C; Tue, 20 Jul 2021 11:01:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 20 Jul 2021 11:01:39 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedvgdekudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrghtth gvrhhnpedvleeigedugfegveejhfejveeuveeiteejieekvdfgjeefudehfefhgfegvdeg jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsoh hquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedq udejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmh gvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jul 2021 11:01:37 -0400 (EDT) Date: Tue, 20 Jul 2021 22:59:41 +0800 From: Boqun Feng To: Marc Zyngier Cc: Bjorn Helgaas , Arnd Bergmann , Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Lorenzo Pieralisi , 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: [RFC v5 8/8] PCI: hv: Turn on the host bridge probing on ARM64 Message-ID: References: <20210720134429.511541-1-boqun.feng@gmail.com> <20210720134429.511541-9-boqun.feng@gmail.com> <87v95582zh.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v95582zh.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 03:38:26PM +0100, Marc Zyngier wrote: > On Tue, 20 Jul 2021 14:44:29 +0100, > Boqun Feng wrote: > > > > Now we have everything we need, just provide a proper sysdata type for > > the bus to use on ARM64 and everything else works. > > > > Signed-off-by: Boqun Feng > > --- > > drivers/pci/controller/pci-hyperv.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c > > index e6276aaa4659..62dbe98d1fe1 100644 > > --- a/drivers/pci/controller/pci-hyperv.c > > +++ b/drivers/pci/controller/pci-hyperv.c > > @@ -40,6 +40,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -448,7 +449,11 @@ enum hv_pcibus_state { > > }; > > > > struct hv_pcibus_device { > > +#ifdef CONFIG_X86 > > struct pci_sysdata sysdata; > > +#elif defined(CONFIG_ARM64) > > + struct pci_config_window sysdata; > > +#endif > > Am I the only one who find this rather odd? Nothing ever populates > this data structure on arm64, and its only purpose seems to serve as > an anchor to retrieve the hbus via container_of(). > This field will also be used as the ->sysdata of pci_bus and pci_host_bridge, and some of the PCI core code touches. Although I made this field as all zeroed and make sure PCI core can handle (patch #4). > If that's indeed the case, I'd rather see an arch-specific to_hbus() > helper that uses another (preexisting) field as the anchor for arm64. > I did a quick look, but I didn't find another field works: the field needs to be placed inside hv_pcibus_device and the address can be retrieved via pci_bus. I'm open to any suggestion in case that I missed something. Regards, Boqun > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible. 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=-10.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_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 3BD98C07E9B for ; Tue, 20 Jul 2021 15:04:23 +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 03AAD610CC for ; Tue, 20 Jul 2021 15:04:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03AAD610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=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=cSnZiXSbCwMaod4R8iRDayI26Qk2wJP70X/wBcvZy0Y=; b=UFj3ABipTGMck+ ZGV2DTpPY8i4RPZDlgzZUTFg7npokz4Ie5/OrndHPpM2ZyvUiQHgDETUmEDwMM91YaRc1RqjkKwEr FxHGxo88a/ViHC3KO7i1+r0yHcjetccZMHxJbuIOxj5WfagtkNOImpX2j917mNi8Igh4TP1Wbaf7f yQLEgnDYlJEVjRDfD9k7zkQMt4pKL7NpRXDjBFyINKoccC0RbFtlMj11pHsYm+XUdacXjvwzYJSoA 3d9zM7F3kX5WvhUpryjAKmdO7aL2i1E+rnI1l0uFfw8ZgW+qKYwaiKp9Tv0dQLKxuDeh/lD1wHJHf dqIS2T7rMXgixfcjA7Vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5rFn-00DKEy-H0; Tue, 20 Jul 2021 15:01:51 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5rFf-00DKBv-Ec for linux-arm-kernel@lists.infradead.org; Tue, 20 Jul 2021 15:01:44 +0000 Received: by mail-io1-xd35.google.com with SMTP id x10so24278766ion.9 for ; Tue, 20 Jul 2021 08:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rqh2j+Ayr+W6oCbgsaoRs3C9KQ2NwKX2qzDHqghJU8A=; b=QDQ2StR3eOJ9DSz/XEED4UdJYEaTc9e1ntF49N/yJK/ddvSKNU+F+Q/k4RimnL0U1l Q1mch4xfPqaMnUMOZvar0GwkHY9vwD3hYFeVqaJuP8jq+Bq1WkPSbOmzNBs7W0vWalxc Vv4AM9PWqWTsh6JyiCBv4ecyhoxJZ1qPj4gm8hck7zzXH6kDaNaLVya9a4sKurqkSr4j fLzdskYvexAWDxhR2pKql2nV4QmlfPVr3C/xlxL+12XbFPoi6vCtXd7nFDGXlhDwwHn/ ILS+gupaAGCD4w08yIG/0DM6LaCHTISgy0w5alqcqYjdZQ8jx2m1YLIHeRxT47MTN80W Z/iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rqh2j+Ayr+W6oCbgsaoRs3C9KQ2NwKX2qzDHqghJU8A=; b=pqTf3InSvat6qQahgnHJDRsOfMhkbJVMdfj1Sh0RYcwmSFORbpWQoXmOwgmaItKMP8 gW/nHafCJ5n75CrWXaYiF2pbtlDqzzfKK5iD09Nbq9RbyG4owS89cLJtuKjI5mVv96bs dtFAiFLO86UuZH38SV3vVEwtR8e/qs0qS6/D1rFA2ZmoM2r0C/twFC4zwUiQ4k6pNNAJ AwxzpKYV/LNSpvbuFwlJ50x2ZqYM0uk/ACaTbccLuS86xuP4LsRwLgWdIQ8gLHlAJoTD bWbxZLO8Zh6ViIs4qF/BSjqLY76l/8CIph0hDbCmr4OOCYOXqxiZQfKqanVaQ6oiXOUS Iecg== X-Gm-Message-State: AOAM532qSjOvp36pb6sc87w4yF+aISBMvAfNv065bJ8MVpQpguI697pH oKx+JUWRW+wRHzDmBLgTO1k= X-Google-Smtp-Source: ABdhPJxhaXBgFSmd11R8aI9lQGwxuq4ljnVnDeDK96jRlx+t6kKHRJJPyC9TcQlbTm8vyuUHIKj8PQ== X-Received: by 2002:a05:6602:2155:: with SMTP id y21mr7441790ioy.16.1626793301015; Tue, 20 Jul 2021 08:01:41 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id h1sm6841841ioz.22.2021.07.20.08.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 08:01:40 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 4359027C005C; Tue, 20 Jul 2021 11:01:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 20 Jul 2021 11:01:39 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedvgdekudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrghtth gvrhhnpedvleeigedugfegveejhfejveeuveeiteejieekvdfgjeefudehfefhgfegvdeg jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsoh hquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedq udejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmh gvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jul 2021 11:01:37 -0400 (EDT) Date: Tue, 20 Jul 2021 22:59:41 +0800 From: Boqun Feng To: Marc Zyngier Cc: Bjorn Helgaas , Arnd Bergmann , Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Lorenzo Pieralisi , 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: [RFC v5 8/8] PCI: hv: Turn on the host bridge probing on ARM64 Message-ID: References: <20210720134429.511541-1-boqun.feng@gmail.com> <20210720134429.511541-9-boqun.feng@gmail.com> <87v95582zh.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87v95582zh.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210720_080143_540439_C1B94A07 X-CRM114-Status: GOOD ( 24.27 ) 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 20, 2021 at 03:38:26PM +0100, Marc Zyngier wrote: > On Tue, 20 Jul 2021 14:44:29 +0100, > Boqun Feng wrote: > > > > Now we have everything we need, just provide a proper sysdata type for > > the bus to use on ARM64 and everything else works. > > > > Signed-off-by: Boqun Feng > > --- > > drivers/pci/controller/pci-hyperv.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c > > index e6276aaa4659..62dbe98d1fe1 100644 > > --- a/drivers/pci/controller/pci-hyperv.c > > +++ b/drivers/pci/controller/pci-hyperv.c > > @@ -40,6 +40,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -448,7 +449,11 @@ enum hv_pcibus_state { > > }; > > > > struct hv_pcibus_device { > > +#ifdef CONFIG_X86 > > struct pci_sysdata sysdata; > > +#elif defined(CONFIG_ARM64) > > + struct pci_config_window sysdata; > > +#endif > > Am I the only one who find this rather odd? Nothing ever populates > this data structure on arm64, and its only purpose seems to serve as > an anchor to retrieve the hbus via container_of(). > This field will also be used as the ->sysdata of pci_bus and pci_host_bridge, and some of the PCI core code touches. Although I made this field as all zeroed and make sure PCI core can handle (patch #4). > If that's indeed the case, I'd rather see an arch-specific to_hbus() > helper that uses another (preexisting) field as the anchor for arm64. > I did a quick look, but I didn't find another field works: the field needs to be placed inside hv_pcibus_device and the address can be retrieved via pci_bus. I'm open to any suggestion in case that I missed something. Regards, Boqun > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel