aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-12 00:34:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-12 00:34:24 -0400
commit3b06b1a7448ee4e8e51dae3938774735404e51fb (patch)
tree5da6c7442bbdc0e3a63034fd752e3950b4349b0b
parent130568d5eac5537cbd64cfb12103550af90edb79 (diff)
parentdbd2667a4fb9ce4f547982b07cd69dda127c47ea (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller: - Fix symbol version generation for assembler on sparc, from Nagarathnam Muthusamy. - Fix compound page handling in gup_huge_pmd(), from Nitin Gupta. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix gup_huge_pmd Adding the type of exported symbols sed regex in Makefile.build requires line break between exported symbols Adding asm-prototypes.h for genksyms to generate crc
-rw-r--r--arch/sparc/include/asm/asm-prototypes.h24
-rw-r--r--arch/sparc/lib/atomic_64.S44
-rw-r--r--arch/sparc/lib/checksum_64.S1
-rw-r--r--arch/sparc/lib/csum_copy.S1
-rw-r--r--arch/sparc/lib/memscan_64.S2
-rw-r--r--arch/sparc/lib/memset.S1
-rw-r--r--arch/sparc/mm/gup.c4
7 files changed, 57 insertions, 20 deletions
diff --git a/arch/sparc/include/asm/asm-prototypes.h b/arch/sparc/include/asm/asm-prototypes.h
new file mode 100644
index 000000000000..d381e11c5dbb
--- /dev/null
+++ b/arch/sparc/include/asm/asm-prototypes.h
@@ -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
15void *__memscan_zero(void *, size_t);
16void *__memscan_generic(void *, int, size_t);
17void *__bzero(void *, size_t);
18void VISenter(void); /* Dummy prototype to supress warning */
19#undef memcpy
20#undef memset
21void *memcpy(void *dest, const void *src, size_t n);
22void *memset(void *s, int c, size_t n);
23typedef int TItype __attribute__((mode(TI)));
24TItype __multi3(TItype a, TItype b);
diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S
index 1c6a1bde5138..ce17c3094ba6 100644
--- a/arch/sparc/lib/atomic_64.S
+++ b/arch/sparc/lib/atomic_64.S
@@ -62,19 +62,23 @@ ENTRY(atomic_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
62ENDPROC(atomic_fetch_##op); \ 62ENDPROC(atomic_fetch_##op); \
63EXPORT_SYMBOL(atomic_fetch_##op); 63EXPORT_SYMBOL(atomic_fetch_##op);
64 64
65#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op) 65ATOMIC_OP(add)
66ATOMIC_OP_RETURN(add)
67ATOMIC_FETCH_OP(add)
66 68
67ATOMIC_OPS(add) 69ATOMIC_OP(sub)
68ATOMIC_OPS(sub) 70ATOMIC_OP_RETURN(sub)
71ATOMIC_FETCH_OP(sub)
69 72
70#undef ATOMIC_OPS 73ATOMIC_OP(and)
71#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op) 74ATOMIC_FETCH_OP(and)
72 75
73ATOMIC_OPS(and) 76ATOMIC_OP(or)
74ATOMIC_OPS(or) 77ATOMIC_FETCH_OP(or)
75ATOMIC_OPS(xor) 78
79ATOMIC_OP(xor)
80ATOMIC_FETCH_OP(xor)
76 81
77#undef ATOMIC_OPS
78#undef ATOMIC_FETCH_OP 82#undef ATOMIC_FETCH_OP
79#undef ATOMIC_OP_RETURN 83#undef ATOMIC_OP_RETURN
80#undef ATOMIC_OP 84#undef ATOMIC_OP
@@ -124,19 +128,23 @@ ENTRY(atomic64_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
124ENDPROC(atomic64_fetch_##op); \ 128ENDPROC(atomic64_fetch_##op); \
125EXPORT_SYMBOL(atomic64_fetch_##op); 129EXPORT_SYMBOL(atomic64_fetch_##op);
126 130
127#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op) ATOMIC64_FETCH_OP(op) 131ATOMIC64_OP(add)
132ATOMIC64_OP_RETURN(add)
133ATOMIC64_FETCH_OP(add)
134
135ATOMIC64_OP(sub)
136ATOMIC64_OP_RETURN(sub)
137ATOMIC64_FETCH_OP(sub)
128 138
129ATOMIC64_OPS(add) 139ATOMIC64_OP(and)
130ATOMIC64_OPS(sub) 140ATOMIC64_FETCH_OP(and)
131 141
132#undef ATOMIC64_OPS 142ATOMIC64_OP(or)
133#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_FETCH_OP(op) 143ATOMIC64_FETCH_OP(or)
134 144
135ATOMIC64_OPS(and) 145ATOMIC64_OP(xor)
136ATOMIC64_OPS(or) 146ATOMIC64_FETCH_OP(xor)
137ATOMIC64_OPS(xor)
138 147
139#undef ATOMIC64_OPS
140#undef ATOMIC64_FETCH_OP 148#undef ATOMIC64_FETCH_OP
141#undef ATOMIC64_OP_RETURN 149#undef ATOMIC64_OP_RETURN
142#undef ATOMIC64_OP 150#undef ATOMIC64_OP
diff --git a/arch/sparc/lib/checksum_64.S b/arch/sparc/lib/checksum_64.S
index f6732174fe6b..6cfa521f444d 100644
--- a/arch/sparc/lib/checksum_64.S
+++ b/arch/sparc/lib/checksum_64.S
@@ -38,6 +38,7 @@ csum_partial_fix_alignment:
38 38
39 .align 32 39 .align 32
40 .globl csum_partial 40 .globl csum_partial
41 .type csum_partial,#function
41 EXPORT_SYMBOL(csum_partial) 42 EXPORT_SYMBOL(csum_partial)
42csum_partial: /* %o0=buff, %o1=len, %o2=sum */ 43csum_partial: /* %o0=buff, %o1=len, %o2=sum */
43 prefetch [%o0 + 0x000], #n_reads 44 prefetch [%o0 + 0x000], #n_reads
diff --git a/arch/sparc/lib/csum_copy.S b/arch/sparc/lib/csum_copy.S
index 0ecbafc30fd0..b1051e77c49a 100644
--- a/arch/sparc/lib/csum_copy.S
+++ b/arch/sparc/lib/csum_copy.S
@@ -65,6 +65,7 @@
65 add %o5, %o4, %o4 65 add %o5, %o4, %o4
66 66
67 .globl FUNC_NAME 67 .globl FUNC_NAME
68 .type FUNC_NAME,#function
68 EXPORT_SYMBOL(FUNC_NAME) 69 EXPORT_SYMBOL(FUNC_NAME)
69FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ 70FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */
70 LOAD(prefetch, %o0 + 0x000, #n_reads) 71 LOAD(prefetch, %o0 + 0x000, #n_reads)
diff --git a/arch/sparc/lib/memscan_64.S b/arch/sparc/lib/memscan_64.S
index daa96f4b03e6..5efee1f4be36 100644
--- a/arch/sparc/lib/memscan_64.S
+++ b/arch/sparc/lib/memscan_64.S
@@ -14,6 +14,8 @@
14 .text 14 .text
15 .align 32 15 .align 32
16 .globl __memscan_zero, __memscan_generic 16 .globl __memscan_zero, __memscan_generic
17 .type __memscan_zero,#function
18 .type __memscan_generic,#function
17 .globl memscan 19 .globl memscan
18 EXPORT_SYMBOL(__memscan_zero) 20 EXPORT_SYMBOL(__memscan_zero)
19 EXPORT_SYMBOL(__memscan_generic) 21 EXPORT_SYMBOL(__memscan_generic)
diff --git a/arch/sparc/lib/memset.S b/arch/sparc/lib/memset.S
index bb539b42b088..e23338dbfc43 100644
--- a/arch/sparc/lib/memset.S
+++ b/arch/sparc/lib/memset.S
@@ -63,6 +63,7 @@
63__bzero_begin: 63__bzero_begin:
64 64
65 .globl __bzero 65 .globl __bzero
66 .type __bzero,#function
66 .globl memset 67 .globl memset
67 EXPORT_SYMBOL(__bzero) 68 EXPORT_SYMBOL(__bzero)
68 EXPORT_SYMBOL(memset) 69 EXPORT_SYMBOL(memset)
diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c
index cd0e32bbcb1d..f80cfc64c55b 100644
--- a/arch/sparc/mm/gup.c
+++ b/arch/sparc/mm/gup.c
@@ -78,8 +78,8 @@ static int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
78 return 0; 78 return 0;
79 79
80 refs = 0; 80 refs = 0;
81 head = pmd_page(pmd); 81 page = pmd_page(pmd) + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
82 page = head + ((addr & ~PMD_MASK) >> PAGE_SHIFT); 82 head = compound_head(page);
83 do { 83 do {
84 VM_BUG_ON(compound_head(page) != head); 84 VM_BUG_ON(compound_head(page) != head);
85 pages[*nr] = page; 85 pages[*nr] = page;