process.c (e82a82c19f4272ea5437cc76e5711b98e2ee6223) | process.c (432c6bacbd0c16ec210c43da411ccc3855c4c010) |
---|---|
1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others. 7 * Copyright (C) 2005, 2006 by Ralf Baechle (ralf@linux-mips.org) 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. --- 16 unchanged lines hidden (view full) --- 25#include <linux/completion.h> 26#include <linux/kallsyms.h> 27#include <linux/random.h> 28#include <linux/prctl.h> 29 30#include <asm/asm.h> 31#include <asm/bootinfo.h> 32#include <asm/cpu.h> | 1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others. 7 * Copyright (C) 2005, 2006 by Ralf Baechle (ralf@linux-mips.org) 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. --- 16 unchanged lines hidden (view full) --- 25#include <linux/completion.h> 26#include <linux/kallsyms.h> 27#include <linux/random.h> 28#include <linux/prctl.h> 29 30#include <asm/asm.h> 31#include <asm/bootinfo.h> 32#include <asm/cpu.h> |
33#include <asm/dsemul.h> |
|
33#include <asm/dsp.h> 34#include <asm/fpu.h> 35#include <asm/msa.h> 36#include <asm/pgtable.h> 37#include <asm/mipsregs.h> 38#include <asm/processor.h> 39#include <asm/reg.h> 40#include <asm/uaccess.h> --- 22 unchanged lines hidden (view full) --- 63 64 /* New thread loses kernel privileges. */ 65 status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK); 66 status |= KU_USER; 67 regs->cp0_status = status; 68 lose_fpu(0); 69 clear_thread_flag(TIF_MSA_CTX_LIVE); 70 clear_used_math(); | 34#include <asm/dsp.h> 35#include <asm/fpu.h> 36#include <asm/msa.h> 37#include <asm/pgtable.h> 38#include <asm/mipsregs.h> 39#include <asm/processor.h> 40#include <asm/reg.h> 41#include <asm/uaccess.h> --- 22 unchanged lines hidden (view full) --- 64 65 /* New thread loses kernel privileges. */ 66 status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK); 67 status |= KU_USER; 68 regs->cp0_status = status; 69 lose_fpu(0); 70 clear_thread_flag(TIF_MSA_CTX_LIVE); 71 clear_used_math(); |
72 atomic_set(¤t->thread.bd_emu_frame, BD_EMUFRAME_NONE); |
|
71 init_dsp(); 72 regs->cp0_epc = pc; 73 regs->regs[29] = sp; 74} 75 | 73 init_dsp(); 74 regs->cp0_epc = pc; 75 regs->regs[29] = sp; 76} 77 |
78void exit_thread(struct task_struct *tsk) 79{ 80 /* 81 * User threads may have allocated a delay slot emulation frame. 82 * If so, clean up that allocation. 83 */ 84 if (!(current->flags & PF_KTHREAD)) 85 dsemul_thread_cleanup(tsk); 86} 87 |
|
76int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) 77{ 78 /* 79 * Save any process state which is live in hardware registers to the 80 * parent context prior to duplication. This prevents the new child 81 * state becoming stale if the parent is preempted before copy_thread() 82 * gets a chance to save the parent's live hardware registers to the 83 * child context. --- 70 unchanged lines hidden (view full) --- 154 clear_tsk_thread_flag(p, TIF_USEDFPU); 155 clear_tsk_thread_flag(p, TIF_USEDMSA); 156 clear_tsk_thread_flag(p, TIF_MSA_CTX_LIVE); 157 158#ifdef CONFIG_MIPS_MT_FPAFF 159 clear_tsk_thread_flag(p, TIF_FPUBOUND); 160#endif /* CONFIG_MIPS_MT_FPAFF */ 161 | 88int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) 89{ 90 /* 91 * Save any process state which is live in hardware registers to the 92 * parent context prior to duplication. This prevents the new child 93 * state becoming stale if the parent is preempted before copy_thread() 94 * gets a chance to save the parent's live hardware registers to the 95 * child context. --- 70 unchanged lines hidden (view full) --- 166 clear_tsk_thread_flag(p, TIF_USEDFPU); 167 clear_tsk_thread_flag(p, TIF_USEDMSA); 168 clear_tsk_thread_flag(p, TIF_MSA_CTX_LIVE); 169 170#ifdef CONFIG_MIPS_MT_FPAFF 171 clear_tsk_thread_flag(p, TIF_FPUBOUND); 172#endif /* CONFIG_MIPS_MT_FPAFF */ 173 |
174 atomic_set(&p->thread.bd_emu_frame, BD_EMUFRAME_NONE); 175 |
|
162 if (clone_flags & CLONE_SETTLS) 163 ti->tp_value = regs->regs[7]; 164 165 return 0; 166} 167 168#ifdef CONFIG_CC_STACKPROTECTOR 169#include <linux/stackprotector.h> --- 485 unchanged lines hidden --- | 176 if (clone_flags & CLONE_SETTLS) 177 ti->tp_value = regs->regs[7]; 178 179 return 0; 180} 181 182#ifdef CONFIG_CC_STACKPROTECTOR 183#include <linux/stackprotector.h> --- 485 unchanged lines hidden --- |