diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-11-16 07:23:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-11-17 02:17:36 -0500 |
commit | 6d0d287891a022ebba572327cbd70b5de69a63a2 (patch) | |
tree | 0a4f40c7823a749d469536c2ef4910f58f9181a3 | |
parent | 43496d35513b25ad468bef91e51a39d61a0d8464 (diff) |
locking/core: Provide common cpu_relax_yield() definition
No need to duplicate the same define everywhere. Since
the only user is stop-machine and the only provider is
s390, we can use a default implementation of cpu_relax_yield()
in sched.h.
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Noam Camus <noamc@ezchip.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: kvm@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-s390 <linux-s390@vger.kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: sparclinux@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/1479298985-191589-1-git-send-email-borntraeger@de.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
33 files changed, 5 insertions, 38 deletions
diff --git a/arch/alpha/include/asm/processor.h b/arch/alpha/include/asm/processor.h index 31e8dbeef10b..2fec2dee3020 100644 --- a/arch/alpha/include/asm/processor.h +++ b/arch/alpha/include/asm/processor.h | |||
@@ -58,7 +58,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
58 | ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp) | 58 | ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp) |
59 | 59 | ||
60 | #define cpu_relax() barrier() | 60 | #define cpu_relax() barrier() |
61 | #define cpu_relax_yield() cpu_relax() | ||
62 | 61 | ||
63 | #define ARCH_HAS_PREFETCH | 62 | #define ARCH_HAS_PREFETCH |
64 | #define ARCH_HAS_PREFETCHW | 63 | #define ARCH_HAS_PREFETCHW |
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index d102a49ad8c5..6e1242da0159 100644 --- a/arch/arc/include/asm/processor.h +++ b/arch/arc/include/asm/processor.h | |||
@@ -60,15 +60,12 @@ struct task_struct; | |||
60 | #ifndef CONFIG_EZNPS_MTM_EXT | 60 | #ifndef CONFIG_EZNPS_MTM_EXT |
61 | 61 | ||
62 | #define cpu_relax() barrier() | 62 | #define cpu_relax() barrier() |
63 | #define cpu_relax_yield() cpu_relax() | ||
64 | 63 | ||
65 | #else | 64 | #else |
66 | 65 | ||
67 | #define cpu_relax() \ | 66 | #define cpu_relax() \ |
68 | __asm__ __volatile__ (".word %0" : : "i"(CTOP_INST_SCHD_RW) : "memory") | 67 | __asm__ __volatile__ (".word %0" : : "i"(CTOP_INST_SCHD_RW) : "memory") |
69 | 68 | ||
70 | #define cpu_relax_yield() cpu_relax() | ||
71 | |||
72 | #endif | 69 | #endif |
73 | 70 | ||
74 | #define copy_segments(tsk, mm) do { } while (0) | 71 | #define copy_segments(tsk, mm) do { } while (0) |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 9e71c58bfa6f..c3d5fc124a05 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -82,8 +82,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
82 | #define cpu_relax() barrier() | 82 | #define cpu_relax() barrier() |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | #define cpu_relax_yield() cpu_relax() | ||
86 | |||
87 | #define task_pt_regs(p) \ | 85 | #define task_pt_regs(p) \ |
88 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) | 86 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) |
89 | 87 | ||
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 6132f64af68d..747c65a616ed 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
@@ -149,8 +149,6 @@ static inline void cpu_relax(void) | |||
149 | asm volatile("yield" ::: "memory"); | 149 | asm volatile("yield" ::: "memory"); |
150 | } | 150 | } |
151 | 151 | ||
152 | #define cpu_relax_yield() cpu_relax() | ||
153 | |||
154 | /* Thread switching */ | 152 | /* Thread switching */ |
155 | extern struct task_struct *cpu_switch_to(struct task_struct *prev, | 153 | extern struct task_struct *cpu_switch_to(struct task_struct *prev, |
156 | struct task_struct *next); | 154 | struct task_struct *next); |
diff --git a/arch/avr32/include/asm/processor.h b/arch/avr32/include/asm/processor.h index ee62365ad0da..972adcc1e8f4 100644 --- a/arch/avr32/include/asm/processor.h +++ b/arch/avr32/include/asm/processor.h | |||
@@ -92,7 +92,6 @@ extern struct avr32_cpuinfo boot_cpu_data; | |||
92 | #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) | 92 | #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) |
93 | 93 | ||
94 | #define cpu_relax() barrier() | 94 | #define cpu_relax() barrier() |
95 | #define cpu_relax_yield() cpu_relax() | ||
96 | #define cpu_sync_pipeline() asm volatile("sub pc, -2" : : : "memory") | 95 | #define cpu_sync_pipeline() asm volatile("sub pc, -2" : : : "memory") |
97 | 96 | ||
98 | struct cpu_context { | 97 | struct cpu_context { |
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h index 57acfb1acfe5..85d4af97c986 100644 --- a/arch/blackfin/include/asm/processor.h +++ b/arch/blackfin/include/asm/processor.h | |||
@@ -92,7 +92,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
92 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | 92 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) |
93 | 93 | ||
94 | #define cpu_relax() smp_mb() | 94 | #define cpu_relax() smp_mb() |
95 | #define cpu_relax_yield() cpu_relax() | ||
96 | 95 | ||
97 | /* Get the Silicon Revision of the chip */ | 96 | /* Get the Silicon Revision of the chip */ |
98 | static inline uint32_t __pure bfin_revid(void) | 97 | static inline uint32_t __pure bfin_revid(void) |
diff --git a/arch/c6x/include/asm/processor.h b/arch/c6x/include/asm/processor.h index 1fd22e727e44..b9eb3da7f278 100644 --- a/arch/c6x/include/asm/processor.h +++ b/arch/c6x/include/asm/processor.h | |||
@@ -121,7 +121,6 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
121 | #define KSTK_ESP(task) (task_pt_regs(task)->sp) | 121 | #define KSTK_ESP(task) (task_pt_regs(task)->sp) |
122 | 122 | ||
123 | #define cpu_relax() do { } while (0) | 123 | #define cpu_relax() do { } while (0) |
124 | #define cpu_relax_yield() cpu_relax() | ||
125 | 124 | ||
126 | extern const struct seq_operations cpuinfo_op; | 125 | extern const struct seq_operations cpuinfo_op; |
127 | 126 | ||
diff --git a/arch/cris/include/asm/processor.h b/arch/cris/include/asm/processor.h index 1a578417397f..15b815df29c1 100644 --- a/arch/cris/include/asm/processor.h +++ b/arch/cris/include/asm/processor.h | |||
@@ -63,7 +63,6 @@ static inline void release_thread(struct task_struct *dead_task) | |||
63 | #define init_stack (init_thread_union.stack) | 63 | #define init_stack (init_thread_union.stack) |
64 | 64 | ||
65 | #define cpu_relax() barrier() | 65 | #define cpu_relax() barrier() |
66 | #define cpu_relax_yield() cpu_relax() | ||
67 | 66 | ||
68 | void default_idle(void); | 67 | void default_idle(void); |
69 | 68 | ||
diff --git a/arch/frv/include/asm/processor.h b/arch/frv/include/asm/processor.h index c1e5f2a0ca31..ddaeb9cc9143 100644 --- a/arch/frv/include/asm/processor.h +++ b/arch/frv/include/asm/processor.h | |||
@@ -107,7 +107,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
107 | #define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp) | 107 | #define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp) |
108 | 108 | ||
109 | #define cpu_relax() barrier() | 109 | #define cpu_relax() barrier() |
110 | #define cpu_relax_yield() cpu_relax() | ||
111 | 110 | ||
112 | /* data cache prefetch */ | 111 | /* data cache prefetch */ |
113 | #define ARCH_HAS_PREFETCH | 112 | #define ARCH_HAS_PREFETCH |
diff --git a/arch/h8300/include/asm/processor.h b/arch/h8300/include/asm/processor.h index 42d605369217..65132d7ae9e5 100644 --- a/arch/h8300/include/asm/processor.h +++ b/arch/h8300/include/asm/processor.h | |||
@@ -127,7 +127,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
127 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | 127 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) |
128 | 128 | ||
129 | #define cpu_relax() barrier() | 129 | #define cpu_relax() barrier() |
130 | #define cpu_relax_yield() cpu_relax() | ||
131 | 130 | ||
132 | #define HARD_RESET_NOW() ({ \ | 131 | #define HARD_RESET_NOW() ({ \ |
133 | local_irq_disable(); \ | 132 | local_irq_disable(); \ |
diff --git a/arch/hexagon/include/asm/processor.h b/arch/hexagon/include/asm/processor.h index 5d694cccc85a..45a825402f63 100644 --- a/arch/hexagon/include/asm/processor.h +++ b/arch/hexagon/include/asm/processor.h | |||
@@ -56,7 +56,6 @@ struct thread_struct { | |||
56 | } | 56 | } |
57 | 57 | ||
58 | #define cpu_relax() __vmyield() | 58 | #define cpu_relax() __vmyield() |
59 | #define cpu_relax_yield() cpu_relax() | ||
60 | 59 | ||
61 | /* | 60 | /* |
62 | * Decides where the kernel will search for a free chunk of vm space during | 61 | * Decides where the kernel will search for a free chunk of vm space during |
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index 0c2c3b256f6c..03911a336406 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h | |||
@@ -547,7 +547,6 @@ ia64_eoi (void) | |||
547 | } | 547 | } |
548 | 548 | ||
549 | #define cpu_relax() ia64_hint(ia64_hint_pause) | 549 | #define cpu_relax() ia64_hint(ia64_hint_pause) |
550 | #define cpu_relax_yield() cpu_relax() | ||
551 | 550 | ||
552 | static inline int | 551 | static inline int |
553 | ia64_get_irr(unsigned int vector) | 552 | ia64_get_irr(unsigned int vector) |
diff --git a/arch/m32r/include/asm/processor.h b/arch/m32r/include/asm/processor.h index 9b83a13290fc..5767367550c6 100644 --- a/arch/m32r/include/asm/processor.h +++ b/arch/m32r/include/asm/processor.h | |||
@@ -133,6 +133,5 @@ unsigned long get_wchan(struct task_struct *p); | |||
133 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) | 133 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) |
134 | 134 | ||
135 | #define cpu_relax() barrier() | 135 | #define cpu_relax() barrier() |
136 | #define cpu_relax_yield() cpu_relax() | ||
137 | 136 | ||
138 | #endif /* _ASM_M32R_PROCESSOR_H */ | 137 | #endif /* _ASM_M32R_PROCESSOR_H */ |
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index b0d044224ce5..f5f790c31bf8 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h | |||
@@ -156,6 +156,5 @@ unsigned long get_wchan(struct task_struct *p); | |||
156 | #define task_pt_regs(tsk) ((struct pt_regs *) ((tsk)->thread.esp0)) | 156 | #define task_pt_regs(tsk) ((struct pt_regs *) ((tsk)->thread.esp0)) |
157 | 157 | ||
158 | #define cpu_relax() barrier() | 158 | #define cpu_relax() barrier() |
159 | #define cpu_relax_yield() cpu_relax() | ||
160 | 159 | ||
161 | #endif | 160 | #endif |
diff --git a/arch/metag/include/asm/processor.h b/arch/metag/include/asm/processor.h index ee302a637f24..ec6a49076980 100644 --- a/arch/metag/include/asm/processor.h +++ b/arch/metag/include/asm/processor.h | |||
@@ -152,7 +152,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
152 | #define user_stack_pointer(regs) ((regs)->ctx.AX[0].U0) | 152 | #define user_stack_pointer(regs) ((regs)->ctx.AX[0].U0) |
153 | 153 | ||
154 | #define cpu_relax() barrier() | 154 | #define cpu_relax() barrier() |
155 | #define cpu_relax_yield() cpu_relax() | ||
156 | 155 | ||
157 | extern void setup_priv(void); | 156 | extern void setup_priv(void); |
158 | 157 | ||
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 08ec1f725b7f..37ef196e4519 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h | |||
@@ -22,7 +22,6 @@ | |||
22 | extern const struct seq_operations cpuinfo_op; | 22 | extern const struct seq_operations cpuinfo_op; |
23 | 23 | ||
24 | # define cpu_relax() barrier() | 24 | # define cpu_relax() barrier() |
25 | # define cpu_relax_yield() cpu_relax() | ||
26 | 25 | ||
27 | #define task_pt_regs(tsk) \ | 26 | #define task_pt_regs(tsk) \ |
28 | (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) | 27 | (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index 8ea95e77ec9d..95b8c471f572 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -389,7 +389,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
389 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) | 389 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) |
390 | 390 | ||
391 | #define cpu_relax() barrier() | 391 | #define cpu_relax() barrier() |
392 | #define cpu_relax_yield() cpu_relax() | ||
393 | 392 | ||
394 | /* | 393 | /* |
395 | * Return_address is a replacement for __builtin_return_address(count) | 394 | * Return_address is a replacement for __builtin_return_address(count) |
diff --git a/arch/mn10300/include/asm/processor.h b/arch/mn10300/include/asm/processor.h index d11397bc9429..18e17abf7664 100644 --- a/arch/mn10300/include/asm/processor.h +++ b/arch/mn10300/include/asm/processor.h | |||
@@ -69,7 +69,6 @@ extern void print_cpu_info(struct mn10300_cpuinfo *); | |||
69 | extern void dodgy_tsc(void); | 69 | extern void dodgy_tsc(void); |
70 | 70 | ||
71 | #define cpu_relax() barrier() | 71 | #define cpu_relax() barrier() |
72 | #define cpu_relax_yield() cpu_relax() | ||
73 | 72 | ||
74 | /* | 73 | /* |
75 | * User space process size: 1.75GB (default). | 74 | * User space process size: 1.75GB (default). |
diff --git a/arch/nios2/include/asm/processor.h b/arch/nios2/include/asm/processor.h index d32c17669123..3bbbc3d798e5 100644 --- a/arch/nios2/include/asm/processor.h +++ b/arch/nios2/include/asm/processor.h | |||
@@ -88,7 +88,6 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
88 | #define KSTK_ESP(tsk) ((tsk)->thread.kregs->sp) | 88 | #define KSTK_ESP(tsk) ((tsk)->thread.kregs->sp) |
89 | 89 | ||
90 | #define cpu_relax() barrier() | 90 | #define cpu_relax() barrier() |
91 | #define cpu_relax_yield() cpu_relax() | ||
92 | 91 | ||
93 | #endif /* __ASSEMBLY__ */ | 92 | #endif /* __ASSEMBLY__ */ |
94 | 93 | ||
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index 7f47fc7b7eae..a908e6c30a00 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h | |||
@@ -92,7 +92,6 @@ extern unsigned long thread_saved_pc(struct task_struct *t); | |||
92 | #define init_stack (init_thread_union.stack) | 92 | #define init_stack (init_thread_union.stack) |
93 | 93 | ||
94 | #define cpu_relax() barrier() | 94 | #define cpu_relax() barrier() |
95 | #define cpu_relax_yield() cpu_relax() | ||
96 | 95 | ||
97 | #endif /* __ASSEMBLY__ */ | 96 | #endif /* __ASSEMBLY__ */ |
98 | #endif /* __ASM_OPENRISC_PROCESSOR_H */ | 97 | #endif /* __ASM_OPENRISC_PROCESSOR_H */ |
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index a4a07f4f7c20..ca40741378be 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
@@ -309,7 +309,6 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
309 | #define KSTK_ESP(tsk) ((tsk)->thread.regs.gr[30]) | 309 | #define KSTK_ESP(tsk) ((tsk)->thread.regs.gr[30]) |
310 | 310 | ||
311 | #define cpu_relax() barrier() | 311 | #define cpu_relax() barrier() |
312 | #define cpu_relax_yield() cpu_relax() | ||
313 | 312 | ||
314 | /* | 313 | /* |
315 | * parisc_requires_coherency() is used to identify the combined VIPT/PIPT | 314 | * parisc_requires_coherency() is used to identify the combined VIPT/PIPT |
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 5684e6872473..dac83fcb9445 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -404,8 +404,6 @@ static inline unsigned long __pack_fe01(unsigned int fpmode) | |||
404 | #define cpu_relax() barrier() | 404 | #define cpu_relax() barrier() |
405 | #endif | 405 | #endif |
406 | 406 | ||
407 | #define cpu_relax_yield() cpu_relax() | ||
408 | |||
409 | /* Check that a certain kernel stack pointer is valid in task_struct p */ | 407 | /* Check that a certain kernel stack pointer is valid in task_struct p */ |
410 | int validate_sp(unsigned long sp, struct task_struct *p, | 408 | int validate_sp(unsigned long sp, struct task_struct *p, |
411 | unsigned long nbytes); | 409 | unsigned long nbytes); |
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 9e32f25bdea3..9d3a21aedc97 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -234,6 +234,7 @@ static inline unsigned short stap(void) | |||
234 | /* | 234 | /* |
235 | * Give up the time slice of the virtual PU. | 235 | * Give up the time slice of the virtual PU. |
236 | */ | 236 | */ |
237 | #define cpu_relax_yield cpu_relax_yield | ||
237 | void cpu_relax_yield(void); | 238 | void cpu_relax_yield(void); |
238 | 239 | ||
239 | #define cpu_relax() barrier() | 240 | #define cpu_relax() barrier() |
diff --git a/arch/score/include/asm/processor.h b/arch/score/include/asm/processor.h index a1e97c063ed4..d9a922d8711b 100644 --- a/arch/score/include/asm/processor.h +++ b/arch/score/include/asm/processor.h | |||
@@ -24,7 +24,6 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
24 | #define current_text_addr() ({ __label__ _l; _l: &&_l; }) | 24 | #define current_text_addr() ({ __label__ _l; _l: &&_l; }) |
25 | 25 | ||
26 | #define cpu_relax() barrier() | 26 | #define cpu_relax() barrier() |
27 | #define cpu_relax_yield() cpu_relax() | ||
28 | #define release_thread(thread) do {} while (0) | 27 | #define release_thread(thread) do {} while (0) |
29 | 28 | ||
30 | /* | 29 | /* |
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h index 9454ff1ad0d9..5addd69f70ef 100644 --- a/arch/sh/include/asm/processor.h +++ b/arch/sh/include/asm/processor.h | |||
@@ -97,7 +97,6 @@ extern struct sh_cpuinfo cpu_data[]; | |||
97 | 97 | ||
98 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") | 98 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") |
99 | #define cpu_relax() barrier() | 99 | #define cpu_relax() barrier() |
100 | #define cpu_relax_yield() cpu_relax() | ||
101 | 100 | ||
102 | void default_idle(void); | 101 | void default_idle(void); |
103 | void stop_this_cpu(void *); | 102 | void stop_this_cpu(void *); |
diff --git a/arch/sparc/include/asm/processor_32.h b/arch/sparc/include/asm/processor_32.h index fc32b7311481..365d4cb267b4 100644 --- a/arch/sparc/include/asm/processor_32.h +++ b/arch/sparc/include/asm/processor_32.h | |||
@@ -119,7 +119,6 @@ extern struct task_struct *last_task_used_math; | |||
119 | int do_mathemu(struct pt_regs *regs, struct task_struct *fpt); | 119 | int do_mathemu(struct pt_regs *regs, struct task_struct *fpt); |
120 | 120 | ||
121 | #define cpu_relax() barrier() | 121 | #define cpu_relax() barrier() |
122 | #define cpu_relax_yield() cpu_relax() | ||
123 | 122 | ||
124 | extern void (*sparc_idle)(void); | 123 | extern void (*sparc_idle)(void); |
125 | 124 | ||
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h index 12787dfeb11c..6448cfc8292f 100644 --- a/arch/sparc/include/asm/processor_64.h +++ b/arch/sparc/include/asm/processor_64.h | |||
@@ -216,7 +216,6 @@ unsigned long get_wchan(struct task_struct *task); | |||
216 | "nop\n\t" \ | 216 | "nop\n\t" \ |
217 | ".previous" \ | 217 | ".previous" \ |
218 | ::: "memory") | 218 | ::: "memory") |
219 | #define cpu_relax_yield() cpu_relax() | ||
220 | 219 | ||
221 | /* Prefetch support. This is tuned for UltraSPARC-III and later. | 220 | /* Prefetch support. This is tuned for UltraSPARC-III and later. |
222 | * UltraSPARC-I will treat these as nops, and UltraSPARC-II has | 221 | * UltraSPARC-I will treat these as nops, and UltraSPARC-II has |
diff --git a/arch/tile/include/asm/processor.h b/arch/tile/include/asm/processor.h index c1c228b16f7f..0bc9968b97a1 100644 --- a/arch/tile/include/asm/processor.h +++ b/arch/tile/include/asm/processor.h | |||
@@ -264,8 +264,6 @@ static inline void cpu_relax(void) | |||
264 | barrier(); | 264 | barrier(); |
265 | } | 265 | } |
266 | 266 | ||
267 | #define cpu_relax_yield() cpu_relax() | ||
268 | |||
269 | /* Info on this processor (see fs/proc/cpuinfo.c) */ | 267 | /* Info on this processor (see fs/proc/cpuinfo.c) */ |
270 | struct seq_operations; | 268 | struct seq_operations; |
271 | extern const struct seq_operations cpuinfo_op; | 269 | extern const struct seq_operations cpuinfo_op; |
diff --git a/arch/unicore32/include/asm/processor.h b/arch/unicore32/include/asm/processor.h index eeefe7c529eb..4eaa42167667 100644 --- a/arch/unicore32/include/asm/processor.h +++ b/arch/unicore32/include/asm/processor.h | |||
@@ -71,7 +71,6 @@ extern void release_thread(struct task_struct *); | |||
71 | unsigned long get_wchan(struct task_struct *p); | 71 | unsigned long get_wchan(struct task_struct *p); |
72 | 72 | ||
73 | #define cpu_relax() barrier() | 73 | #define cpu_relax() barrier() |
74 | #define cpu_relax_yield() cpu_relax() | ||
75 | 74 | ||
76 | #define task_pt_regs(p) \ | 75 | #define task_pt_regs(p) \ |
77 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) | 76 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 7513c996f673..c84605bb2a15 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -588,8 +588,6 @@ static __always_inline void cpu_relax(void) | |||
588 | rep_nop(); | 588 | rep_nop(); |
589 | } | 589 | } |
590 | 590 | ||
591 | #define cpu_relax_yield() cpu_relax() | ||
592 | |||
593 | /* Stop speculative execution and prefetching of modified code. */ | 591 | /* Stop speculative execution and prefetching of modified code. */ |
594 | static inline void sync_core(void) | 592 | static inline void sync_core(void) |
595 | { | 593 | { |
diff --git a/arch/x86/um/asm/processor.h b/arch/x86/um/asm/processor.h index b4bd63b22b7f..c77db2288982 100644 --- a/arch/x86/um/asm/processor.h +++ b/arch/x86/um/asm/processor.h | |||
@@ -26,7 +26,6 @@ static inline void rep_nop(void) | |||
26 | } | 26 | } |
27 | 27 | ||
28 | #define cpu_relax() rep_nop() | 28 | #define cpu_relax() rep_nop() |
29 | #define cpu_relax_yield() cpu_relax() | ||
30 | 29 | ||
31 | #define task_pt_regs(t) (&(t)->thread.regs) | 30 | #define task_pt_regs(t) (&(t)->thread.regs) |
32 | 31 | ||
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h index 7d8d6bececfc..86ffcd68e496 100644 --- a/arch/xtensa/include/asm/processor.h +++ b/arch/xtensa/include/asm/processor.h | |||
@@ -206,7 +206,6 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
206 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->areg[1]) | 206 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->areg[1]) |
207 | 207 | ||
208 | #define cpu_relax() barrier() | 208 | #define cpu_relax() barrier() |
209 | #define cpu_relax_yield() cpu_relax() | ||
210 | 209 | ||
211 | /* Special register access. */ | 210 | /* Special register access. */ |
212 | 211 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 348f51b0ec92..c1aa3b02f6ac 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2444,6 +2444,10 @@ static inline void calc_load_enter_idle(void) { } | |||
2444 | static inline void calc_load_exit_idle(void) { } | 2444 | static inline void calc_load_exit_idle(void) { } |
2445 | #endif /* CONFIG_NO_HZ_COMMON */ | 2445 | #endif /* CONFIG_NO_HZ_COMMON */ |
2446 | 2446 | ||
2447 | #ifndef cpu_relax_yield | ||
2448 | #define cpu_relax_yield() cpu_relax() | ||
2449 | #endif | ||
2450 | |||
2447 | /* | 2451 | /* |
2448 | * Do not use outside of architecture code which knows its limitations. | 2452 | * Do not use outside of architecture code which knows its limitations. |
2449 | * | 2453 | * |