diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-12 00:34:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-12 00:34:24 -0400 |
commit | 3b06b1a7448ee4e8e51dae3938774735404e51fb (patch) | |
tree | 5da6c7442bbdc0e3a63034fd752e3950b4349b0b | |
parent | 130568d5eac5537cbd64cfb12103550af90edb79 (diff) | |
parent | dbd2667a4fb9ce4f547982b07cd69dda127c47ea (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.h | 24 | ||||
-rw-r--r-- | arch/sparc/lib/atomic_64.S | 44 | ||||
-rw-r--r-- | arch/sparc/lib/checksum_64.S | 1 | ||||
-rw-r--r-- | arch/sparc/lib/csum_copy.S | 1 | ||||
-rw-r--r-- | arch/sparc/lib/memscan_64.S | 2 | ||||
-rw-r--r-- | arch/sparc/lib/memset.S | 1 | ||||
-rw-r--r-- | arch/sparc/mm/gup.c | 4 |
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 | |||
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); | ||
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 */ \ | |||
62 | ENDPROC(atomic_fetch_##op); \ | 62 | ENDPROC(atomic_fetch_##op); \ |
63 | EXPORT_SYMBOL(atomic_fetch_##op); | 63 | EXPORT_SYMBOL(atomic_fetch_##op); |
64 | 64 | ||
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) | ||
66 | 68 | ||
67 | ATOMIC_OPS(add) | 69 | ATOMIC_OP(sub) |
68 | ATOMIC_OPS(sub) | 70 | ATOMIC_OP_RETURN(sub) |
71 | ATOMIC_FETCH_OP(sub) | ||
69 | 72 | ||
70 | #undef ATOMIC_OPS | 73 | ATOMIC_OP(and) |
71 | #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op) | 74 | ATOMIC_FETCH_OP(and) |
72 | 75 | ||
73 | ATOMIC_OPS(and) | 76 | ATOMIC_OP(or) |
74 | ATOMIC_OPS(or) | 77 | ATOMIC_FETCH_OP(or) |
75 | ATOMIC_OPS(xor) | 78 | |
79 | ATOMIC_OP(xor) | ||
80 | ATOMIC_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 */ \ | |||
124 | ENDPROC(atomic64_fetch_##op); \ | 128 | ENDPROC(atomic64_fetch_##op); \ |
125 | EXPORT_SYMBOL(atomic64_fetch_##op); | 129 | EXPORT_SYMBOL(atomic64_fetch_##op); |
126 | 130 | ||
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) | ||
128 | 138 | ||
129 | ATOMIC64_OPS(add) | 139 | ATOMIC64_OP(and) |
130 | ATOMIC64_OPS(sub) | 140 | ATOMIC64_FETCH_OP(and) |
131 | 141 | ||
132 | #undef ATOMIC64_OPS | 142 | ATOMIC64_OP(or) |
133 | #define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_FETCH_OP(op) | 143 | ATOMIC64_FETCH_OP(or) |
134 | 144 | ||
135 | ATOMIC64_OPS(and) | 145 | ATOMIC64_OP(xor) |
136 | ATOMIC64_OPS(or) | 146 | ATOMIC64_FETCH_OP(xor) |
137 | ATOMIC64_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) |
42 | csum_partial: /* %o0=buff, %o1=len, %o2=sum */ | 43 | csum_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) |
69 | FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ | 70 | FUNC_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; |