From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134AbcBHJxt (ORCPT ); Mon, 8 Feb 2016 04:53:49 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:65491 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbcBHJxr (ORCPT ); Mon, 8 Feb 2016 04:53:47 -0500 From: Arnd Bergmann To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Russell King , Bjorn Helgaas , Geert Uytterhoeven , Thierry Reding , Ley Foon Tan , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/5] ARM: add EXPORT_SYMBOL of hook_fault_code for PCI host modularization Date: Mon, 08 Feb 2016 10:53:10 +0100 Message-ID: <2567476.SknW0BEsQJ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1454889644-27830-2-git-send-email-paul.gortmaker@windriver.com> References: <1454889644-27830-1-git-send-email-paul.gortmaker@windriver.com> <1454889644-27830-2-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:HlmRO4CUcjvkl08JxD1G6lSEpvb2WGxSN9FWPqruTxb3I/X2RWX e44EPfgllzx6VZtXkm9QXwG3KswcL1Otsa/f35w8kg3st8EH4iWdjdbODU5ctfOoH8sYxlM NtJiMmWw7g/xJNW1zPJ9H34eHbOlwQSlcPmDh14x9GboRMZMDpOsM4VbhUYrnvmMarrXnox dhkeBoJHUk100MoJCMhSg== X-UI-Out-Filterresults: notjunk:1;V01:K0:Ptbid3PosfI=:gujLHoYSyyPP7uLy3ZdzV+ HVXDBIn5PPV54pzPZvUH0HQZo31Nu28fx9Q9nQam2JOMRy+ULeIfUIy/8j3Q0MP95njT+Khn4 PaFqMbbWJ4rG+UHwyU08aRhbugCqg9bbL8EA0g12fGwAXevaXQJ6437rykLou3dnLb2yxGayf gJRrYNACziI3SPk/HKuJbcbHdjA08Ea7mGiCXNQaDnLzMYq3AzUo8iU5Z3ZXnSYUpfQBzr07i xGk2W4TgNOUfvskHJCPaCIq9qD8ghl8up6Hp7fxNz5O1zNiDggJjzEFSJ8dmPzrnBJCKmS3ZU 8sGIO5p5scxDP21Km4FaBp14JxMat6bDign6wcDs5EjK/SrETVwIFbB1e3WBuGGxnVBs5ZUmb Jxh/nKuPoqlNDHAKjRf+AXX+n6wzGr6/+luTFyI2U9Et8fsQEBxAlvVA9alYQnAYMvZtjRKiz bonGKmCwg2vHs+G8slf6CIlbrudUf/6yb0hOW+4CVt0l046KMPOpQlVU74cqTOnW4b5qwPaAi qLOS4mm2yY7WJGlo8FAJMrJg7y1OZ7Sr+QMe68fYW+/5umcxbTWOEV6ooetd2zf2qmVFxOxaF bltpxGE2oN54ugZWfrwaR6g+2Vnjadrb5JpHViCVspjSZo3OBTgSWMS7skUipka6uKdCDeSuI 1qRrTwvQM/gV5nD381zBHzF2C4MEV2/7bwT/XhqCbQfQmgQQZQA5D/IX39aPgd12S6Uu5lYa+ Tw4ZFFLOB9EtGQJg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 07 February 2016 19:00:40 Paul Gortmaker wrote: > In a discussion of a previous patch set[1], it was suggested that > modularizing some of the PCI host support would be good to keep > multi platform bzImage sizes smaller. > > Two of the files that are candidates for conversion to tristate > from bool are: > > drivers/pci/host/pci-imx6.c > drivers/pci/host/pci-keystone.c > > However, doing the conversion reveals that they are going to fail > at modpost time since hook_fault_code isn't currently exported. > > Since we are now going to export it we also need to remove the > __init tag, as the fcn needs to be present at insmod time. > > [1] https://lkml.kernel.org/r/20160108203102.GH5354@localhost > If we want to make hook_fault_code() visible, we at least also need an unhook_fault_code() function that removes the fault handler when unloading the module, and preferably does so in a safe way. The usage of hook_fault_code() at least in the imx driver is also problematic, as it just ignores all "imprecise external abort" faults, whether they come from PCI or not. Arnd