You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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()
This commit is contained in:
@@ -49,9 +49,6 @@ extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
|
||||
/* Free all resources held by a thread. */
|
||||
extern void release_thread(struct task_struct *);
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
/* Create a kernel thread without removing it from tasklists. */
|
||||
extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
|
||||
|
||||
|
||||
@@ -77,9 +77,6 @@ struct task_struct;
|
||||
/* Free all resources held by a thread. */
|
||||
extern void release_thread(struct task_struct *);
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
unsigned long get_wchan(struct task_struct *p);
|
||||
|
||||
#if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)
|
||||
|
||||
@@ -145,9 +145,6 @@ extern void release_thread(struct task_struct *);
|
||||
/* Create a kernel thread without removing it from tasklists */
|
||||
extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while(0)
|
||||
|
||||
/* Return saved PC of a blocked thread */
|
||||
#define thread_saved_pc(tsk) ((tsk)->thread.cpu_context.pc)
|
||||
|
||||
|
||||
@@ -75,8 +75,6 @@ static inline void release_thread(struct task_struct *dead_task)
|
||||
{
|
||||
}
|
||||
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
|
||||
|
||||
/*
|
||||
|
||||
@@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
|
||||
{
|
||||
}
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
#define copy_segments(tsk, mm) do { } while (0)
|
||||
|
||||
@@ -49,10 +49,6 @@ struct task_struct;
|
||||
#define task_pt_regs(task) user_regs(task_thread_info(task))
|
||||
#define current_regs() task_pt_regs(current)
|
||||
|
||||
static inline void prepare_to_copy(struct task_struct *tsk)
|
||||
{
|
||||
}
|
||||
|
||||
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
unsigned long get_wchan(struct task_struct *p);
|
||||
|
||||
@@ -103,8 +103,6 @@ do { \
|
||||
__frame->sp = (_usp); \
|
||||
} while(0)
|
||||
|
||||
extern void prepare_to_copy(struct task_struct *tsk);
|
||||
|
||||
/* Free all resources held by a thread. */
|
||||
static inline void release_thread(struct task_struct *dead_task)
|
||||
{
|
||||
|
||||
@@ -165,17 +165,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
||||
return do_fork(clone_flags, newsp, __frame, 0, parent_tidptr, child_tidptr);
|
||||
} /* end sys_clone() */
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* This gets called before we allocate a new thread and copy
|
||||
* the current task into it.
|
||||
*/
|
||||
void prepare_to_copy(struct task_struct *tsk)
|
||||
{
|
||||
//unlazy_fpu(tsk);
|
||||
} /* end prepare_to_copy() */
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* set up the kernel stack and exception frames for a new process
|
||||
*/
|
||||
|
||||
@@ -109,8 +109,6 @@ static inline void release_thread(struct task_struct *dead_task)
|
||||
|
||||
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
/*
|
||||
* Free current thread data structures etc..
|
||||
*/
|
||||
|
||||
@@ -58,13 +58,6 @@ struct thread_struct {
|
||||
|
||||
#define cpu_relax() __vmyield()
|
||||
|
||||
/*
|
||||
* "Unlazying all lazy status" occurs here.
|
||||
*/
|
||||
static inline void prepare_to_copy(struct task_struct *tsk)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Decides where the kernel will search for a free chunk of vm space during
|
||||
* mmaps.
|
||||
|
||||
@@ -343,9 +343,6 @@ struct task_struct;
|
||||
*/
|
||||
#define release_thread(dead_task)
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
/*
|
||||
* This is the mechanism for creating a new kernel thread.
|
||||
*
|
||||
|
||||
@@ -118,8 +118,6 @@ struct mm_struct;
|
||||
/* Free all resources held by a thread. */
|
||||
extern void release_thread(struct task_struct *);
|
||||
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
/*
|
||||
* create a kernel thread without removing it from tasklists
|
||||
*/
|
||||
|
||||
@@ -153,9 +153,6 @@ static inline void release_thread(struct task_struct *dead_task)
|
||||
{
|
||||
}
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
/*
|
||||
|
||||
@@ -23,7 +23,6 @@ extern const struct seq_operations cpuinfo_op;
|
||||
|
||||
# define cpu_relax() barrier()
|
||||
# define cpu_sleep() do {} while (0)
|
||||
# define prepare_to_copy(tsk) do {} while (0)
|
||||
|
||||
#define task_pt_regs(tsk) \
|
||||
(((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
|
||||
|
||||
@@ -310,9 +310,6 @@ struct task_struct;
|
||||
/* Free all resources held by a thread. */
|
||||
#define release_thread(thread) do { } while(0)
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
extern unsigned long thread_saved_pc(struct task_struct *tsk);
|
||||
|
||||
@@ -139,9 +139,6 @@ static inline void start_thread(struct pt_regs *regs,
|
||||
/* Free all resources held by a thread. */
|
||||
extern void release_thread(struct task_struct *);
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
extern void prepare_to_copy(struct task_struct *tsk);
|
||||
|
||||
/*
|
||||
* create a kernel thread without removing it from tasklists
|
||||
*/
|
||||
|
||||
@@ -208,12 +208,14 @@ void copy_segments(struct task_struct *p, struct mm_struct *new_mm)
|
||||
}
|
||||
|
||||
/*
|
||||
* this gets called before we allocate a new thread and copy the current task
|
||||
* into it so that we can store lazy state into memory
|
||||
* this gets called so that we can store lazy state into memory and copy the
|
||||
* current task into the new thread.
|
||||
*/
|
||||
void prepare_to_copy(struct task_struct *tsk)
|
||||
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||
{
|
||||
unlazy_fpu(tsk);
|
||||
unlazy_fpu(src);
|
||||
*dst = *src;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -72,10 +72,6 @@ struct thread_struct {
|
||||
#define task_pt_regs(task) user_regs(task_thread_info(task))
|
||||
#define current_regs() user_regs(current_thread_info())
|
||||
|
||||
extern inline void prepare_to_copy(struct task_struct *tsk)
|
||||
{
|
||||
}
|
||||
|
||||
#define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack)
|
||||
|
||||
#define INIT_THREAD { }
|
||||
|
||||
@@ -328,9 +328,6 @@ struct mm_struct;
|
||||
extern void release_thread(struct task_struct *);
|
||||
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
#define prepare_to_copy(tsk) do { } while (0)
|
||||
|
||||
extern void map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm);
|
||||
|
||||
extern unsigned long get_wchan(struct task_struct *p);
|
||||
|
||||
@@ -74,9 +74,6 @@ struct task_struct;
|
||||
void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp);
|
||||
void release_thread(struct task_struct *);
|
||||
|
||||
/* Prepare to copy thread state - unlazy all lazy status */
|
||||
extern void prepare_to_copy(struct task_struct *tsk);
|
||||
|
||||
/* Create a new kernel thread. */
|
||||
extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user