// SPDX-License-Identifier: GPL-2.0 #include <linux/sched/signal.h> #include <linux/sched/task.h> #include <linux/sched/task_stack.h> #include <linux/slab.h> #include <asm/processor.h> #include <asm/fpu.h> #include <asm/traps.h> #include <asm/ptrace.h>
int init_fpu(struct task_struct *tsk) { if (tsk_used_math(tsk)) { if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current) unlazy_fpu(tsk, task_pt_regs(tsk)); return 0; } /* * Memory allocation at the first usage of the FPU and other state. */ if (!tsk->thread.xstate) { tsk->thread.xstate = kmem_cache_alloc(task_xstate_cachep, GFP_KERNEL); if (!tsk->thread.xstate) return -ENOMEM; } if (boot_cpu_data.flags & CPU_HAS_FPU) { struct sh_fpu_hard_struct *fp = &tsk->thread.xstate->hardfpu; memset(fp, 0, xstate_size); fp->fpscr = FPSCR_INIT; } else { struct sh_fpu_soft_struct *fp = &tsk->thread.xstate->softfpu; memset(fp, 0, xstate_size); fp->fpscr = FPSCR_INIT; } set_stopped_child_used_math(tsk); return 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Paul Mundt | 163 | 100.00% | 1 | 100.00% |
Total | 163 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Paul Mundt | 33 | 94.29% | 1 | 50.00% |
Vineet Gupta | 2 | 5.71% | 1 | 50.00% |
Total | 35 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Paul Mundt | 81 | 100.00% | 2 | 100.00% |
Total | 81 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Paul Mundt | 307 | 95.05% | 3 | 30.00% |
Ingo Molnar | 10 | 3.10% | 4 | 40.00% |
Tejun Heo | 3 | 0.93% | 1 | 10.00% |
Vineet Gupta | 2 | 0.62% | 1 | 10.00% |
Greg Kroah-Hartman | 1 | 0.31% | 1 | 10.00% |
Total | 323 | 100.00% | 10 | 100.00% |