From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752943AbcANMBK (ORCPT ); Thu, 14 Jan 2016 07:01:10 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:53448 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbcANMBI (ORCPT ); Thu, 14 Jan 2016 07:01:08 -0500 From: Arnd Bergmann To: Vineet Gupta Cc: Joao Pinto , "helgaas@kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , "CARLOS.PALMINHA@synopsys.com" , "Alexey.Brodkin@synopsys.com" , "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" Subject: Re: [PATCH v5 1/2] PCI support added to ARC Date: Thu, 14 Jan 2016 12:59:56 +0100 Message-ID: <4888629.rSv29HOrHE@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <56977B80.2040600@synopsys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Z76+0SmS3+U4kOo8dS7fVLlwLRNW7UT/RO0cAId4BtIkAYRTtiA B5AVq/E66R7UzA7Ra4ltgy1TjtiROOQBtgx/YUekOQsm8fL8xhuX0JCrl1FR5ymJHwaiUpc kdhxA+xaoDUcRLJ3MPV4d2w4xtyC7RR7VckeLm4h4AkW6lHgBJ+M2VWhY2fQODthPjN72pb e+MQ1l3tLE4VNyEXphBBw== X-UI-Out-Filterresults: notjunk:1;V01:K0:aabqgDZRyaQ=:uHHaY+sfisUnrZEZG3A3eQ WhJOtxdBVc4uLWnaknaa9QRuwAPY+ovT7Bj0uRX4uPRv/94EEny6CTFrKRhVy/uZZrt6A/OQ9 BHO8YP8MU2EI/AZzo5UNF3ER0Cuksqg72CcEv4qgXGG9Iz21aQDVSjqYSgPwJLz/0b5Flf79v W1fOSxlJtS6VzhmRp7JD6GfIdbrNSFZ0wntKdJis5sGmd71EIXAzUDzV0NHzTH40r1tubY1mA puLVQ60XKFFC3Jwk2MHINZRfPATSEzbC1Wy+9QWqpVjoiLSaNg8Z/YyW7rcfzdDiFdirn6+Pk nWimVnvP8sS6yRQ2YpuP63VBZMM6kKKTP5W8dwhx9lyYjQonN1OQbVWtkj2ppI9Mx9b5CvmqE p/iVhKJV4cPk9VJ5SLATKIrGEo3e/4aU2bi0Zs/YhyHYPoZS/oL3tYWAEO6p3TX8HbMS+41eI 6/ASTRO695I5mwKMKrKjRGOkq4wbIlDw1glK0R6oSQlRUnId4R9b/AqpYSnP5UuXcHMd1kZLY M+je+m3j1p7XbPfdlWAN7Nc2yO8ysgj3LZ1e/bzdJXgXceuNhiMjXC8hVs3fr0r23YuVtl2AT Az/JBuDMQHUIOVLtt/ZiFMBbSuCG/vDjs7sIaC4R5CsdxeWpXvQLqLmrAnBgqtUv0BRAwiwfz YPITfnHgvmFS/FCPy6jb5ft0lrfly/e3S4/eK4clIcCo6+6wlvLjT1KFUK7qTZquZPFLbF4Kz lbc8+eo3honR65nhffikCAIJ0lj0Y1GQ2rBCHw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 14 January 2016 10:51:32 Vineet Gupta wrote: > >> > >> A somewhat nicer method would be to have callback pointers in struct > >> pci_host_bridge, and call those when they are non-NULL so we can > >> remove the global pcibios_* functions from the API. That would also > >> bring us a big step closer to having PCI support itself as a loadable > >> module, and it would better reflect that those functions are really > >> host bridge specific rather than architecture specific. When you use > >> the same host bridge on multiple architectures, you typically have > >> the same requirements for hacks in there, but each architectures may > >> need to support multiple host bridges with different requirements. > > Since we will be constantly improving the driver and the core itself, I suggest > > that this functions be made __weak and in an update we can turn it struct > > pointers just like Arnd suggested. Is this good for you? > > There is no point in making it weak, w/o a fallback version in generic code. For > this series, I suggest you just remove the straggler EXPORT_SYMBOL and respin. > To clarify: I don't particularly like __weak functions anywhere, but they are already common in drivers/pci, so we can add a couple more to reach the goal of removing all architecture specific code. However, there should never be a reason to add a __weak function in arch code that gets overridden by common code, that would be very confusing and not helpful. Arnd