Skip to content

Commit d8f431a

Browse files
committed
Merge branch 'sparc-Suppressing-version-generation-failed-warnings-in-sparc'
Nagarathnam Muthusamy says: ==================== sparc: Suppressing version generation failed warnings in sparc Compiling the sparc build of upstream kernel generates lots of warnings regarding version generation failure for functions defined in assembly files. This can be easily suppressed by adding those function prototypes to asm/asm-prototypes.h as in powerpc architecture. The following series of patches aims to clean the following warnings. WARNING: EXPORT symbol "atomic_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_4" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_sub_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara2_getperf" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__bzero" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "raw_copy_to_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__flushw_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara2_setperf" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight64" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ffs" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "prom_root_node" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "csum_partial_copy_nocheck" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memcpy" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_4" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight32" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "ffs" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "real_hard_smp_processor_id" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "clear_user_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memmove" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "raw_copy_from_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_add_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__memscan_generic" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__memscan_zero" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "strncmp" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_5" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "ip_fast_csum" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "test_and_change_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight8" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "strlen" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_2" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_sub" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "clear_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_mach_set_watchdog" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "set_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__csum_partial_copy_from_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__csum_partial_copy_to_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_fetch_add" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "change_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__clear_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_sub_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__arch_hweight16" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "tlb_type" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "VISenter" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "test_and_set_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_niagara_5" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "_clear_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "xor_vis_2" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_xor" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "test_and_clear_bit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "csum_partial" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_fetch_and" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "copy_user_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_chip_type" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "raw_copy_in_user" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "memcmp" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_add_return" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic_or" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "atomic64_dec_if_positive" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara_setperf" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "sun4v_niagara_getperf" [vmlinux] version generation failed, symbol will not be versioned. With the fix, all these warnings will be removed during compilation. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 5faab9e + f5a651f commit d8f431a

File tree

6 files changed

+55
-18
lines changed

6 files changed

+55
-18
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
3+
*/
4+
5+
#include <asm/xor.h>
6+
#include <asm/checksum.h>
7+
#include <asm/trap_block.h>
8+
#include <asm/uaccess.h>
9+
#include <asm/atomic.h>
10+
#include <asm/ftrace.h>
11+
#include <asm/cacheflush.h>
12+
#include <asm/oplib.h>
13+
#include <linux/atomic.h>
14+
15+
void *__memscan_zero(void *, size_t);
16+
void *__memscan_generic(void *, int, size_t);
17+
void *__bzero(void *, size_t);
18+
void VISenter(void); /* Dummy prototype to supress warning */
19+
#undef memcpy
20+
#undef memset
21+
void *memcpy(void *dest, const void *src, size_t n);
22+
void *memset(void *s, int c, size_t n);
23+
typedef int TItype __attribute__((mode(TI)));
24+
TItype __multi3(TItype a, TItype b);

arch/sparc/lib/atomic_64.S

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,23 @@ ENTRY(atomic_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
6262
ENDPROC(atomic_fetch_##op); \
6363
EXPORT_SYMBOL(atomic_fetch_##op);
6464

65-
#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op)
65+
ATOMIC_OP(add)
66+
ATOMIC_OP_RETURN(add)
67+
ATOMIC_FETCH_OP(add)
6668

67-
ATOMIC_OPS(add)
68-
ATOMIC_OPS(sub)
69+
ATOMIC_OP(sub)
70+
ATOMIC_OP_RETURN(sub)
71+
ATOMIC_FETCH_OP(sub)
6972

70-
#undef ATOMIC_OPS
71-
#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
73+
ATOMIC_OP(and)
74+
ATOMIC_FETCH_OP(and)
7275

73-
ATOMIC_OPS(and)
74-
ATOMIC_OPS(or)
75-
ATOMIC_OPS(xor)
76+
ATOMIC_OP(or)
77+
ATOMIC_FETCH_OP(or)
78+
79+
ATOMIC_OP(xor)
80+
ATOMIC_FETCH_OP(xor)
7681

77-
#undef ATOMIC_OPS
7882
#undef ATOMIC_FETCH_OP
7983
#undef ATOMIC_OP_RETURN
8084
#undef ATOMIC_OP
@@ -124,19 +128,23 @@ ENTRY(atomic64_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
124128
ENDPROC(atomic64_fetch_##op); \
125129
EXPORT_SYMBOL(atomic64_fetch_##op);
126130

127-
#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op) ATOMIC64_FETCH_OP(op)
131+
ATOMIC64_OP(add)
132+
ATOMIC64_OP_RETURN(add)
133+
ATOMIC64_FETCH_OP(add)
134+
135+
ATOMIC64_OP(sub)
136+
ATOMIC64_OP_RETURN(sub)
137+
ATOMIC64_FETCH_OP(sub)
128138

129-
ATOMIC64_OPS(add)
130-
ATOMIC64_OPS(sub)
139+
ATOMIC64_OP(and)
140+
ATOMIC64_FETCH_OP(and)
131141

132-
#undef ATOMIC64_OPS
133-
#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_FETCH_OP(op)
142+
ATOMIC64_OP(or)
143+
ATOMIC64_FETCH_OP(or)
134144

135-
ATOMIC64_OPS(and)
136-
ATOMIC64_OPS(or)
137-
ATOMIC64_OPS(xor)
145+
ATOMIC64_OP(xor)
146+
ATOMIC64_FETCH_OP(xor)
138147

139-
#undef ATOMIC64_OPS
140148
#undef ATOMIC64_FETCH_OP
141149
#undef ATOMIC64_OP_RETURN
142150
#undef ATOMIC64_OP

arch/sparc/lib/checksum_64.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ csum_partial_fix_alignment:
3838

3939
.align 32
4040
.globl csum_partial
41+
.type csum_partial,#function
4142
EXPORT_SYMBOL(csum_partial)
4243
csum_partial: /* %o0=buff, %o1=len, %o2=sum */
4344
prefetch [%o0 + 0x000], #n_reads

arch/sparc/lib/csum_copy.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
add %o5, %o4, %o4
6666

6767
.globl FUNC_NAME
68+
.type FUNC_NAME,#function
6869
EXPORT_SYMBOL(FUNC_NAME)
6970
FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */
7071
LOAD(prefetch, %o0 + 0x000, #n_reads)

arch/sparc/lib/memscan_64.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
.text
1515
.align 32
1616
.globl __memscan_zero, __memscan_generic
17+
.type __memscan_zero,#function
18+
.type __memscan_generic,#function
1719
.globl memscan
1820
EXPORT_SYMBOL(__memscan_zero)
1921
EXPORT_SYMBOL(__memscan_generic)

arch/sparc/lib/memset.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
__bzero_begin:
6464

6565
.globl __bzero
66+
.type __bzero,#function
6667
.globl memset
6768
EXPORT_SYMBOL(__bzero)
6869
EXPORT_SYMBOL(memset)

0 commit comments

Comments
 (0)