From patchwork Wed May 27 15:43:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 6490891 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C567C0433 for ; Wed, 27 May 2015 15:44:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7C6820592 for ; Wed, 27 May 2015 15:44:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C88D8205EC for ; Wed, 27 May 2015 15:44:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752719AbbE0Pnz (ORCPT ); Wed, 27 May 2015 11:43:55 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:51991 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbbE0Pnw (ORCPT ); Wed, 27 May 2015 11:43:52 -0400 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0M7bqp-1ZIcFA0kfn-00xLMG; Wed, 27 May 2015 17:43:17 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Zhou Wang , zhudacai@hisilicon.com, devicetree@vger.kernel.org, 'Zhang Jukuo' , 'Gabriele Paoloni' , Jingoo Han , 'Pratyush Anand' , 'Richard Zhu' , 'Zhichang Yuan' , 'Kishon Vijay Abraham I' , qiuzhenfa@hisilicon.com, linux-pci@vger.kernel.org, 'Bjorn Helgaas' , 'Liviu Dudau' , Fabrice Gasnier , 'Liguozhu' , 'Lucas Stach' Subject: Re: [RFC PATCH v1 1/3] PCI: designware: Add ARM64 support Date: Wed, 27 May 2015 17:43:14 +0200 Message-ID: <2095085.CuXXeGT0Wg@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <2378629.Ocol8HRDqD@wuerfel> References: <000001d096a9$27bf43f0$773dcbd0$@com> <5565CD0B.6020206@hisilicon.com> <2378629.Ocol8HRDqD@wuerfel> MIME-Version: 1.0 X-Provags-ID: V03:K0:21qbMKP/xM3JODwqrv+3brrT3KeYhLarLBSAY2kMpx1/JBePHS9 IRN9FX21UnWQSXy8knw3lroqPHD1frPREwkQebaWz8fBFl/8Wj1pGPJdXOgRjtOnehjOYqx 3GU8dpLX55B4y8tFOPJkCXjKrj6uOSP4Q76nU3EmnG/HsnRWuD5Uw/Tse9e6/D3w9E4YV9t vvp/M99OO88x48AaGLjpA== X-UI-Out-Filterresults: notjunk:1; V01:K0:YwaC/rQrx3I=:74Amyk9QLoNPy5ykdchvzM 2oxyndVCzQYMrEbNx/tNC6KcWD3zR6WHTNYSwXY1RtDgWYo4abmdFJQxxoQ1rZqfWCWZcePzD xuUIPqj7sF5mbNhrvBW2Jqg71bSSNdbQpSgqKVlgnS0ikbB+U/OKJ50KbFlJU2bNx8P5XV6ci iWrTB2JUmRGAxjV1JZuaKD0YZojSUqCf4EGGjMOV1BW6jYeBTt2bbvdWlpvJh7JlEAFn2++Nl 8Re6glo9rPyOkYETXh1x72kA5+8kpZRqU7cDfU5ygZ9n0MR//QOwstfJcyNKsZeFK5T6bGl64 eQ8e8QMDGrHV5y9IZBTZrNhk8MFEI8oY2t67U1aV+N7r2p5jSERB/FSxd+4oNK81zqPSQ1QqS U42SGBqLfzamn0jPxt0AhfU0cOE51++ikHvK5CbqwqYFaHQ1wZ/lT0FYgf/daRxZtzwrT+DUw 3Hcz9ymFCxczGJmMa1iuAsLoeLOa8pbGkigCDEoWpPRQ/QxEArzINGJ6aoqrbyJy9cViRve0D zqL3hxl2viMjoCxnkUNC1tZ3KLCJS5Ls2VdrJmZfq1x/k8sWRFYizRwzCz4Df9JC2Z2paZFLI QPFQCBaJ4CKDSq0Y1hwR7B4ttosJdl0J28Jj6R6f7J0QsQbB5D6Jrv3lWZC6TnLBBJ9t5bGiq WCBJ8y3C9jVF8amPJET84C95cX+vg9KgSzZU0H/jwrtL3Cg== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wednesday 27 May 2015 17:31:46 Arnd Bergmann wrote: > Yes, that works. However there are two problems with the approach: > > - we have to change all PCI host drivers on ARM to do this in order to remove > the ARM-specific pcibios_msi_controller() function > - it's possible that there are dw_pcie implementations that do not include > an MSI controller, so that pointer would be NULL, which leads to the > core code to still call the ARM-specific pcibios_msi_controller() function > unless we remove it. I wonder if this simple patch would be sufficient to kill off pcibios_msi_controller(). Can one of you try it? Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index fcbbbb1b9e95..7afb6d253162 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -18,15 +18,6 @@ static int debug_pci; -#ifdef CONFIG_PCI_MSI -struct msi_controller *pcibios_msi_controller(struct pci_dev *dev) -{ - struct pci_sys_data *sysdata = dev->bus->sysdata; - - return sysdata->msi_ctrl; -} -#endif - /* * We can't use pci_get_device() here since we are * called from interrupt context. @@ -462,9 +453,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, if (!sys) panic("PCI: unable to allocate sys data!"); -#ifdef CONFIG_PCI_MSI - sys->msi_ctrl = hw->msi_ctrl; -#endif sys->busnr = busnr; sys->swizzle = hw->swizzle; sys->map_irq = hw->map_irq; @@ -493,6 +481,9 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, panic("PCI: unable to scan bus!"); busnr = sys->bus->busn_res.end + 1; +#ifdef CONFIG_PCI_MSI + bus->msi = hw->msi_ctrl; +#endif list_add(&sys->node, head); } else {