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=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=no 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 18791C433C1 for ; Mon, 29 Mar 2021 22:55:08 +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 8691C61987 for ; Mon, 29 Mar 2021 22:55:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8691C61987 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=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: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=1JSk28/QfL2VBDE3zjAagsK0nvtY9YKyTqasjt/WrRI=; b=m6kIwPg6KMxkLJORuYi2aAV9M XO/t6upAIQiRgVaGNgNowpDRucjlt5tqY5/Qf56DhbsyU+LhuwvrfZC+bNld1bIqvVodBIjUlKSSt YQemk/P30JeOQJ91dCz4LZqJlCUx1/obaqj3zyiByV4O3IR8J7ycOxjSsIQOYgGA1G1rUC9uJQJ9E yLDlUiL/cGjmdJNbdbhISKzdY0xa8RZF1p+L1UnXx6SCE3ex9QjX6C7Q24+rZHOTVIATeizdWrgd0 WJlSJTPGGrVPEkkRdnIgLDQUygzjF/QRo3kT9f/MSgvXUiCcRLqDpUZXqPyHTqV5ueUrMYbgUT+KA m6WWet0sw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR0l0-001m45-7K; Mon, 29 Mar 2021 22:53:14 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQsxN-000iNj-7u for linux-arm-kernel@lists.infradead.org; Mon, 29 Mar 2021 14:33:31 +0000 Received: by mail-qt1-x832.google.com with SMTP id j7so9416305qtx.5 for ; Mon, 29 Mar 2021 07:33:28 -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=INa95GQbP5UUybr8uCp1E9rgvS5/GtEKon5OyS4S3Jo=; b=cdRobD61oBkZLm/kXpJy7rVCQDfwCcCijbVbvwbHBD73ukF3xVkwHV9xnk0BcknK0L ALbQxpOZXuEm4jx6ChP6rD5vxUuLfnMrXdvy7UGGLfGXWswa589epzdSYRBIyGw8AmPm jEsdtUYKY1ba56Xn9EEYx8F2QArP0dkEpx+dlLObu8ZFwojEATIlZNbVN0GWzhAX1CTQ Ncyhktz/ZZTXqotgdp7yG2Fgrr62tc/S8mVGIPW2fpNYHTNaCukty/+lVGKAytzUTAci dgNMLeWAlYReEilJYKobhoZb1ry8cih+qwbgl1jEGvxdQBJAm3+LoWIfYjDsKVRPJNPk 5gHw== 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=INa95GQbP5UUybr8uCp1E9rgvS5/GtEKon5OyS4S3Jo=; b=bmuB1AwKyNLXTSzgVnOpwvUOPGh3xLf5/rDeQtv3imGM+M/44mh+dc/Hre7+Hv4/iA 43kqBm3/53tOO1wfcjNBuuU08iEOt0pZN6rEsgYqzNQxHbdDyJcrjTUvJKXdnDGCFMak fUGE/ETbpaDS4lQT7iYeNysSLpjQ7c+B1EBknYkYY43TPV2mUN//vRE7P5c02NhdOmrl UkXBOO3TeAOiCau5iMc/YWLjJq6blDr90xU1/RvKTaahpi6+yWkLM+RzT4Eb6HL2h35Z tBKUD2t3ecuf+RM9aVKg7+V4n7jOYhsQNkfzf+mjOZC5GeKVin4XktvGws7nTUpFYofe U4Pw== X-Gm-Message-State: AOAM5305x76jVvWmcgRCeQ9MK+v61oF+c7RwbQqNTwngxtOsXdLtSw0M /fcSAu66DNP3HF/C9opy81I= X-Google-Smtp-Source: ABdhPJx+DEpXAFikZxvq5usQQQaEYJoD5Kit8EUdaJvvG8RWW1UZaatz16ZLj0tVOdQFmjq+GzgEeA== X-Received: by 2002:aed:3001:: with SMTP id 1mr22944377qte.344.1617028407282; Mon, 29 Mar 2021 07:33:27 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id s17sm10471864qta.44.2021.03.29.07.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 07:33:26 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id D105727C005B; Mon, 29 Mar 2021 10:33:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 29 Mar 2021 10:33:25 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudehkedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhepveeijedthfeijeefudehhedvveegudegteehgffgtddvuedtveegtedvvdef gedtnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudefuddruddtjedrud egjedruddvieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvge ehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhm sehfihigmhgvrdhnrghmvg X-ME-Proxy: Received: from localhost (unknown [131.107.147.126]) by mail.messagingengine.com (Postfix) with ESMTPA id 186A51080054; Mon, 29 Mar 2021 10:33:24 -0400 (EDT) Date: Mon, 29 Mar 2021 22:32:35 +0800 From: Boqun Feng To: Arnd Bergmann Cc: Bjorn Helgaas , Bjorn Helgaas , Linux ARM , Linux Kernel Mailing List , Linux on Hyper-V List , linux-pci , Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Lorenzo Pieralisi , Rob Herring , Clint Sbisa , Ard Biesheuvel , Sunil Muthuswamy , Marc Zyngier Subject: Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata Message-ID: References: <20210319161956.2838291-2-boqun.feng@gmail.com> <20210319211246.GA250618@bjorn-Precision-5520> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_153329_411450_1DA39686 X-CRM114-Status: GOOD ( 21.20 ) 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 Hi Arnd, On Sat, Mar 20, 2021 at 05:09:10PM +0100, Arnd Bergmann wrote: > On Sat, Mar 20, 2021 at 1:54 PM Arnd Bergmann wrote: > > I actually still have a (not really tested) patch series to clean up > > the pci host bridge registration, and this should make this a lot easier > > to add on top. > > > > I should dig that out of my backlog and post for review. > > I've uploaded my series to > https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git > pci-probe-rework-20210320 > > The purpose of this series is mostly to simplify what variations of > host probe methods exist, towards using pci_host_probe() as the > only method. It does provide some simplifications based on that > that, including a way to universally have access to the pci_host_bridge > pointer during the probe function. > Thanks for the suggestion and code. I spend some time to catch up. Yes, Bjorn and you are correct, the better way is having a 'domain_nr' in the 'pci_host_bridge' and making sure every driver fill that correctly before probe. I definitly will use this approach. However, I may start small: I plan to introduce 'domain_nr' and only fill the field at probe time for PCI_DOMAINS_GENERIC=y archs, and leave other archs and driver alone. (honestly, I was shocked by the number of pci_scan_root_bus_bridge() and pci_host_probe() that I need to adjust if I really want to unify the 'domain_nr' handling for every arch and driver ;-)). This will fulfil my requirement for Hyper-V PCI controller on ARM64. And later on, we can switch each arch to this approach one by one and keep the rest still working. Thoughts? Regards, Boqun > Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel