From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756099AbcBXJFw (ORCPT ); Wed, 24 Feb 2016 04:05:52 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:59210 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751814AbcBXJFr (ORCPT ); Wed, 24 Feb 2016 04:05:47 -0500 From: Arnd Bergmann To: Kishon Vijay Abraham I Cc: Paul Gortmaker , linux-kernel@vger.kernel.org, Bjorn Helgaas , devicetree@vger.kernel.org, Frank Rowand , Geert Uytterhoeven , Grant Likely , Ley Foon Tan , Murali Karicheri , Rob Herring , Russell King , Stanimir Varbanov , Thierry Reding , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 0/5] Modularize PCI_DW related drivers. Date: Wed, 24 Feb 2016 10:04:57 +0100 Message-ID: <6350001.oOdGGcH81x@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56CD4916.3050904@ti.com> References: <1454889644-27830-1-git-send-email-paul.gortmaker@windriver.com> <56CD4916.3050904@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:flhC7tQrxGOoRzh7zEIDk7GwrpRYNNnqAA2LCs7VXX3UjZMxpx4 BjjrUGFITq/uHj1TWUfFYdep+sEYbEnGfjt3XzwrQa6om7LRrHVxojsX2V5AXqOHVfrVOHs xjREj57Nipq4W5cRyziSOA9vrjiHa4riYPsS8Vj3/7+/rZykHudx0w2vP90ZQicOzzSU3LZ cL99RkOorxUNu0sekJBsg== X-UI-Out-Filterresults: notjunk:1;V01:K0:9mPvjXvtr04=:6hMsYT1DPgwmrUHbIaL4F0 fXXNvEHmvb77ka0bxjGy3cC+1aYx2g/tzdjmDUhvYSF1tKc6KdbEGU1hULIvEnnuqYFPq5G/l OfLKt6kmYCPmF8c29r0pn1ilHVTRa0vfyVKRZ9L1zkPOhpfhN+j9/g0GnhCTdD01NVk1IMiSI Mporq7HS88VoQJegje7WyXV8iQUqVVIg8nd7mnIAmNIrYFnc1jZ5Fi/PAXYFGKZLaQCs/FMCB sd8j4yNtPmSD4CKEweWULU9JaPFGk+cy8RnvnVWeVQAKsjKxfUSEBWqAor0Axjnqi6c0s2Q8T JlqKqAyW2tJepInYECA+Cs08l8IjbGTqwzkDtYUHoBR4pZ6tVOKqZ4nEzLKGM/QKSLQA3UMwB 79t69pcsMjUBvSN5NLn/NJgW5cNfW/1PkX+LffPh8WBpGoAuXiTK70OR5nRGdbBFAHctGykfW pJdTRnFSHBa9xG7HHEsbl69Em/yEwri+ZnN1deMshH16AQNglAy0pY8dE8kUHoEDhA5Mn7fnh TBCX/qbIETZUp2Y4XpiKwQBDThp4SGVT0MJVMa52d5wbPdP/kfZOLUKSZbc1ARhuqO1nuSKYy LC0s/zkWFXs9ItE1FRTo094SVddF1YQSGs4r2yn+8JXqvh0b8j853KZ6U3uy3pqhUO2GuhWZp bzQSBB8aTldH9gq04HCxYeBSRh+/exjrzveACfylKrMCUTwyxlefb+q7Rru6spmOvN1tQN3tF X0Z/SZ6TbAxu8KC8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 24 February 2016 11:39:26 Kishon Vijay Abraham I wrote: > Hi, > > On Monday 08 February 2016 05:30 AM, Paul Gortmaker wrote: > > In a recent patch series that aimed to remove code related to module > > unload for PCI support that was simply non modular, the discussion > > led to people wanting to keep the code and push towards taking the > > steps needed to support moving it towards tristate instead[1]. > > > > Here, we take step one, which is simply making the Kconfig change > > and then dealing with any build fallout or modpost fallout. What > > amounts to essentially a sanity build test. To be clear, these > > have not been runtime validated; that will need to be done by those > > with access to real hardware. However, the changes are not anything > > that should disrupt any existing built-in validation, so real world > > users should not be impacted by this change. > > > > We start with a smaller family of drivers; those that actively select > > PCI_DW, as a nice self contained group to test the waters and see if > > everyone is still good with this approach before investing more time > > on a wider scale to other pci/host/ code blocks. > > > > As such the drivers here share a dependency on having the same group > > of functions exported in order to successfully complete modpost. > > > > In addition, we have to stray outside drivers/pci to add exports > > in two places; once for an ARM fault handler, and once for an OF > > variable. > > > > The pci-keystone-dw.c instance was handled separately because it > > consists of two source files that need their own group of driver > > specific exports above and beyond the "shared" ones. > > > > Then we convert the Kconfig for all remaining at once; we could have > > done it on a per driver basis for ease of revert if anyone really > > objects, but since it would be a one line change, that seemed like > > not a real concern. > > > > Build testing was done on the linux-next tree for arm allmodconfig. > > I took these patches and gave a test with DRA7xx board. As expected there was > no issues when the driver was built-in. However when I tried to rmmod/modprobe > I got this error [2]. Thanks for testing this! > [2] -> http://pastebin.ubuntu.com/15185894/ It looks like you are hitting the BUG_ON() in ioremap_pte_range() that checks if a virtual address already has a page table entry, which in turn is probably a result of dw_pcie_host_init() calling pci_remap_iospace() again for the same memory area it has called the last time, and no cleanup done inbetween. Could you try adding a pci_unmap_iospace() and calling that in the device remove function? Let me know if you need help implementing it. Arnd