Skip to content
Snippets Groups Projects
Commit 5f56a5df authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds
Browse files

exit_thread: remove empty bodies


Define HAVE_EXIT_THREAD for archs which want to do something in
exit_thread. For others, let's define exit_thread as an empty inline.

This is a cleanup before we change the prototype of exit_thread to
accept a task parameter.

[akpm@linux-foundation.org: fix mips]
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2ec656eb
No related merge requests found
Showing
with 10 additions and 95 deletions
...@@ -517,6 +517,11 @@ config HAVE_ARCH_MMAP_RND_BITS ...@@ -517,6 +517,11 @@ config HAVE_ARCH_MMAP_RND_BITS
- ARCH_MMAP_RND_BITS_MIN - ARCH_MMAP_RND_BITS_MIN
- ARCH_MMAP_RND_BITS_MAX - ARCH_MMAP_RND_BITS_MAX
config HAVE_EXIT_THREAD
bool
help
An architecture implements exit_thread.
config ARCH_MMAP_RND_BITS_MIN config ARCH_MMAP_RND_BITS_MIN
int int
......
...@@ -210,14 +210,6 @@ start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) ...@@ -210,14 +210,6 @@ start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
} }
EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(start_thread);
/*
* Free current thread data structures etc..
*/
void
exit_thread(void)
{
}
void void
flush_thread(void) flush_thread(void)
{ {
......
...@@ -183,13 +183,6 @@ void flush_thread(void) ...@@ -183,13 +183,6 @@ void flush_thread(void)
{ {
} }
/*
* Free any architecture-specific thread data structures, etc.
*/
void exit_thread(void)
{
}
int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
{ {
return 0; return 0;
......
...@@ -50,6 +50,7 @@ config ARM ...@@ -50,6 +50,7 @@ config ARM
select HAVE_DMA_CONTIGUOUS if MMU select HAVE_DMA_CONTIGUOUS if MMU
select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) && !CPU_ENDIAN_BE32 && MMU select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) && !CPU_ENDIAN_BE32 && MMU
select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
select HAVE_EXIT_THREAD
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
......
...@@ -200,13 +200,6 @@ void show_regs(struct pt_regs * regs) ...@@ -200,13 +200,6 @@ void show_regs(struct pt_regs * regs)
__show_regs(regs); __show_regs(regs);
} }
/*
* Free current thread data structures etc..
*/
void exit_thread(void)
{
}
static void tls_thread_flush(void) static void tls_thread_flush(void)
{ {
asm ("msr tpidr_el0, xzr"); asm ("msr tpidr_el0, xzr");
......
...@@ -4,6 +4,7 @@ config AVR32 ...@@ -4,6 +4,7 @@ config AVR32
# that we usually don't need on AVR32. # that we usually don't need on AVR32.
select EXPERT select EXPERT
select HAVE_CLK select HAVE_CLK
select HAVE_EXIT_THREAD
select HAVE_OPROFILE select HAVE_OPROFILE
select HAVE_KPROBES select HAVE_KPROBES
select VIRT_TO_BUS select VIRT_TO_BUS
......
...@@ -75,13 +75,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -75,13 +75,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
/*
* Free current thread data structures etc..
*/
static inline void exit_thread(void)
{
}
/* /*
* Return saved PC of a blocked thread. * Return saved PC of a blocked thread.
*/ */
......
...@@ -82,10 +82,6 @@ void flush_thread(void) ...@@ -82,10 +82,6 @@ void flush_thread(void)
{ {
} }
void exit_thread(void)
{
}
/* /*
* Do necessary setup to start up a newly executed thread. * Do necessary setup to start up a newly executed thread.
*/ */
......
...@@ -59,6 +59,7 @@ config CRIS ...@@ -59,6 +59,7 @@ config CRIS
select GENERIC_IOMAP select GENERIC_IOMAP
select MODULES_USE_ELF_RELA select MODULES_USE_ELF_RELA
select CLONE_BACKWARDS2 select CLONE_BACKWARDS2
select HAVE_EXIT_THREAD if ETRAX_ARCH_V32
select OLD_SIGSUSPEND select OLD_SIGSUSPEND
select OLD_SIGACTION select OLD_SIGACTION
select GPIOLIB select GPIOLIB
......
...@@ -35,15 +35,6 @@ void default_idle(void) ...@@ -35,15 +35,6 @@ void default_idle(void)
local_irq_enable(); local_irq_enable();
} }
/*
* Free current thread data structures etc..
*/
void exit_thread(void)
{
/* Nothing needs to be done. */
}
/* if the watchdog is enabled, we can simply disable interrupts and go /* if the watchdog is enabled, we can simply disable interrupts and go
* into an eternal loop, and the watchdog will reset the CPU after 0.1s * into an eternal loop, and the watchdog will reset the CPU after 0.1s
* if on the other hand the watchdog wasn't enabled, we just enable it and wait * if on the other hand the watchdog wasn't enabled, we just enable it and wait
......
...@@ -96,13 +96,6 @@ extern asmlinkage void *restore_user_regs(const struct user_context *target, ... ...@@ -96,13 +96,6 @@ extern asmlinkage void *restore_user_regs(const struct user_context *target, ...
#define release_segments(mm) do { } while (0) #define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0) #define forget_segments() do { } while (0)
/*
* Free current thread data structures etc..
*/
static inline void exit_thread(void)
{
}
/* /*
* Return saved PC of a blocked thread. * Return saved PC of a blocked thread.
*/ */
......
...@@ -110,13 +110,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -110,13 +110,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
/*
* Free current thread data structures etc..
*/
static inline void exit_thread(void)
{
}
/* /*
* Return saved PC of a blocked thread. * Return saved PC of a blocked thread.
*/ */
......
...@@ -136,13 +136,6 @@ void release_thread(struct task_struct *dead_task) ...@@ -136,13 +136,6 @@ void release_thread(struct task_struct *dead_task)
{ {
} }
/*
* Free any architecture-specific thread data structures, etc.
*/
void exit_thread(void)
{
}
/* /*
* Some archs flush debug and FPU info here * Some archs flush debug and FPU info here
*/ */
......
...@@ -18,6 +18,7 @@ config IA64 ...@@ -18,6 +18,7 @@ config IA64
select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_UNSTABLE_SCHED_CLOCK
select HAVE_EXIT_THREAD
select HAVE_IDE select HAVE_IDE
select HAVE_OPROFILE select HAVE_OPROFILE
select HAVE_KPROBES select HAVE_KPROBES
......
...@@ -101,15 +101,6 @@ void show_regs(struct pt_regs * regs) ...@@ -101,15 +101,6 @@ void show_regs(struct pt_regs * regs)
#endif #endif
} }
/*
* Free current thread data structures etc..
*/
void exit_thread(void)
{
/* Nothing to do. */
DPRINTK("pid = %d\n", current->pid);
}
void flush_thread(void) void flush_thread(void)
{ {
DPRINTK("pid = %d\n", current->pid); DPRINTK("pid = %d\n", current->pid);
......
...@@ -153,13 +153,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -153,13 +153,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
/*
* Free current thread data structures etc..
*/
static inline void exit_thread(void)
{
}
extern unsigned long thread_saved_pc(struct task_struct *tsk); extern unsigned long thread_saved_pc(struct task_struct *tsk);
unsigned long get_wchan(struct task_struct *p); unsigned long get_wchan(struct task_struct *p);
......
...@@ -11,6 +11,7 @@ config METAG ...@@ -11,6 +11,7 @@ config METAG
select HAVE_DEBUG_KMEMLEAK select HAVE_DEBUG_KMEMLEAK
select HAVE_DEBUG_STACKOVERFLOW select HAVE_DEBUG_STACKOVERFLOW
select HAVE_DYNAMIC_FTRACE select HAVE_DYNAMIC_FTRACE
select HAVE_EXIT_THREAD
select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_TRACER
select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_BZIP2
......
...@@ -134,8 +134,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -134,8 +134,6 @@ static inline void release_thread(struct task_struct *dead_task)
#define copy_segments(tsk, mm) do { } while (0) #define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0) #define release_segments(mm) do { } while (0)
extern void exit_thread(void);
/* /*
* Return saved PC of a blocked thread. * Return saved PC of a blocked thread.
*/ */
......
...@@ -70,11 +70,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -70,11 +70,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
/* Free all resources held by a thread. */
static inline void exit_thread(void)
{
}
extern unsigned long thread_saved_pc(struct task_struct *t); extern unsigned long thread_saved_pc(struct task_struct *t);
extern unsigned long get_wchan(struct task_struct *p); extern unsigned long get_wchan(struct task_struct *p);
...@@ -127,11 +122,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -127,11 +122,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
/* Free current thread data structures etc. */
static inline void exit_thread(void)
{
}
/* Return saved (kernel) PC of a blocked thread. */ /* Return saved (kernel) PC of a blocked thread. */
# define thread_saved_pc(tsk) \ # define thread_saved_pc(tsk) \
((tsk)->thread.regs ? (tsk)->thread.regs->r15 : 0) ((tsk)->thread.regs ? (tsk)->thread.regs->r15 : 0)
......
...@@ -73,10 +73,6 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) ...@@ -73,10 +73,6 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
regs->regs[29] = sp; regs->regs[29] = sp;
} }
void exit_thread(void)
{
}
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
{ {
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment