Davidlohr Bueso
3a6bfbc91d
arch, locking: Ciao arch_mutex_cpu_relax()
...
The arch_mutex_cpu_relax() function, introduced by 34b133f , is
hacky and ugly. It was added a few years ago to address the fact
that common cpu_relax() calls include yielding on s390, and thus
impact the optimistic spinning functionality of mutexes. Nowadays
we use this function well beyond mutexes: rwsem, qrwlock, mcs and
lockref. Since the macro that defines the call is in the mutex header,
any users must include mutex.h and the naming is misleading as well.
This patch (i) renames the call to cpu_relax_lowlatency ("relax, but
only if you can do it with very low latency") and (ii) defines it in
each arch's asm/processor.h local header, just like for regular cpu_relax
functions. On all archs, except s390, cpu_relax_lowlatency is simply cpu_relax,
and thus we can take it out of mutex.h. While this can seem redundant,
I believe it is a good choice as it allows us to move out arch specific
logic from generic locking primitives and enables future(?) archs to
transparently define it, similarly to System Z.
Signed-off-by: Davidlohr Bueso <[email protected] >
Signed-off-by: Peter Zijlstra <[email protected] >
Cc: Andrew Morton <[email protected] >
Cc: Anton Blanchard <[email protected] >
Cc: Aurelien Jacquiot <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Bharat Bhushan <[email protected] >
Cc: Catalin Marinas <[email protected] >
Cc: Chen Liqin <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Christian Borntraeger <[email protected] >
Cc: Chris Zankel <[email protected] >
Cc: David Howells <[email protected] >
Cc: David S. Miller <[email protected] >
Cc: Deepthi Dharwar <[email protected] >
Cc: Dominik Dingel <[email protected] >
Cc: Fenghua Yu <[email protected] >
Cc: Geert Uytterhoeven <[email protected] >
Cc: Guan Xuetao <[email protected] >
Cc: Haavard Skinnemoen <[email protected] >
Cc: Hans-Christian Egtvedt <[email protected] >
Cc: Heiko Carstens <[email protected] >
Cc: Helge Deller <[email protected] >
Cc: Hirokazu Takata <[email protected] >
Cc: Ivan Kokshaysky <[email protected] >
Cc: James E.J. Bottomley <[email protected] >
Cc: James Hogan <[email protected] >
Cc: Jason Wang <[email protected] >
Cc: Jesper Nilsson <[email protected] >
Cc: Joe Perches <[email protected] >
Cc: Jonas Bonn <[email protected] >
Cc: Joseph Myers <[email protected] >
Cc: Kees Cook <[email protected] >
Cc: Koichi Yasutake <[email protected] >
Cc: Lennox Wu <[email protected] >
Cc: Linus Torvalds <[email protected] >
Cc: Mark Salter <[email protected] >
Cc: Martin Schwidefsky <[email protected] >
Cc: Matt Turner <[email protected] >
Cc: Max Filippov <[email protected] >
Cc: Michael Neuling <[email protected] >
Cc: Michal Simek <[email protected] >
Cc: Mikael Starvik <[email protected] >
Cc: Nicolas Pitre <[email protected] >
Cc: Paolo Bonzini <[email protected] >
Cc: Paul Burton <[email protected] >
Cc: Paul E. McKenney <[email protected] >
Cc: Paul Gortmaker <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Qais Yousef <[email protected] >
Cc: Qiaowei Ren <[email protected] >
Cc: Rafael Wysocki <[email protected] >
Cc: Ralf Baechle <[email protected] >
Cc: Richard Henderson <[email protected] >
Cc: Richard Kuo <[email protected] >
Cc: Russell King <[email protected] >
Cc: Steven Miao <[email protected] >
Cc: Steven Rostedt <[email protected] >
Cc: Stratos Karafotis <[email protected] >
Cc: Tim Chen <[email protected] >
Cc: Tony Luck <[email protected] >
Cc: Vasily Kulikov <[email protected] >
Cc: Vineet Gupta <[email protected] >
Cc: Vineet Gupta <[email protected] >
Cc: Waiman Long <[email protected] >
Cc: Will Deacon <[email protected] >
Cc: Wolfram Sang <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected] >
2014-07-17 12:32:47 +02:00
Jesper Nilsson
c9ea40cb0c
CRIS: remove unused current_regs
...
CC: Mikael Starvik <[email protected] >
CC: [email protected]
Signed-off-by: Jonas Bonn <[email protected] >
Signed-off-by: Jesper Nilsson <[email protected] >
2013-09-10 17:29:20 +02:00
Thomas Gleixner
6546327ad1
arch: Cleanup enable/disable_hlt
...
enable/disable_hlt() does not need to be exported and can be killed on
architectures which do not use it at all.
Signed-off-by: Thomas Gleixner <[email protected] >
Cc: Linus Torvalds <[email protected] >
Cc: Rusty Russell <[email protected] >
Cc: Paul McKenney <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Reviewed-by: Cc: Srivatsa S. Bhat <[email protected] >
Cc: Magnus Damm <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected] >
2013-04-08 17:39:22 +02:00
Al Viro
69b58a6721
cris: switch to generic kernel_thread()
...
Signed-off-by: Al Viro <[email protected] >
2012-10-14 23:12:25 -04:00
Linus Torvalds
ec0d7f18ab
Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull fpu state cleanups from Ingo Molnar:
"This tree streamlines further aspects of FPU handling by eliminating
the prepare_to_copy() complication and moving that logic to
arch_dup_task_struct().
It also fixes the FPU dumps in threaded core dumps, removes and old
(and now invalid) assumption plus micro-optimizes the exit path by
avoiding an FPU save for dead tasks."
Fixed up trivial add-add conflict in arch/sh/kernel/process.c that came
in because we now do the FPU handling in arch_dup_task_struct() rather
than the legacy (and now gone) prepare_to_copy().
* 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, fpu: drop the fpu state during thread exit
x86, xsave: remove thread_has_fpu() bug check in __sanitize_i387_state()
coredump: ensure the fpu state is flushed for proper multi-threaded core dump
fork: move the real prepare_to_copy() users to arch_dup_task_struct()
2012-05-23 10:59:07 -07:00
Suresh Siddha
55ccf3fe3f
fork: move the real prepare_to_copy() users to arch_dup_task_struct()
...
Historical prepare_to_copy() is mostly a no-op, duplicated for majority of
the architectures and the rest following the x86 model of flushing the extended
register state like fpu there.
Remove it and use the arch_dup_task_struct() instead.
Suggested-by: Oleg Nesterov <[email protected] >
Suggested-by: Linus Torvalds <[email protected] >
Signed-off-by: Suresh Siddha <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Acked-by: Benjamin Herrenschmidt <[email protected] >
Cc: David Howells <[email protected] >
Cc: Koichi Yasutake <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Paul Mundt <[email protected] >
Cc: Chris Zankel <[email protected] >
Cc: Richard Henderson <[email protected] >
Cc: Russell King <[email protected] >
Cc: Haavard Skinnemoen <[email protected] >
Cc: Mike Frysinger <[email protected] >
Cc: Mark Salter <[email protected] >
Cc: Aurelien Jacquiot <[email protected] >
Cc: Mikael Starvik <[email protected] >
Cc: Yoshinori Sato <[email protected] >
Cc: Richard Kuo <[email protected] >
Cc: Tony Luck <[email protected] >
Cc: Michal Simek <[email protected] >
Cc: Ralf Baechle <[email protected] >
Cc: Jonas Bonn <[email protected] >
Cc: James E.J. Bottomley <[email protected] >
Cc: Helge Deller <[email protected] >
Cc: Martin Schwidefsky <[email protected] >
Cc: Heiko Carstens <[email protected] >
Cc: Chen Liqin <[email protected] >
Cc: Lennox Wu <[email protected] >
Cc: David S. Miller <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Jeff Dike <[email protected] >
Cc: Richard Weinberger <[email protected] >
Cc: Guan Xuetao <[email protected] >
Signed-off-by: H. Peter Anvin <[email protected] >
2012-05-16 15:16:26 -07:00
Thomas Gleixner
803fc74f06
cris: Use common threadinfo allocator
...
There is no functional difference. __get_free_pages() ends up calling
alloc_pages_node().
This also allocates only one page which matches THREAD_SIZE instead of
an extra page for nothing.
Signed-off-by: Thomas Gleixner <[email protected] >
Cc: Jesper Nilsson <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
2012-05-08 14:08:44 +02:00
David Howells
b1a154dbf9
Disintegrate asm/system.h for CRIS
...
Disintegrate asm/system.h for CRIS.
Signed-off-by: David Howells <[email protected] >
Acked-by: Jesper Nilsson <[email protected] >
cc: [email protected]
2012-03-28 18:30:02 +01:00
Jesper Nilsson
556dcee7b8
[CRIS] Move header files from include to arch/cris/include.
...
Change all users of header files to correct path.
Remove some unneeded headers for arch-v32.
Signed-off-by: Jesper Nilsson <[email protected] >
2008-10-29 17:29:44 +01:00