diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:06:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:58 -0500 |
commit | 6450578f32cdca587ae5f148e2118b2fcc36bb11 (patch) | |
tree | 91ad424aae66d72fc370dc624fca3f42d830675b /arch/ia64/ia32 | |
parent | ab03591db110e8d195d381a68692eb37da981cdf (diff) |
[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>
Diffstat (limited to 'arch/ia64/ia32')
-rw-r--r-- | arch/ia64/ia32/elfcore32.h | 3 | ||||
-rw-r--r-- | arch/ia64/ia32/ia32_signal.c | 4 | ||||
-rw-r--r-- | arch/ia64/ia32/ia32_support.c | 4 | ||||
-rw-r--r-- | arch/ia64/ia32/sys_ia32.c | 12 |
4 files changed, 11 insertions, 12 deletions
diff --git a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h index b73b8b6b10c..a47f63b204f 100644 --- a/arch/ia64/ia32/elfcore32.h +++ b/arch/ia64/ia32/elfcore32.h | |||
@@ -95,8 +95,7 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, | |||
95 | static inline int elf_core_copy_task_regs(struct task_struct *t, | 95 | static inline int elf_core_copy_task_regs(struct task_struct *t, |
96 | elf_gregset_t* elfregs) | 96 | elf_gregset_t* elfregs) |
97 | { | 97 | { |
98 | struct pt_regs *pp = ia64_task_regs(t); | 98 | ELF_CORE_COPY_REGS((*elfregs), task_pt_regs(t)); |
99 | ELF_CORE_COPY_REGS((*elfregs), pp); | ||
100 | return 1; | 99 | return 1; |
101 | } | 100 | } |
102 | 101 | ||
diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c index aa891c9bc9b..5856510210f 100644 --- a/arch/ia64/ia32/ia32_signal.c +++ b/arch/ia64/ia32/ia32_signal.c | |||
@@ -255,7 +255,7 @@ save_ia32_fpstate_live (struct _fpstate_ia32 __user *save) | |||
255 | */ | 255 | */ |
256 | fp_tos = (fsr>>11)&0x7; | 256 | fp_tos = (fsr>>11)&0x7; |
257 | fr8_st_map = (8-fp_tos)&0x7; | 257 | fr8_st_map = (8-fp_tos)&0x7; |
258 | ptp = ia64_task_regs(tsk); | 258 | ptp = task_pt_regs(tsk); |
259 | fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15); | 259 | fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15); |
260 | ia64f2ia32f(fpregp, &ptp->f8); | 260 | ia64f2ia32f(fpregp, &ptp->f8); |
261 | copy_to_user(&save->_st[(0+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); | 261 | 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) | |||
389 | fr8_st_map = (8-fp_tos)&0x7; | 389 | fr8_st_map = (8-fp_tos)&0x7; |
390 | fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15); | 390 | fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15); |
391 | 391 | ||
392 | ptp = ia64_task_regs(tsk); | 392 | ptp = task_pt_regs(tsk); |
393 | copy_from_user(fpregp, &save->_st[(0+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); | 393 | copy_from_user(fpregp, &save->_st[(0+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); |
394 | ia32f2ia64f(&ptp->f8, fpregp); | 394 | ia32f2ia64f(&ptp->f8, fpregp); |
395 | copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); | 395 | copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); |
diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c index 4f630043b3a..c187743965a 100644 --- a/arch/ia64/ia32/ia32_support.c +++ b/arch/ia64/ia32/ia32_support.c | |||
@@ -58,7 +58,7 @@ load_desc (u16 selector) | |||
58 | void | 58 | void |
59 | ia32_load_segment_descriptors (struct task_struct *task) | 59 | ia32_load_segment_descriptors (struct task_struct *task) |
60 | { | 60 | { |
61 | struct pt_regs *regs = ia64_task_regs(task); | 61 | struct pt_regs *regs = task_pt_regs(task); |
62 | 62 | ||
63 | /* Setup the segment descriptors */ | 63 | /* Setup the segment descriptors */ |
64 | regs->r24 = load_desc(regs->r16 >> 16); /* ESD */ | 64 | regs->r24 = load_desc(regs->r16 >> 16); /* ESD */ |
@@ -113,7 +113,7 @@ void | |||
113 | ia32_load_state (struct task_struct *t) | 113 | ia32_load_state (struct task_struct *t) |
114 | { | 114 | { |
115 | unsigned long eflag, fsr, fcr, fir, fdr, tssd; | 115 | unsigned long eflag, fsr, fcr, fir, fdr, tssd; |
116 | struct pt_regs *regs = ia64_task_regs(t); | 116 | struct pt_regs *regs = task_pt_regs(t); |
117 | 117 | ||
118 | eflag = t->thread.eflag; | 118 | eflag = t->thread.eflag; |
119 | fsr = t->thread.fsr; | 119 | fsr = t->thread.fsr; |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 0668b2b7714..3945d378bd7 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1482,7 +1482,7 @@ getreg (struct task_struct *child, int regno) | |||
1482 | { | 1482 | { |
1483 | struct pt_regs *child_regs; | 1483 | struct pt_regs *child_regs; |
1484 | 1484 | ||
1485 | child_regs = ia64_task_regs(child); | 1485 | child_regs = task_pt_regs(child); |
1486 | switch (regno / sizeof(int)) { | 1486 | switch (regno / sizeof(int)) { |
1487 | case PT_EBX: return child_regs->r11; | 1487 | case PT_EBX: return child_regs->r11; |
1488 | case PT_ECX: return child_regs->r9; | 1488 | case PT_ECX: return child_regs->r9; |
@@ -1510,7 +1510,7 @@ putreg (struct task_struct *child, int regno, unsigned int value) | |||
1510 | { | 1510 | { |
1511 | struct pt_regs *child_regs; | 1511 | struct pt_regs *child_regs; |
1512 | 1512 | ||
1513 | child_regs = ia64_task_regs(child); | 1513 | child_regs = task_pt_regs(child); |
1514 | switch (regno / sizeof(int)) { | 1514 | switch (regno / sizeof(int)) { |
1515 | case PT_EBX: child_regs->r11 = value; break; | 1515 | case PT_EBX: child_regs->r11 = value; break; |
1516 | case PT_ECX: child_regs->r9 = value; break; | 1516 | 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 | |||
1626 | * Stack frames start with 16-bytes of temp space | 1626 | * Stack frames start with 16-bytes of temp space |
1627 | */ | 1627 | */ |
1628 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); | 1628 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); |
1629 | ptp = ia64_task_regs(tsk); | 1629 | ptp = task_pt_regs(tsk); |
1630 | tos = (tsk->thread.fsr >> 11) & 7; | 1630 | tos = (tsk->thread.fsr >> 11) & 7; |
1631 | for (i = 0; i < 8; i++) | 1631 | for (i = 0; i < 8; i++) |
1632 | put_fpreg(i, &save->st_space[i], ptp, swp, tos); | 1632 | 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 | |||
1659 | * Stack frames start with 16-bytes of temp space | 1659 | * Stack frames start with 16-bytes of temp space |
1660 | */ | 1660 | */ |
1661 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); | 1661 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); |
1662 | ptp = ia64_task_regs(tsk); | 1662 | ptp = task_pt_regs(tsk); |
1663 | tos = (tsk->thread.fsr >> 11) & 7; | 1663 | tos = (tsk->thread.fsr >> 11) & 7; |
1664 | for (i = 0; i < 8; i++) | 1664 | for (i = 0; i < 8; i++) |
1665 | get_fpreg(i, &save->st_space[i], ptp, swp, tos); | 1665 | 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 | |||
1690 | * Stack frames start with 16-bytes of temp space | 1690 | * Stack frames start with 16-bytes of temp space |
1691 | */ | 1691 | */ |
1692 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); | 1692 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); |
1693 | ptp = ia64_task_regs(tsk); | 1693 | ptp = task_pt_regs(tsk); |
1694 | tos = (tsk->thread.fsr >> 11) & 7; | 1694 | tos = (tsk->thread.fsr >> 11) & 7; |
1695 | for (i = 0; i < 8; i++) | 1695 | for (i = 0; i < 8; i++) |
1696 | put_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos); | 1696 | 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 | |||
1734 | * Stack frames start with 16-bytes of temp space | 1734 | * Stack frames start with 16-bytes of temp space |
1735 | */ | 1735 | */ |
1736 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); | 1736 | swp = (struct switch_stack *)(tsk->thread.ksp + 16); |
1737 | ptp = ia64_task_regs(tsk); | 1737 | ptp = task_pt_regs(tsk); |
1738 | tos = (tsk->thread.fsr >> 11) & 7; | 1738 | tos = (tsk->thread.fsr >> 11) & 7; |
1739 | for (i = 0; i < 8; i++) | 1739 | for (i = 0; i < 8; i++) |
1740 | get_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos); | 1740 | get_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos); |