From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755030AbcBHAB6 (ORCPT ); Sun, 7 Feb 2016 19:01:58 -0500 Received: from mail1.windriver.com ([147.11.146.13]:62556 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754973AbcBHAB4 (ORCPT ); Sun, 7 Feb 2016 19:01:56 -0500 From: Paul Gortmaker To: CC: Paul Gortmaker , Russell King , Bjorn Helgaas , Geert Uytterhoeven , Thierry Reding , Ley Foon Tan , Arnd Bergmann , Subject: [PATCH 1/5] ARM: add EXPORT_SYMBOL of hook_fault_code for PCI host modularization Date: Sun, 7 Feb 2016 19:00:40 -0500 Message-ID: <1454889644-27830-2-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1454889644-27830-1-git-send-email-paul.gortmaker@windriver.com> References: <1454889644-27830-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Russell King Cc: Bjorn Helgaas Cc: Geert Uytterhoeven Cc: Thierry Reding Cc: Ley Foon Tan Cc: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker --- arch/arm/mm/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index daafcf121ce0..e0696a5ecc9b 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -525,7 +525,7 @@ struct fsr_info { #include "fsr-2level.c" #endif -void __init +void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), int sig, int code, const char *name) { @@ -537,6 +537,7 @@ hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *) fsr_info[nr].code = code; fsr_info[nr].name = name; } +EXPORT_SYMBOL(hook_fault_code); /* * Dispatch a data abort to the relevant handler. -- 2.6.1