Commit c17c0204 authored by Tobias Klauser's avatar Tobias Klauser Committed by Linus Torvalds

arch: remove unused *_segments() macros/functions

Some architectures define the no-op macros/functions copy_segments,
release_segments and forget_segments. These are used nowhere in the
tree, so removed them.
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Acked-by: Vineet Gupta <vgupta@synopsys.com>   [for arch/arc]
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0a8abd97
...@@ -78,9 +78,6 @@ struct task_struct; ...@@ -78,9 +78,6 @@ struct task_struct;
#endif #endif
#define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->ret) #define KSTK_EIP(tsk) (task_pt_regs(tsk)->ret)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp) #define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp)
......
...@@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
#define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
/* /*
* saved kernel SP and DP of a blocked thread. * saved kernel SP and DP of a blocked thread.
*/ */
......
...@@ -92,10 +92,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -92,10 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
extern asmlinkage void save_user_regs(struct user_context *target); extern asmlinkage void save_user_regs(struct user_context *target);
extern asmlinkage void *restore_user_regs(const struct user_context *target, ...); extern asmlinkage void *restore_user_regs(const struct user_context *target, ...);
#define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
unsigned long get_wchan(struct task_struct *p); unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) ((tsk)->thread.frame0->pc) #define KSTK_EIP(tsk) ((tsk)->thread.frame0->pc)
......
...@@ -118,14 +118,6 @@ struct mm_struct; ...@@ -118,14 +118,6 @@ struct mm_struct;
/* Free all resources held by a thread. */ /* Free all resources held by a thread. */
extern void release_thread(struct task_struct *); extern void release_thread(struct task_struct *);
/* Copy and release all segment info associated with a VM */
extern void copy_segments(struct task_struct *p, struct mm_struct * mm);
extern void release_segments(struct mm_struct * mm);
/* Copy and release all segment info associated with a VM */
#define copy_segments(p, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
unsigned long get_wchan(struct task_struct *p); unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) ((tsk)->thread.lr) #define KSTK_EIP(tsk) ((tsk)->thread.lr)
#define KSTK_ESP(tsk) ((tsk)->thread.sp) #define KSTK_ESP(tsk) ((tsk)->thread.sp)
......
...@@ -131,9 +131,6 @@ static inline void release_thread(struct task_struct *dead_task) ...@@ -131,9 +131,6 @@ static inline void release_thread(struct task_struct *dead_task)
{ {
} }
#define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
/* /*
* Return saved PC of a blocked thread. * Return saved PC of a blocked thread.
*/ */
......
...@@ -59,10 +59,6 @@ void arch_cpu_idle(void) ...@@ -59,10 +59,6 @@ void arch_cpu_idle(void)
} }
#endif #endif
void release_segments(struct mm_struct *mm)
{
}
void machine_restart(char *cmd) void machine_restart(char *cmd)
{ {
#ifdef CONFIG_KERNEL_DEBUGGER #ifdef CONFIG_KERNEL_DEBUGGER
...@@ -112,14 +108,6 @@ void release_thread(struct task_struct *dead_task) ...@@ -112,14 +108,6 @@ void release_thread(struct task_struct *dead_task)
{ {
} }
/*
* we do not have to muck with descriptors here, that is
* done in switch_mm() as needed.
*/
void copy_segments(struct task_struct *p, struct mm_struct *new_mm)
{
}
/* /*
* this gets called so that we can store lazy state into memory and copy the * this gets called so that we can store lazy state into memory and copy the
* current task into the new thread. * current task into the new thread.
......
...@@ -136,10 +136,6 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned lo ...@@ -136,10 +136,6 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned lo
/* Free all resources held by a thread. */ /* Free all resources held by a thread. */
extern void release_thread(struct task_struct *); extern void release_thread(struct task_struct *);
/* Copy and release all segment info associated with a VM */
#define copy_segments(p, mm) do { } while(0)
#define release_segments(mm) do { } while(0)
/* /*
* FPU lazy state save handling. * FPU lazy state save handling.
*/ */
......
...@@ -170,10 +170,6 @@ struct mm_struct; ...@@ -170,10 +170,6 @@ struct mm_struct;
/* Free all resources held by a thread. */ /* Free all resources held by a thread. */
extern void release_thread(struct task_struct *); extern void release_thread(struct task_struct *);
/* Copy and release all segment info associated with a VM */
#define copy_segments(p, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
/* /*
* FPU lazy state save handling. * FPU lazy state save handling.
*/ */
......
...@@ -58,11 +58,6 @@ static inline void release_thread(struct task_struct *task) ...@@ -58,11 +58,6 @@ static inline void release_thread(struct task_struct *task)
{ {
} }
static inline void mm_copy_segments(struct mm_struct *from_mm,
struct mm_struct *new_mm)
{
}
#define init_stack (init_thread_union.stack) #define init_stack (init_thread_union.stack)
/* /*
......
...@@ -208,11 +208,6 @@ struct mm_struct; ...@@ -208,11 +208,6 @@ struct mm_struct;
/* Free all resources held by a thread. */ /* Free all resources held by a thread. */
#define release_thread(thread) do { } while(0) #define release_thread(thread) do { } while(0)
/* Copy and release all segment info associated with a VM */
#define copy_segments(p, mm) do { } while(0)
#define release_segments(mm) do { } while(0)
#define forget_segments() do { } while (0)
extern unsigned long get_wchan(struct task_struct *p); extern unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment