Skip to content

Commit

Permalink
arch: remove unused *_segments() macros/functions
Browse files Browse the repository at this point in the history
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: Tobias Klauser <[email protected]>
Acked-by: Vineet Gupta <[email protected]>   [for arch/arc]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
tklauser authored and torvalds committed Sep 22, 2017
1 parent 0a8abd9 commit c17c020
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 51 deletions.
3 changes: 0 additions & 3 deletions arch/arc/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ struct task_struct;

#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_ESP(tsk) (task_pt_regs(tsk)->sp)

Expand Down
3 changes: 0 additions & 3 deletions arch/c6x/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
4 changes: 0 additions & 4 deletions arch/frv/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *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);

#define KSTK_EIP(tsk) ((tsk)->thread.frame0->pc)
Expand Down
8 changes: 0 additions & 8 deletions arch/m32r/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ struct mm_struct;
/* Free all resources held by a thread. */
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);
#define KSTK_EIP(tsk) ((tsk)->thread.lr)
#define KSTK_ESP(tsk) ((tsk)->thread.sp)
Expand Down
3 changes: 0 additions & 3 deletions arch/metag/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
12 changes: 0 additions & 12 deletions arch/mn10300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ void arch_cpu_idle(void)
}
#endif

void release_segments(struct mm_struct *mm)
{
}

void machine_restart(char *cmd)
{
#ifdef CONFIG_KERNEL_DEBUGGER
Expand Down Expand Up @@ -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
* current task into the new thread.
Expand Down
4 changes: 0 additions & 4 deletions arch/sh/include/asm/processor_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
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.
*/
Expand Down
4 changes: 0 additions & 4 deletions arch/sh/include/asm/processor_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ struct mm_struct;
/* Free all resources held by a thread. */
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.
*/
Expand Down
5 changes: 0 additions & 5 deletions arch/um/include/asm/processor-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

/*
Expand Down
5 changes: 0 additions & 5 deletions arch/xtensa/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ struct mm_struct;
/* Free all resources held by a thread. */
#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);

#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
Expand Down

0 comments on commit c17c020

Please sign in to comment.