From patchwork Mon Feb 8 00:00:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 8245911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC32C9F6DA for ; Mon, 8 Feb 2016 00:03:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE968201B9 for ; Mon, 8 Feb 2016 00:03:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DDD8020173 for ; Mon, 8 Feb 2016 00:03:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSZHJ-0001QU-4t; Mon, 08 Feb 2016 00:02:05 +0000 Received: from mail1.windriver.com ([147.11.146.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSZH9-0001OK-3x for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2016 00:01:55 +0000 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id u18014CN023931 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 7 Feb 2016 16:01:04 -0800 (PST) Received: from yow-lpgnfs-02.corp.ad.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Sun, 7 Feb 2016 16:01:04 -0800 From: Paul Gortmaker To: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160207_160155_280848_0DC4EEE9 X-CRM114-Status: GOOD ( 21.11 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Arnd Bergmann , Paul Gortmaker , Thierry Reding , Geert Uytterhoeven , Bjorn Helgaas , Ley Foon Tan , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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.