aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 13:27:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 13:27:28 -0400
commitcc76ee75a9d3201eeacc576d17fbc1511f673010 (patch)
tree9505405c270718c491840ae7d0da0521386ce939 /arch
parent9c65e12a55fea2da50f4069ec0dc47c50b7bd2bb (diff)
parent58995a9a5b292458f94a2356b8c878230fa56fe0 (diff)
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking changes from Ingo Molnar: "Main changes: - jump label asm preparatory work for PowerPC (Anton Blanchard) - rwsem optimizations and cleanups (Davidlohr Bueso) - mutex optimizations and cleanups (Jason Low) - futex fix (Oleg Nesterov) - remove broken atomicity checks from {READ,WRITE}_ONCE() (Peter Zijlstra)" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: powerpc, jump_label: Include linux/jump_label.h to get HAVE_JUMP_LABEL define jump_label: Allow jump labels to be used in assembly jump_label: Allow asm/jump_label.h to be included in assembly locking/mutex: Further simplify mutex_spin_on_owner() locking: Remove atomicy checks from {READ,WRITE}_ONCE locking/rtmutex: Rename argument in the rt_mutex_adjust_prio_chain() documentation as well locking/rwsem: Fix lock optimistic spinning when owner is not running locking: Remove ACCESS_ONCE() usage locking/rwsem: Check for active lock before bailing on spinning locking/rwsem: Avoid deceiving lock spinners locking/rwsem: Set lock ownership ASAP locking/rwsem: Document barrier need when waking tasks locking/futex: Check PF_KTHREAD rather than !p->mm to filter out kthreads locking/mutex: Refactor mutex_spin_on_owner() locking/mutex: In mutex_spin_on_owner(), return true when owner changes
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/jump_label.h5
-rw-r--r--arch/arm64/include/asm/jump_label.h8
-rw-r--r--arch/mips/include/asm/jump_label.h7
-rw-r--r--arch/powerpc/platforms/powernv/opal-wrappers.S2
-rw-r--r--arch/powerpc/platforms/pseries/hvCall.S2
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c2
-rw-r--r--arch/s390/include/asm/jump_label.h3
-rw-r--r--arch/sparc/include/asm/jump_label.h5
-rw-r--r--arch/x86/include/asm/jump_label.h5
9 files changed, 19 insertions, 20 deletions
diff --git a/arch/arm/include/asm/jump_label.h b/arch/arm/include/asm/jump_label.h
index 70f9b9bfb1f9..5f337dc5c108 100644
--- a/arch/arm/include/asm/jump_label.h
+++ b/arch/arm/include/asm/jump_label.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_ARM_JUMP_LABEL_H 1#ifndef _ASM_ARM_JUMP_LABEL_H
2#define _ASM_ARM_JUMP_LABEL_H 2#define _ASM_ARM_JUMP_LABEL_H
3 3
4#ifdef __KERNEL__ 4#ifndef __ASSEMBLY__
5 5
6#include <linux/types.h> 6#include <linux/types.h>
7 7
@@ -27,8 +27,6 @@ l_yes:
27 return true; 27 return true;
28} 28}
29 29
30#endif /* __KERNEL__ */
31
32typedef u32 jump_label_t; 30typedef u32 jump_label_t;
33 31
34struct jump_entry { 32struct jump_entry {
@@ -37,4 +35,5 @@ struct jump_entry {
37 jump_label_t key; 35 jump_label_t key;
38}; 36};
39 37
38#endif /* __ASSEMBLY__ */
40#endif 39#endif
diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
index 076a1c714049..c0e5165c2f76 100644
--- a/arch/arm64/include/asm/jump_label.h
+++ b/arch/arm64/include/asm/jump_label.h
@@ -18,11 +18,12 @@
18 */ 18 */
19#ifndef __ASM_JUMP_LABEL_H 19#ifndef __ASM_JUMP_LABEL_H
20#define __ASM_JUMP_LABEL_H 20#define __ASM_JUMP_LABEL_H
21
22#ifndef __ASSEMBLY__
23
21#include <linux/types.h> 24#include <linux/types.h>
22#include <asm/insn.h> 25#include <asm/insn.h>
23 26
24#ifdef __KERNEL__
25
26#define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE 27#define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE
27 28
28static __always_inline bool arch_static_branch(struct static_key *key) 29static __always_inline bool arch_static_branch(struct static_key *key)
@@ -39,8 +40,6 @@ l_yes:
39 return true; 40 return true;
40} 41}
41 42
42#endif /* __KERNEL__ */
43
44typedef u64 jump_label_t; 43typedef u64 jump_label_t;
45 44
46struct jump_entry { 45struct jump_entry {
@@ -49,4 +48,5 @@ struct jump_entry {
49 jump_label_t key; 48 jump_label_t key;
50}; 49};
51 50
51#endif /* __ASSEMBLY__ */
52#endif /* __ASM_JUMP_LABEL_H */ 52#endif /* __ASM_JUMP_LABEL_H */
diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h
index fdbff44e5482..608aa57799c8 100644
--- a/arch/mips/include/asm/jump_label.h
+++ b/arch/mips/include/asm/jump_label.h
@@ -8,9 +8,9 @@
8#ifndef _ASM_MIPS_JUMP_LABEL_H 8#ifndef _ASM_MIPS_JUMP_LABEL_H
9#define _ASM_MIPS_JUMP_LABEL_H 9#define _ASM_MIPS_JUMP_LABEL_H
10 10
11#include <linux/types.h> 11#ifndef __ASSEMBLY__
12 12
13#ifdef __KERNEL__ 13#include <linux/types.h>
14 14
15#define JUMP_LABEL_NOP_SIZE 4 15#define JUMP_LABEL_NOP_SIZE 4
16 16
@@ -39,8 +39,6 @@ l_yes:
39 return true; 39 return true;
40} 40}
41 41
42#endif /* __KERNEL__ */
43
44#ifdef CONFIG_64BIT 42#ifdef CONFIG_64BIT
45typedef u64 jump_label_t; 43typedef u64 jump_label_t;
46#else 44#else
@@ -53,4 +51,5 @@ struct jump_entry {
53 jump_label_t key; 51 jump_label_t key;
54}; 52};
55 53
54#endif /* __ASSEMBLY__ */
56#endif /* _ASM_MIPS_JUMP_LABEL_H */ 55#endif /* _ASM_MIPS_JUMP_LABEL_H */
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index 0509bca5e830..fcbe899fe299 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -9,11 +9,11 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/jump_label.h>
12#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
13#include <asm/hvcall.h> 14#include <asm/hvcall.h>
14#include <asm/asm-offsets.h> 15#include <asm/asm-offsets.h>
15#include <asm/opal.h> 16#include <asm/opal.h>
16#include <asm/jump_label.h>
17 17
18 .section ".text" 18 .section ".text"
19 19
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index ccd53f91e8aa..74b5b8e239c8 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -7,12 +7,12 @@
7 * as published by the Free Software Foundation; either version 7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version. 8 * 2 of the License, or (at your option) any later version.
9 */ 9 */
10#include <linux/jump_label.h>
10#include <asm/hvcall.h> 11#include <asm/hvcall.h>
11#include <asm/processor.h> 12#include <asm/processor.h>
12#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
13#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
14#include <asm/ptrace.h> 15#include <asm/ptrace.h>
15#include <asm/jump_label.h>
16 16
17 .section ".text" 17 .section ".text"
18 18
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index b5682fd6c984..b7a67e3d2201 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -26,7 +26,7 @@
26#include <linux/dma-mapping.h> 26#include <linux/dma-mapping.h>
27#include <linux/console.h> 27#include <linux/console.h>
28#include <linux/export.h> 28#include <linux/export.h>
29#include <linux/static_key.h> 29#include <linux/jump_label.h>
30#include <asm/processor.h> 30#include <asm/processor.h>
31#include <asm/mmu.h> 31#include <asm/mmu.h>
32#include <asm/page.h> 32#include <asm/page.h>
diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h
index 58642fd29c87..2b77e235b5fb 100644
--- a/arch/s390/include/asm/jump_label.h
+++ b/arch/s390/include/asm/jump_label.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_S390_JUMP_LABEL_H 1#ifndef _ASM_S390_JUMP_LABEL_H
2#define _ASM_S390_JUMP_LABEL_H 2#define _ASM_S390_JUMP_LABEL_H
3 3
4#ifndef __ASSEMBLY__
5
4#include <linux/types.h> 6#include <linux/types.h>
5 7
6#define JUMP_LABEL_NOP_SIZE 6 8#define JUMP_LABEL_NOP_SIZE 6
@@ -39,4 +41,5 @@ struct jump_entry {
39 jump_label_t key; 41 jump_label_t key;
40}; 42};
41 43
44#endif /* __ASSEMBLY__ */
42#endif 45#endif
diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h
index ec2e2e2aba7d..cc9b04a2b11b 100644
--- a/arch/sparc/include/asm/jump_label.h
+++ b/arch/sparc/include/asm/jump_label.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_SPARC_JUMP_LABEL_H 1#ifndef _ASM_SPARC_JUMP_LABEL_H
2#define _ASM_SPARC_JUMP_LABEL_H 2#define _ASM_SPARC_JUMP_LABEL_H
3 3
4#ifdef __KERNEL__ 4#ifndef __ASSEMBLY__
5 5
6#include <linux/types.h> 6#include <linux/types.h>
7 7
@@ -22,8 +22,6 @@ l_yes:
22 return true; 22 return true;
23} 23}
24 24
25#endif /* __KERNEL__ */
26
27typedef u32 jump_label_t; 25typedef u32 jump_label_t;
28 26
29struct jump_entry { 27struct jump_entry {
@@ -32,4 +30,5 @@ struct jump_entry {
32 jump_label_t key; 30 jump_label_t key;
33}; 31};
34 32
33#endif /* __ASSEMBLY__ */
35#endif 34#endif
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index 6a2cefb4395a..a4c1cf7e93f8 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_X86_JUMP_LABEL_H 1#ifndef _ASM_X86_JUMP_LABEL_H
2#define _ASM_X86_JUMP_LABEL_H 2#define _ASM_X86_JUMP_LABEL_H
3 3
4#ifdef __KERNEL__ 4#ifndef __ASSEMBLY__
5 5
6#include <linux/stringify.h> 6#include <linux/stringify.h>
7#include <linux/types.h> 7#include <linux/types.h>
@@ -30,8 +30,6 @@ l_yes:
30 return true; 30 return true;
31} 31}
32 32
33#endif /* __KERNEL__ */
34
35#ifdef CONFIG_X86_64 33#ifdef CONFIG_X86_64
36typedef u64 jump_label_t; 34typedef u64 jump_label_t;
37#else 35#else
@@ -44,4 +42,5 @@ struct jump_entry {
44 jump_label_t key; 42 jump_label_t key;
45}; 43};
46 44
45#endif /* __ASSEMBLY__ */
47#endif 46#endif