Skip to content

Commit ec0d7f1

Browse files
committed
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()
2 parents 269af9a + 1dcc8d7 commit ec0d7f1

41 files changed

Lines changed: 63 additions & 149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/alpha/include/asm/processor.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
4949
/* Free all resources held by a thread. */
5050
extern void release_thread(struct task_struct *);
5151

52-
/* Prepare to copy thread state - unlazy all lazy status */
53-
#define prepare_to_copy(tsk) do { } while (0)
54-
5552
/* Create a kernel thread without removing it from tasklists. */
5653
extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
5754

‎arch/arm/include/asm/processor.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ struct task_struct;
7777
/* Free all resources held by a thread. */
7878
extern void release_thread(struct task_struct *);
7979

80-
/* Prepare to copy thread state - unlazy all lazy status */
81-
#define prepare_to_copy(tsk) do { } while (0)
82-
8380
unsigned long get_wchan(struct task_struct *p);
8481

8582
#if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)

‎arch/avr32/include/asm/processor.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ extern void release_thread(struct task_struct *);
145145
/* Create a kernel thread without removing it from tasklists */
146146
extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
147147

148-
/* Prepare to copy thread state - unlazy all lazy status */
149-
#define prepare_to_copy(tsk) do { } while(0)
150-
151148
/* Return saved PC of a blocked thread */
152149
#define thread_saved_pc(tsk) ((tsk)->thread.cpu_context.pc)
153150

‎arch/blackfin/include/asm/processor.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ static inline void release_thread(struct task_struct *dead_task)
7575
{
7676
}
7777

78-
#define prepare_to_copy(tsk) do { } while (0)
79-
8078
extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
8179

8280
/*

‎arch/c6x/include/asm/processor.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
9292
{
9393
}
9494

95-
/* Prepare to copy thread state - unlazy all lazy status */
96-
#define prepare_to_copy(tsk) do { } while (0)
97-
9895
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
9996

10097
#define copy_segments(tsk, mm) do { } while (0)

‎arch/cris/include/asm/processor.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ struct task_struct;
4949
#define task_pt_regs(task) user_regs(task_thread_info(task))
5050
#define current_regs() task_pt_regs(current)
5151

52-
static inline void prepare_to_copy(struct task_struct *tsk)
53-
{
54-
}
55-
5652
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
5753

5854
unsigned long get_wchan(struct task_struct *p);

‎arch/frv/include/asm/processor.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ do { \
103103
__frame->sp = (_usp); \
104104
} while(0)
105105

106-
extern void prepare_to_copy(struct task_struct *tsk);
107-
108106
/* Free all resources held by a thread. */
109107
static inline void release_thread(struct task_struct *dead_task)
110108
{

‎arch/frv/kernel/process.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
165165
return do_fork(clone_flags, newsp, __frame, 0, parent_tidptr, child_tidptr);
166166
} /* end sys_clone() */
167167

168-
/*****************************************************************************/
169-
/*
170-
* This gets called before we allocate a new thread and copy
171-
* the current task into it.
172-
*/
173-
void prepare_to_copy(struct task_struct *tsk)
174-
{
175-
//unlazy_fpu(tsk);
176-
} /* end prepare_to_copy() */
177-
178-
/*****************************************************************************/
179168
/*
180169
* set up the kernel stack and exception frames for a new process
181170
*/

‎arch/h8300/include/asm/processor.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ static inline void release_thread(struct task_struct *dead_task)
109109

110110
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
111111

112-
#define prepare_to_copy(tsk) do { } while (0)
113-
114112
/*
115113
* Free current thread data structures etc..
116114
*/

‎arch/hexagon/include/asm/processor.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ struct thread_struct {
5858

5959
#define cpu_relax() __vmyield()
6060

61-
/*
62-
* "Unlazying all lazy status" occurs here.
63-
*/
64-
static inline void prepare_to_copy(struct task_struct *tsk)
65-
{
66-
}
67-
6861
/*
6962
* Decides where the kernel will search for a free chunk of vm space during
7063
* mmaps.

0 commit comments

Comments
 (0)