From patchwork Mon Oct 24 15:05:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9392287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E08AB60762 for ; Mon, 24 Oct 2016 15:06:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D25C7290FD for ; Mon, 24 Oct 2016 15:06:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C656B2912E; Mon, 24 Oct 2016 15:06:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35A5C290FD for ; Mon, 24 Oct 2016 15:06:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938723AbcJXPGo (ORCPT ); Mon, 24 Oct 2016 11:06:44 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:63453 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S940520AbcJXPGn (ORCPT ); Mon, 24 Oct 2016 11:06:43 -0400 Received: from wuerfel.localnet ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0LscDB-1cwXad28Ft-012Ky5; Mon, 24 Oct 2016 17:05:30 +0200 From: Arnd Bergmann To: Nicholas Piggin Cc: Russell King - ARM Linux , Michal Marek , Adam Borowski , Omar Sandoval , Linus Torvalds , adobriyan@gmail.com, sfr@canb.auug.org.au, viro@zeniv.linux.org.uk, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM Date: Mon, 24 Oct 2016 17:05:26 +0200 Message-ID: <14534456.e6dv16VA3R@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <3446653.W8FbGAKSeQ@wuerfel> References: <20161017065131.GA27863@angband.pl> <20161020150814.42951f61@roar.ozlabs.ibm.com> <3446653.W8FbGAKSeQ@wuerfel> MIME-Version: 1.0 X-Provags-ID: V03:K0:1vGYvwNl8N2XHn8NjAfKSyINR/smd/12/83ekzxu2F2ctcW9Jci ukJAqwQ5nf2rOL9AZEHQ3c9cYM4veVPuZ56tHLQCBK+Egx1riVZzYuFJMhQcWarEqFfkTzk 7a5BXVLhL/+KVjQ35H4YDYakhDGNsfR9sW7WoB18EokKNevAtrF7gsrLPotIMz9em+/75oc TrreFMmZBwzA9YBqgVJbw== X-UI-Out-Filterresults: notjunk:1; V01:K0:EP0Zyi5iuMI=:BbJuxKjjr/40mTDBfz1O4V OBVchymFg88mt1Qufn4bVZzFveuklYtvErfVNgmmDUZ/5O5VljdvYxo/7ORGqhRPz6uvCCcfU 89Svufb6dQ9pEf8MyCa8cORjNG9GB7wXQl/dXAUaULE8UsD7K+x2GsZqlLuJv/YVR6XtaJ8az r12j9EW/oPrmfXalR8gjqAvAc7VWM3BpE5AhJXhkErvC3QW2qGGK8hpFjyYAgiAC6jwrYnwht jUTrqay22ur5Ga76IzC4UqhmESaIZ3zqU58pnTrefMBRJwN8vpmqT7myha7qbRjU8nZXgiKQo 5hNRuxY+BxgDwmaedZZgg6FDo2aaaCzlgvu6MyipaVvHAf+9FMFmnkDVXJA77I56QqDM5NNHF QmOH6EpQXNbiKVQBqbIY5xqmxjlI0FIf1oXOtVETV5aOs09s6JYt4+SuZzngkf1Itscg+N/hq B7G054/IbZIfu+dU/iAsSGOwSAoxlf4TtBwjzJ4OOTRElMXkDtH65ekSEg9i12SALKrdBQtT+ evzjGbzG7ClSRoO2cBDWo+4lg3/37v6TsEhiuawmOVY3uUyMOc9zZspaPbRoANZUAOLRwd2Qg c1o5AZkCo027KxcsREkbdusaHCV0Kv5BaDCc52RXLo3gS1w3Amv0ZARDWR9orf23REbxljMY/ lW9wV92ePU8W3x9gPHeSNmkuXtQNOQ2fgXw0b3BY586RTbz6zKwf/9qMMeX+hRgvY7DuU7KjG pUYrC7W/uJx9HPXc Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds an asm/asm-prototypes.h header for ARM to fix the broken symbol versioning for symbols exported from assembler files. In addition to the header, we have to do these other small changes: - move the exports from bitops.h to {change,clear,set,...}bit.S - move the exports from csumpartialgeneric.S into the files including it I couldn't find the correct prototypes for the compiler builtins, so I went with the fake 'void f(void)' prototypes that we had before. This leaves the mmioset/mmiocpy function for now, as it's not obvious how to best handle them. Signed-off-by: Arnd Bergmann --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" 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/include/asm/asm-prototypes.h b/arch/arm/include/asm/asm-prototypes.h new file mode 100644 index 000000000000..04e5616a7b15 --- /dev/null +++ b/arch/arm/include/asm/asm-prototypes.h @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +extern void __aeabi_idivmod(void); +extern void __aeabi_idiv(void); +extern void __aeabi_lasr(void); +extern void __aeabi_llsl(void); +extern void __aeabi_llsr(void); +extern void __aeabi_lmul(void); +extern void __aeabi_uidivmod(void); +extern void __aeabi_uidiv(void); +extern void __aeabi_ulcmp(void); + +extern void __ashldi3(void); +extern void __ashrdi3(void); +extern void __bswapdi2(void); +extern void __bswapsi2(void); +extern void __divsi3(void); +extern void __do_div64(void); +extern void __lshrdi3(void); +extern void __modsi3(void); +extern void __muldi3(void); +extern void __ucmpdi2(void); +extern void __udivsi3(void); +extern void __umodsi3(void); diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index df06638b327c..afaef2a7faec 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h @@ -26,7 +26,6 @@ UNWIND( .fnstart ) bx lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm .macro testop, name, instr, store @@ -57,7 +56,6 @@ UNWIND( .fnstart ) 2: bx lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm #else .macro bitop, name, instr @@ -77,7 +75,6 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm /** @@ -106,6 +103,5 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm #endif diff --git a/arch/arm/lib/changebit.S b/arch/arm/lib/changebit.S index f4027862172f..005fdd18c509 100644 --- a/arch/arm/lib/changebit.S +++ b/arch/arm/lib/changebit.S @@ -13,3 +13,4 @@ .text bitop _change_bit, eor +EXPORT_SYMBOL(_change_bit) diff --git a/arch/arm/lib/clearbit.S b/arch/arm/lib/clearbit.S index f6b75fb64d30..501eff09968d 100644 --- a/arch/arm/lib/clearbit.S +++ b/arch/arm/lib/clearbit.S @@ -13,3 +13,4 @@ .text bitop _clear_bit, bic +EXPORT_SYMBOL(_clear_bit) diff --git a/arch/arm/lib/csumpartialcopy.S b/arch/arm/lib/csumpartialcopy.S index 9c3383fed129..bdcc2eea4e5c 100644 --- a/arch/arm/lib/csumpartialcopy.S +++ b/arch/arm/lib/csumpartialcopy.S @@ -49,6 +49,7 @@ #define FN_ENTRY ENTRY(csum_partial_copy_nocheck) #define FN_EXIT ENDPROC(csum_partial_copy_nocheck) -#define FN_EXPORT EXPORT_SYMBOL(csum_partial_copy_nocheck) #include "csumpartialcopygeneric.S" + +EXPORT_SYMBOL(csum_partial_copy_nocheck) diff --git a/arch/arm/lib/csumpartialcopygeneric.S b/arch/arm/lib/csumpartialcopygeneric.S index 8b94d20e51d1..06825566c0f7 100644 --- a/arch/arm/lib/csumpartialcopygeneric.S +++ b/arch/arm/lib/csumpartialcopygeneric.S @@ -332,4 +332,3 @@ FN_ENTRY mov r5, r4, get_byte_1 b .Lexit FN_EXIT -FN_EXPORT diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S index 5d495edf3d83..d5522c94f58c 100644 --- a/arch/arm/lib/csumpartialcopyuser.S +++ b/arch/arm/lib/csumpartialcopyuser.S @@ -73,9 +73,9 @@ #define FN_ENTRY ENTRY(csum_partial_copy_from_user) #define FN_EXIT ENDPROC(csum_partial_copy_from_user) -#define FN_EXPORT EXPORT_SYMBOL(csum_partial_copy_from_user) #include "csumpartialcopygeneric.S" +EXPORT_SYMBOL(csum_partial_copy_from_user) /* * FIXME: minor buglet here diff --git a/arch/arm/lib/setbit.S b/arch/arm/lib/setbit.S index 618fedae4b37..d748b8d1326f 100644 --- a/arch/arm/lib/setbit.S +++ b/arch/arm/lib/setbit.S @@ -13,3 +13,4 @@ .text bitop _set_bit, orr +EXPORT_SYMBOL(_set_bit) diff --git a/arch/arm/lib/testchangebit.S b/arch/arm/lib/testchangebit.S index 4becdc3a59cb..4d2dafa9b787 100644 --- a/arch/arm/lib/testchangebit.S +++ b/arch/arm/lib/testchangebit.S @@ -13,3 +13,4 @@ .text testop _test_and_change_bit, eor, str +EXPORT_SYMBOL(_test_and_change_bit) diff --git a/arch/arm/lib/testclearbit.S b/arch/arm/lib/testclearbit.S index 918841dcce7a..fe5cae2e480a 100644 --- a/arch/arm/lib/testclearbit.S +++ b/arch/arm/lib/testclearbit.S @@ -13,3 +13,4 @@ .text testop _test_and_clear_bit, bicne, strne +EXPORT_SYMBOL(_test_and_clear_bit) diff --git a/arch/arm/lib/testsetbit.S b/arch/arm/lib/testsetbit.S index 8d1b2fe9e487..25fed837edb3 100644 --- a/arch/arm/lib/testsetbit.S +++ b/arch/arm/lib/testsetbit.S @@ -13,3 +13,4 @@ .text testop _test_and_set_bit, orreq, streq +EXPORT_SYMBOL(_test_and_set_bit)