process.c (3d5271f9883cba7b54762bc4fe027d4172f06db7) process.c (347a8dc3b815f0c0fa62a1df075184ffe4cbdcf1)
1/*
2 * arch/s390/kernel/process.c
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
7 * Hartmut Penner (hp@de.ibm.com),
8 * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),

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

230 frame->sf.gprs[8] = (unsigned long) ret_from_fork;
231
232 /* fake return stack for resume(), don't go back to schedule */
233 frame->sf.gprs[9] = (unsigned long) frame;
234
235 /* Save access registers to new thread structure. */
236 save_access_regs(&p->thread.acrs[0]);
237
1/*
2 * arch/s390/kernel/process.c
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
7 * Hartmut Penner (hp@de.ibm.com),
8 * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),

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

230 frame->sf.gprs[8] = (unsigned long) ret_from_fork;
231
232 /* fake return stack for resume(), don't go back to schedule */
233 frame->sf.gprs[9] = (unsigned long) frame;
234
235 /* Save access registers to new thread structure. */
236 save_access_regs(&p->thread.acrs[0]);
237
238#ifndef CONFIG_ARCH_S390X
238#ifndef CONFIG_64BIT
239 /*
240 * save fprs to current->thread.fp_regs to merge them with
241 * the emulated registers and then copy the result to the child.
242 */
243 save_fp_regs(&current->thread.fp_regs);
244 memcpy(&p->thread.fp_regs, &current->thread.fp_regs,
245 sizeof(s390_fp_regs));
246 p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _SEGMENT_TABLE;
247 /* Set a new TLS ? */
248 if (clone_flags & CLONE_SETTLS)
249 p->thread.acrs[0] = regs->gprs[6];
239 /*
240 * save fprs to current->thread.fp_regs to merge them with
241 * the emulated registers and then copy the result to the child.
242 */
243 save_fp_regs(&current->thread.fp_regs);
244 memcpy(&p->thread.fp_regs, &current->thread.fp_regs,
245 sizeof(s390_fp_regs));
246 p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _SEGMENT_TABLE;
247 /* Set a new TLS ? */
248 if (clone_flags & CLONE_SETTLS)
249 p->thread.acrs[0] = regs->gprs[6];
250#else /* CONFIG_ARCH_S390X */
250#else /* CONFIG_64BIT */
251 /* Save the fpu registers to new thread structure. */
252 save_fp_regs(&p->thread.fp_regs);
253 p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE;
254 /* Set a new TLS ? */
255 if (clone_flags & CLONE_SETTLS) {
256 if (test_thread_flag(TIF_31BIT)) {
257 p->thread.acrs[0] = (unsigned int) regs->gprs[6];
258 } else {
259 p->thread.acrs[0] = (unsigned int)(regs->gprs[6] >> 32);
260 p->thread.acrs[1] = (unsigned int) regs->gprs[6];
261 }
262 }
251 /* Save the fpu registers to new thread structure. */
252 save_fp_regs(&p->thread.fp_regs);
253 p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE;
254 /* Set a new TLS ? */
255 if (clone_flags & CLONE_SETTLS) {
256 if (test_thread_flag(TIF_31BIT)) {
257 p->thread.acrs[0] = (unsigned int) regs->gprs[6];
258 } else {
259 p->thread.acrs[0] = (unsigned int)(regs->gprs[6] >> 32);
260 p->thread.acrs[1] = (unsigned int) regs->gprs[6];
261 }
262 }
263#endif /* CONFIG_ARCH_S390X */
263#endif /* CONFIG_64BIT */
264 /* start new process with ar4 pointing to the correct address space */
265 p->thread.mm_segment = get_fs();
266 /* Don't copy debug registers */
267 memset(&p->thread.per_info,0,sizeof(p->thread.per_info));
268
269 return 0;
270}
271

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

334}
335
336
337/*
338 * fill in the FPU structure for a core dump.
339 */
340int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
341{
264 /* start new process with ar4 pointing to the correct address space */
265 p->thread.mm_segment = get_fs();
266 /* Don't copy debug registers */
267 memset(&p->thread.per_info,0,sizeof(p->thread.per_info));
268
269 return 0;
270}
271

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

334}
335
336
337/*
338 * fill in the FPU structure for a core dump.
339 */
340int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
341{
342#ifndef CONFIG_ARCH_S390X
342#ifndef CONFIG_64BIT
343 /*
344 * save fprs to current->thread.fp_regs to merge them with
345 * the emulated registers and then copy the result to the dump.
346 */
347 save_fp_regs(&current->thread.fp_regs);
348 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs));
343 /*
344 * save fprs to current->thread.fp_regs to merge them with
345 * the emulated registers and then copy the result to the dump.
346 */
347 save_fp_regs(&current->thread.fp_regs);
348 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs));
349#else /* CONFIG_ARCH_S390X */
349#else /* CONFIG_64BIT */
350 save_fp_regs(fpregs);
350 save_fp_regs(fpregs);
351#endif /* CONFIG_ARCH_S390X */
351#endif /* CONFIG_64BIT */
352 return 1;
353}
354
355/*
356 * fill in the user structure for a core dump..
357 */
358void dump_thread(struct pt_regs * regs, struct user * dump)
359{

--- 41 unchanged lines hidden ---
352 return 1;
353}
354
355/*
356 * fill in the user structure for a core dump..
357 */
358void dump_thread(struct pt_regs * regs, struct user * dump)
359{

--- 41 unchanged lines hidden ---