Skip to content

Commit 839c4de

Browse files
sravnborgandreas-gaisler
authored andcommitted
sparc32: Fix version generation failed warnings
An allmodconfig build of sparc32 resulted in several warnings: WARNING: modpost: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned. Is "empty_zero_page" prototyped in <asm/asm-prototypes.h>? WARNING: modpost: EXPORT symbol "__udelay" [vmlinux] version generation failed, symbol will not be versioned. Is "__udelay" prototyped in <asm/asm-prototypes.h>? WARNING: modpost: EXPORT symbol "__ndelay" [vmlinux] version generation failed, symbol will not be versioned. Is "__ndelay" prototyped in <asm/asm-prototypes.h>? WARNING: modpost: EXPORT symbol "__ashldi3" [vmlinux] version generation failed, symbol will not be versioned. Is "__ashldi3" prototyped in <asm/asm-prototypes.h>? WARNING: modpost: EXPORT symbol "__ashrdi3" [vmlinux] version generation failed, symbol will not be versioned. Is "__ashrdi3" prototyped in <asm/asm-prototypes.h>? WARNING: modpost: EXPORT symbol "__lshrdi3" [vmlinux] version generation failed, symbol will not be versioned. Is "__lshrdi3" prototyped in <asm/asm-prototypes.h>? And later a lot of warnings like this: WARNING: modpost: "__udelay" [kernel/locking/locktorture.ko] has no CRC! WARNING: modpost: "__udelay" [kernel/rcu/rcutorture.ko] has no CRC! WARNING: modpost: "__udelay" [kernel/rcu/rcuscale.ko] has no CRC! WARNING: modpost: "__udelay" [kernel/rcu/refscale.ko] has no CRC! WARNING: modpost: "__ndelay" [kernel/rcu/refscale.ko] has no CRC! WARNING: modpost: "__udelay" [kernel/time/test_udelay.ko] has no CRC! WARNING: modpost: "__udelay" [kernel/scftorture.ko] has no CRC! WARNING: modpost: "__ashrdi3" [fs/quota/quota_tree.ko] has no CRC! WARNING: modpost: "__ashldi3" [fs/ext4/ext4.ko] has no CRC! The fix was, as hinted, to add missing prototypes to asm-prototypes.h. For the __*di3 functions add the prototypes direct to the asm-prototypes.h file. Some of the symbols were already declared, so pulled in the relevant headers (delay.h, pgtable.h). The include files was alphabetically sorted to make the list somehow readable. The .S files exporting the symbols do not include asm-prototypes.h, so they need to be explicit rebuild to generate symbol versioning. One or more of the generic headers pulled in by asm-prototypes.h did not support being used from .S files, so adding asm-prototypes.h as an include file was not an option. Signed-off-by: Sam Ravnborg <[email protected]> Cc: Andreas Larsson <[email protected]> Cc: David S. Miller <[email protected]> Reviewed-by: Andreas Larsson <[email protected]> Tested-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andreas Larsson <[email protected]>
1 parent 9893770 commit 839c4de

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

arch/sparc/include/asm/asm-prototypes.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
44
*/
55

6-
#include <asm/xor.h>
7-
#include <asm/checksum.h>
8-
#include <asm/trap_block.h>
6+
#include <linux/atomic.h>
97
#include <linux/uaccess.h>
8+
109
#include <asm/atomic.h>
11-
#include <asm/ftrace.h>
1210
#include <asm/cacheflush.h>
11+
#include <asm/checksum.h>
12+
#include <asm/delay.h>
13+
#include <asm/ftrace.h>
1314
#include <asm/oplib.h>
14-
#include <linux/atomic.h>
15+
#include <asm/pgtable.h>
16+
#include <asm/trap_block.h>
17+
#include <asm/xor.h>
1518

1619
void *__memscan_zero(void *, size_t);
1720
void *__memscan_generic(void *, int, size_t);
@@ -23,3 +26,7 @@ void *memcpy(void *dest, const void *src, size_t n);
2326
void *memset(void *s, int c, size_t n);
2427
typedef int TItype __attribute__((mode(TI)));
2528
TItype __multi3(TItype a, TItype b);
29+
30+
s64 __ashldi3(s64, int);
31+
s64 __lshrdi3(s64, int);
32+
s64 __ashrdi3(s64, int);

0 commit comments

Comments
 (0)