[PATCH] ia64: task_pt_regs()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -95,8 +95,7 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs,
|
||||
static inline int elf_core_copy_task_regs(struct task_struct *t,
|
||||
elf_gregset_t* elfregs)
|
||||
{
|
||||
struct pt_regs *pp = ia64_task_regs(t);
|
||||
ELF_CORE_COPY_REGS((*elfregs), pp);
|
||||
ELF_CORE_COPY_REGS((*elfregs), task_pt_regs(t));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ save_ia32_fpstate_live (struct _fpstate_ia32 __user *save)
|
||||
*/
|
||||
fp_tos = (fsr>>11)&0x7;
|
||||
fr8_st_map = (8-fp_tos)&0x7;
|
||||
ptp = ia64_task_regs(tsk);
|
||||
ptp = task_pt_regs(tsk);
|
||||
fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15);
|
||||
ia64f2ia32f(fpregp, &ptp->f8);
|
||||
copy_to_user(&save->_st[(0+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
|
||||
@@ -389,7 +389,7 @@ restore_ia32_fpstate_live (struct _fpstate_ia32 __user *save)
|
||||
fr8_st_map = (8-fp_tos)&0x7;
|
||||
fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15);
|
||||
|
||||
ptp = ia64_task_regs(tsk);
|
||||
ptp = task_pt_regs(tsk);
|
||||
copy_from_user(fpregp, &save->_st[(0+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
|
||||
ia32f2ia64f(&ptp->f8, fpregp);
|
||||
copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
|
||||
|
||||
@@ -58,7 +58,7 @@ load_desc (u16 selector)
|
||||
void
|
||||
ia32_load_segment_descriptors (struct task_struct *task)
|
||||
{
|
||||
struct pt_regs *regs = ia64_task_regs(task);
|
||||
struct pt_regs *regs = task_pt_regs(task);
|
||||
|
||||
/* Setup the segment descriptors */
|
||||
regs->r24 = load_desc(regs->r16 >> 16); /* ESD */
|
||||
@@ -113,7 +113,7 @@ void
|
||||
ia32_load_state (struct task_struct *t)
|
||||
{
|
||||
unsigned long eflag, fsr, fcr, fir, fdr, tssd;
|
||||
struct pt_regs *regs = ia64_task_regs(t);
|
||||
struct pt_regs *regs = task_pt_regs(t);
|
||||
|
||||
eflag = t->thread.eflag;
|
||||
fsr = t->thread.fsr;
|
||||
|
||||
@@ -1482,7 +1482,7 @@ getreg (struct task_struct *child, int regno)
|
||||
{
|
||||
struct pt_regs *child_regs;
|
||||
|
||||
child_regs = ia64_task_regs(child);
|
||||
child_regs = task_pt_regs(child);
|
||||
switch (regno / sizeof(int)) {
|
||||
case PT_EBX: return child_regs->r11;
|
||||
case PT_ECX: return child_regs->r9;
|
||||
@@ -1510,7 +1510,7 @@ putreg (struct task_struct *child, int regno, unsigned int value)
|
||||
{
|
||||
struct pt_regs *child_regs;
|
||||
|
||||
child_regs = ia64_task_regs(child);
|
||||
child_regs = task_pt_regs(child);
|
||||
switch (regno / sizeof(int)) {
|
||||
case PT_EBX: child_regs->r11 = value; break;
|
||||
case PT_ECX: child_regs->r9 = value; break;
|
||||
@@ -1626,7 +1626,7 @@ save_ia32_fpstate (struct task_struct *tsk, struct ia32_user_i387_struct __user
|
||||
* Stack frames start with 16-bytes of temp space
|
||||
*/
|
||||
swp = (struct switch_stack *)(tsk->thread.ksp + 16);
|
||||
ptp = ia64_task_regs(tsk);
|
||||
ptp = task_pt_regs(tsk);
|
||||
tos = (tsk->thread.fsr >> 11) & 7;
|
||||
for (i = 0; i < 8; i++)
|
||||
put_fpreg(i, &save->st_space[i], ptp, swp, tos);
|
||||
@@ -1659,7 +1659,7 @@ restore_ia32_fpstate (struct task_struct *tsk, struct ia32_user_i387_struct __us
|
||||
* Stack frames start with 16-bytes of temp space
|
||||
*/
|
||||
swp = (struct switch_stack *)(tsk->thread.ksp + 16);
|
||||
ptp = ia64_task_regs(tsk);
|
||||
ptp = task_pt_regs(tsk);
|
||||
tos = (tsk->thread.fsr >> 11) & 7;
|
||||
for (i = 0; i < 8; i++)
|
||||
get_fpreg(i, &save->st_space[i], ptp, swp, tos);
|
||||
@@ -1690,7 +1690,7 @@ save_ia32_fpxstate (struct task_struct *tsk, struct ia32_user_fxsr_struct __user
|
||||
* Stack frames start with 16-bytes of temp space
|
||||
*/
|
||||
swp = (struct switch_stack *)(tsk->thread.ksp + 16);
|
||||
ptp = ia64_task_regs(tsk);
|
||||
ptp = task_pt_regs(tsk);
|
||||
tos = (tsk->thread.fsr >> 11) & 7;
|
||||
for (i = 0; i < 8; i++)
|
||||
put_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos);
|
||||
@@ -1734,7 +1734,7 @@ restore_ia32_fpxstate (struct task_struct *tsk, struct ia32_user_fxsr_struct __u
|
||||
* Stack frames start with 16-bytes of temp space
|
||||
*/
|
||||
swp = (struct switch_stack *)(tsk->thread.ksp + 16);
|
||||
ptp = ia64_task_regs(tsk);
|
||||
ptp = task_pt_regs(tsk);
|
||||
tos = (tsk->thread.fsr >> 11) & 7;
|
||||
for (i = 0; i < 8; i++)
|
||||
get_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos);
|
||||
|
||||
Reference in New Issue
Block a user