process.c (e258d719ff28ecc7a048eb8f78380e68c4b3a3f0) process.c (4725c86055f5bbdcdfe47199c0715881893a2c79)
1/*
2 * This file handles the architecture dependent parts of process handling.
3 *
4 * Copyright IBM Corp. 1999, 2009
5 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>,
6 * Hartmut Penner <hp@de.ibm.com>,
7 * Denis Joseph Barrow,
8 */

--- 151 unchanged lines hidden (view full) ---

160 p->thread.ri_signum = 0;
161 frame->childregs.psw.mask &= ~PSW_MASK_RI;
162
163#ifndef CONFIG_64BIT
164 /*
165 * save fprs to current->thread.fp_regs to merge them with
166 * the emulated registers and then copy the result to the child.
167 */
1/*
2 * This file handles the architecture dependent parts of process handling.
3 *
4 * Copyright IBM Corp. 1999, 2009
5 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>,
6 * Hartmut Penner <hp@de.ibm.com>,
7 * Denis Joseph Barrow,
8 */

--- 151 unchanged lines hidden (view full) ---

160 p->thread.ri_signum = 0;
161 frame->childregs.psw.mask &= ~PSW_MASK_RI;
162
163#ifndef CONFIG_64BIT
164 /*
165 * save fprs to current->thread.fp_regs to merge them with
166 * the emulated registers and then copy the result to the child.
167 */
168 save_fp_regs(&current->thread.fp_regs);
168 save_fp_ctl(&current->thread.fp_regs.fpc);
169 save_fp_regs(current->thread.fp_regs.fprs);
169 memcpy(&p->thread.fp_regs, &current->thread.fp_regs,
170 sizeof(s390_fp_regs));
171 /* Set a new TLS ? */
172 if (clone_flags & CLONE_SETTLS)
173 p->thread.acrs[0] = frame->childregs.gprs[6];
174#else /* CONFIG_64BIT */
175 /* Save the fpu registers to new thread structure. */
170 memcpy(&p->thread.fp_regs, &current->thread.fp_regs,
171 sizeof(s390_fp_regs));
172 /* Set a new TLS ? */
173 if (clone_flags & CLONE_SETTLS)
174 p->thread.acrs[0] = frame->childregs.gprs[6];
175#else /* CONFIG_64BIT */
176 /* Save the fpu registers to new thread structure. */
176 save_fp_regs(&p->thread.fp_regs);
177 save_fp_ctl(&p->thread.fp_regs.fpc);
178 save_fp_regs(p->thread.fp_regs.fprs);
179 p->thread.fp_regs.pad = 0;
177 /* Set a new TLS ? */
178 if (clone_flags & CLONE_SETTLS) {
179 unsigned long tls = frame->childregs.gprs[6];
180 if (is_compat_task()) {
181 p->thread.acrs[0] = (unsigned int)tls;
182 } else {
183 p->thread.acrs[0] = (unsigned int)(tls >> 32);
184 p->thread.acrs[1] = (unsigned int)tls;

--- 15 unchanged lines hidden (view full) ---

200 */
201int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
202{
203#ifndef CONFIG_64BIT
204 /*
205 * save fprs to current->thread.fp_regs to merge them with
206 * the emulated registers and then copy the result to the dump.
207 */
180 /* Set a new TLS ? */
181 if (clone_flags & CLONE_SETTLS) {
182 unsigned long tls = frame->childregs.gprs[6];
183 if (is_compat_task()) {
184 p->thread.acrs[0] = (unsigned int)tls;
185 } else {
186 p->thread.acrs[0] = (unsigned int)(tls >> 32);
187 p->thread.acrs[1] = (unsigned int)tls;

--- 15 unchanged lines hidden (view full) ---

203 */
204int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
205{
206#ifndef CONFIG_64BIT
207 /*
208 * save fprs to current->thread.fp_regs to merge them with
209 * the emulated registers and then copy the result to the dump.
210 */
208 save_fp_regs(&current->thread.fp_regs);
211 save_fp_ctl(&current->thread.fp_regs.fpc);
212 save_fp_regs(current->thread.fp_regs.fprs);
209 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs));
210#else /* CONFIG_64BIT */
213 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs));
214#else /* CONFIG_64BIT */
211 save_fp_regs(fpregs);
215 save_fp_ctl(&fpregs->fpc);
216 save_fp_regs(fpregs->fprs);
212#endif /* CONFIG_64BIT */
213 return 1;
214}
215EXPORT_SYMBOL(dump_fpu);
216
217unsigned long get_wchan(struct task_struct *p)
218{
219 struct stack_frame *sf, *low, *high;

--- 56 unchanged lines hidden ---
217#endif /* CONFIG_64BIT */
218 return 1;
219}
220EXPORT_SYMBOL(dump_fpu);
221
222unsigned long get_wchan(struct task_struct *p)
223{
224 struct stack_frame *sf, *low, *high;

--- 56 unchanged lines hidden ---