Commit 6450578f authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[PATCH] ia64: task_pt_regs()


Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ab03591d
...@@ -95,8 +95,7 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, ...@@ -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, static inline int elf_core_copy_task_regs(struct task_struct *t,
elf_gregset_t* elfregs) elf_gregset_t* elfregs)
{ {
struct pt_regs *pp = ia64_task_regs(t); ELF_CORE_COPY_REGS((*elfregs), task_pt_regs(t));
ELF_CORE_COPY_REGS((*elfregs), pp);
return 1; return 1;
} }
......
...@@ -255,7 +255,7 @@ save_ia32_fpstate_live (struct _fpstate_ia32 __user *save) ...@@ -255,7 +255,7 @@ save_ia32_fpstate_live (struct _fpstate_ia32 __user *save)
*/ */
fp_tos = (fsr>>11)&0x7; fp_tos = (fsr>>11)&0x7;
fr8_st_map = (8-fp_tos)&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); fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15);
ia64f2ia32f(fpregp, &ptp->f8); ia64f2ia32f(fpregp, &ptp->f8);
copy_to_user(&save->_st[(0+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); 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,7 +389,7 @@ restore_ia32_fpstate_live (struct _fpstate_ia32 __user *save)
fr8_st_map = (8-fp_tos)&0x7; fr8_st_map = (8-fp_tos)&0x7;
fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15); 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)); copy_from_user(fpregp, &save->_st[(0+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
ia32f2ia64f(&ptp->f8, fpregp); ia32f2ia64f(&ptp->f8, fpregp);
copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
......
...@@ -58,7 +58,7 @@ load_desc (u16 selector) ...@@ -58,7 +58,7 @@ load_desc (u16 selector)
void void
ia32_load_segment_descriptors (struct task_struct *task) 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 */ /* Setup the segment descriptors */
regs->r24 = load_desc(regs->r16 >> 16); /* ESD */ regs->r24 = load_desc(regs->r16 >> 16); /* ESD */
...@@ -113,7 +113,7 @@ void ...@@ -113,7 +113,7 @@ void
ia32_load_state (struct task_struct *t) ia32_load_state (struct task_struct *t)
{ {
unsigned long eflag, fsr, fcr, fir, fdr, tssd; 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; eflag = t->thread.eflag;
fsr = t->thread.fsr; fsr = t->thread.fsr;
......
...@@ -1482,7 +1482,7 @@ getreg (struct task_struct *child, int regno) ...@@ -1482,7 +1482,7 @@ getreg (struct task_struct *child, int regno)
{ {
struct pt_regs *child_regs; struct pt_regs *child_regs;
child_regs = ia64_task_regs(child); child_regs = task_pt_regs(child);
switch (regno / sizeof(int)) { switch (regno / sizeof(int)) {
case PT_EBX: return child_regs->r11; case PT_EBX: return child_regs->r11;
case PT_ECX: return child_regs->r9; case PT_ECX: return child_regs->r9;
...@@ -1510,7 +1510,7 @@ putreg (struct task_struct *child, int regno, unsigned int value) ...@@ -1510,7 +1510,7 @@ putreg (struct task_struct *child, int regno, unsigned int value)
{ {
struct pt_regs *child_regs; struct pt_regs *child_regs;
child_regs = ia64_task_regs(child); child_regs = task_pt_regs(child);
switch (regno / sizeof(int)) { switch (regno / sizeof(int)) {
case PT_EBX: child_regs->r11 = value; break; case PT_EBX: child_regs->r11 = value; break;
case PT_ECX: child_regs->r9 = 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 ...@@ -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 * Stack frames start with 16-bytes of temp space
*/ */
swp = (struct switch_stack *)(tsk->thread.ksp + 16); swp = (struct switch_stack *)(tsk->thread.ksp + 16);
ptp = ia64_task_regs(tsk); ptp = task_pt_regs(tsk);
tos = (tsk->thread.fsr >> 11) & 7; tos = (tsk->thread.fsr >> 11) & 7;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
put_fpreg(i, &save->st_space[i], ptp, swp, tos); 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,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 * Stack frames start with 16-bytes of temp space
*/ */
swp = (struct switch_stack *)(tsk->thread.ksp + 16); swp = (struct switch_stack *)(tsk->thread.ksp + 16);
ptp = ia64_task_regs(tsk); ptp = task_pt_regs(tsk);
tos = (tsk->thread.fsr >> 11) & 7; tos = (tsk->thread.fsr >> 11) & 7;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
get_fpreg(i, &save->st_space[i], ptp, swp, tos); 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,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 * Stack frames start with 16-bytes of temp space
*/ */
swp = (struct switch_stack *)(tsk->thread.ksp + 16); swp = (struct switch_stack *)(tsk->thread.ksp + 16);
ptp = ia64_task_regs(tsk); ptp = task_pt_regs(tsk);
tos = (tsk->thread.fsr >> 11) & 7; tos = (tsk->thread.fsr >> 11) & 7;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
put_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos); 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,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 * Stack frames start with 16-bytes of temp space
*/ */
swp = (struct switch_stack *)(tsk->thread.ksp + 16); swp = (struct switch_stack *)(tsk->thread.ksp + 16);
ptp = ia64_task_regs(tsk); ptp = task_pt_regs(tsk);
tos = (tsk->thread.fsr >> 11) & 7; tos = (tsk->thread.fsr >> 11) & 7;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
get_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos); get_fpreg(i, (struct _fpreg_ia32 __user *)&save->st_space[4*i], ptp, swp, tos);
......
...@@ -1710,7 +1710,7 @@ static void ...@@ -1710,7 +1710,7 @@ static void
pfm_syswide_force_stop(void *info) pfm_syswide_force_stop(void *info)
{ {
pfm_context_t *ctx = (pfm_context_t *)info; pfm_context_t *ctx = (pfm_context_t *)info;
struct pt_regs *regs = ia64_task_regs(current); struct pt_regs *regs = task_pt_regs(current);
struct task_struct *owner; struct task_struct *owner;
unsigned long flags; unsigned long flags;
int ret; int ret;
...@@ -1815,7 +1815,7 @@ pfm_flush(struct file *filp) ...@@ -1815,7 +1815,7 @@ pfm_flush(struct file *filp)
is_system = ctx->ctx_fl_system; is_system = ctx->ctx_fl_system;
task = PFM_CTX_TASK(ctx); task = PFM_CTX_TASK(ctx);
regs = ia64_task_regs(task); regs = task_pt_regs(task);
DPRINT(("ctx_state=%d is_current=%d\n", DPRINT(("ctx_state=%d is_current=%d\n",
state, state,
...@@ -1945,7 +1945,7 @@ pfm_close(struct inode *inode, struct file *filp) ...@@ -1945,7 +1945,7 @@ pfm_close(struct inode *inode, struct file *filp)
is_system = ctx->ctx_fl_system; is_system = ctx->ctx_fl_system;
task = PFM_CTX_TASK(ctx); task = PFM_CTX_TASK(ctx);
regs = ia64_task_regs(task); regs = task_pt_regs(task);
DPRINT(("ctx_state=%d is_current=%d\n", DPRINT(("ctx_state=%d is_current=%d\n",
state, state,
...@@ -4052,7 +4052,7 @@ pfm_stop(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) ...@@ -4052,7 +4052,7 @@ pfm_stop(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
*/ */
ia64_psr(regs)->up = 0; ia64_psr(regs)->up = 0;
} else { } else {
tregs = ia64_task_regs(task); tregs = task_pt_regs(task);
/* /*
* stop monitoring at the user level * stop monitoring at the user level
...@@ -4134,7 +4134,7 @@ pfm_start(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) ...@@ -4134,7 +4134,7 @@ pfm_start(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
ia64_psr(regs)->up = 1; ia64_psr(regs)->up = 1;
} else { } else {
tregs = ia64_task_regs(ctx->ctx_task); tregs = task_pt_regs(ctx->ctx_task);
/* /*
* start monitoring at the kernel level the next * start monitoring at the kernel level the next
...@@ -4404,7 +4404,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) ...@@ -4404,7 +4404,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
/* /*
* when not current, task MUST be stopped, so this is safe * when not current, task MUST be stopped, so this is safe
*/ */
regs = ia64_task_regs(task); regs = task_pt_regs(task);
/* force a full reload */ /* force a full reload */
ctx->ctx_last_activation = PFM_INVALID_ACTIVATION; ctx->ctx_last_activation = PFM_INVALID_ACTIVATION;
...@@ -4530,7 +4530,7 @@ pfm_context_unload(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg ...@@ -4530,7 +4530,7 @@ pfm_context_unload(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg
/* /*
* per-task mode * per-task mode
*/ */
tregs = task == current ? regs : ia64_task_regs(task); tregs = task == current ? regs : task_pt_regs(task);
if (task == current) { if (task == current) {
/* /*
...@@ -4593,7 +4593,7 @@ pfm_exit_thread(struct task_struct *task) ...@@ -4593,7 +4593,7 @@ pfm_exit_thread(struct task_struct *task)
{ {
pfm_context_t *ctx; pfm_context_t *ctx;
unsigned long flags; unsigned long flags;
struct pt_regs *regs = ia64_task_regs(task); struct pt_regs *regs = task_pt_regs(task);
int ret, state; int ret, state;
int free_ok = 0; int free_ok = 0;
...@@ -4926,7 +4926,7 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count) ...@@ -4926,7 +4926,7 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
if (unlikely(ret)) goto abort_locked; if (unlikely(ret)) goto abort_locked;
skip_fd: skip_fd:
ret = (*func)(ctx, args_k, count, ia64_task_regs(current)); ret = (*func)(ctx, args_k, count, task_pt_regs(current));
call_made = 1; call_made = 1;
...@@ -5050,7 +5050,7 @@ pfm_handle_work(void) ...@@ -5050,7 +5050,7 @@ pfm_handle_work(void)
pfm_clear_task_notify(); pfm_clear_task_notify();
regs = ia64_task_regs(current); regs = task_pt_regs(current);
/* /*
* extract reason for being here and clear * extract reason for being here and clear
...@@ -5794,7 +5794,7 @@ pfm_syst_wide_update_task(struct task_struct *task, unsigned long info, int is_c ...@@ -5794,7 +5794,7 @@ pfm_syst_wide_update_task(struct task_struct *task, unsigned long info, int is_c
* on every CPU, so we can rely on the pid to identify the idle task. * on every CPU, so we can rely on the pid to identify the idle task.
*/ */
if ((info & PFM_CPUINFO_EXCL_IDLE) == 0 || task->pid) { if ((info & PFM_CPUINFO_EXCL_IDLE) == 0 || task->pid) {
regs = ia64_task_regs(task); regs = task_pt_regs(task);
ia64_psr(regs)->pp = is_ctxswin ? dcr_pp : 0; ia64_psr(regs)->pp = is_ctxswin ? dcr_pp : 0;
return; return;
} }
...@@ -5877,7 +5877,7 @@ pfm_save_regs(struct task_struct *task) ...@@ -5877,7 +5877,7 @@ pfm_save_regs(struct task_struct *task)
flags = pfm_protect_ctx_ctxsw(ctx); flags = pfm_protect_ctx_ctxsw(ctx);
if (ctx->ctx_state == PFM_CTX_ZOMBIE) { if (ctx->ctx_state == PFM_CTX_ZOMBIE) {
struct pt_regs *regs = ia64_task_regs(task); struct pt_regs *regs = task_pt_regs(task);
pfm_clear_psr_up(); pfm_clear_psr_up();
...@@ -6077,7 +6077,7 @@ pfm_load_regs (struct task_struct *task) ...@@ -6077,7 +6077,7 @@ pfm_load_regs (struct task_struct *task)
BUG_ON(psr & IA64_PSR_I); BUG_ON(psr & IA64_PSR_I);
if (unlikely(ctx->ctx_state == PFM_CTX_ZOMBIE)) { if (unlikely(ctx->ctx_state == PFM_CTX_ZOMBIE)) {
struct pt_regs *regs = ia64_task_regs(task); struct pt_regs *regs = task_pt_regs(task);
BUG_ON(ctx->ctx_smpl_hdr); BUG_ON(ctx->ctx_smpl_hdr);
...@@ -6446,7 +6446,7 @@ pfm_alt_save_pmu_state(void *data) ...@@ -6446,7 +6446,7 @@ pfm_alt_save_pmu_state(void *data)
{ {
struct pt_regs *regs; struct pt_regs *regs;
regs = ia64_task_regs(current); regs = task_pt_regs(current);
DPRINT(("called\n")); DPRINT(("called\n"));
...@@ -6472,7 +6472,7 @@ pfm_alt_restore_pmu_state(void *data) ...@@ -6472,7 +6472,7 @@ pfm_alt_restore_pmu_state(void *data)
{ {
struct pt_regs *regs; struct pt_regs *regs;
regs = ia64_task_regs(current); regs = task_pt_regs(current);
DPRINT(("called\n")); DPRINT(("called\n"));
...@@ -6754,7 +6754,7 @@ dump_pmu_state(const char *from) ...@@ -6754,7 +6754,7 @@ dump_pmu_state(const char *from)
local_irq_save(flags); local_irq_save(flags);
this_cpu = smp_processor_id(); this_cpu = smp_processor_id();
regs = ia64_task_regs(current); regs = task_pt_regs(current);
info = PFM_CPUINFO_GET(); info = PFM_CPUINFO_GET();
dcr = ia64_getreg(_IA64_REG_CR_DCR); dcr = ia64_getreg(_IA64_REG_CR_DCR);
......
...@@ -328,7 +328,7 @@ ia64_save_extra (struct task_struct *task) ...@@ -328,7 +328,7 @@ ia64_save_extra (struct task_struct *task)
#endif #endif
#ifdef CONFIG_IA32_SUPPORT #ifdef CONFIG_IA32_SUPPORT
if (IS_IA32_PROCESS(ia64_task_regs(task))) if (IS_IA32_PROCESS(task_pt_regs(task)))
ia32_save_state(task); ia32_save_state(task);
#endif #endif
} }
...@@ -353,7 +353,7 @@ ia64_load_extra (struct task_struct *task) ...@@ -353,7 +353,7 @@ ia64_load_extra (struct task_struct *task)
#endif #endif
#ifdef CONFIG_IA32_SUPPORT #ifdef CONFIG_IA32_SUPPORT
if (IS_IA32_PROCESS(ia64_task_regs(task))) if (IS_IA32_PROCESS(task_pt_regs(task)))
ia32_load_state(task); ia32_load_state(task);
#endif #endif
} }
...@@ -488,7 +488,7 @@ copy_thread (int nr, unsigned long clone_flags, ...@@ -488,7 +488,7 @@ copy_thread (int nr, unsigned long clone_flags,
* If we're cloning an IA32 task then save the IA32 extra * If we're cloning an IA32 task then save the IA32 extra
* state from the current task to the new task * state from the current task to the new task
*/ */
if (IS_IA32_PROCESS(ia64_task_regs(current))) { if (IS_IA32_PROCESS(task_pt_regs(current))) {
ia32_save_state(p); ia32_save_state(p);
if (clone_flags & CLONE_SETTLS) if (clone_flags & CLONE_SETTLS)
retval = ia32_clone_tls(p, child_ptregs); retval = ia32_clone_tls(p, child_ptregs);
...@@ -701,7 +701,7 @@ int ...@@ -701,7 +701,7 @@ int
kernel_thread_helper (int (*fn)(void *), void *arg) kernel_thread_helper (int (*fn)(void *), void *arg)
{ {
#ifdef CONFIG_IA32_SUPPORT #ifdef CONFIG_IA32_SUPPORT
if (IS_IA32_PROCESS(ia64_task_regs(current))) { if (IS_IA32_PROCESS(task_pt_regs(current))) {
/* A kernel thread is always a 64-bit process. */ /* A kernel thread is always a 64-bit process. */
current->thread.map_base = DEFAULT_MAP_BASE; current->thread.map_base = DEFAULT_MAP_BASE;
current->thread.task_size = DEFAULT_TASK_SIZE; current->thread.task_size = DEFAULT_TASK_SIZE;
...@@ -722,7 +722,7 @@ flush_thread (void) ...@@ -722,7 +722,7 @@ flush_thread (void)
current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
ia64_drop_fpu(current); ia64_drop_fpu(current);
#ifdef CONFIG_IA32_SUPPORT #ifdef CONFIG_IA32_SUPPORT
if (IS_IA32_PROCESS(ia64_task_regs(current))) { if (IS_IA32_PROCESS(task_pt_regs(current))) {
ia32_drop_partial_page_list(current); ia32_drop_partial_page_list(current);
current->thread.task_size = IA32_PAGE_OFFSET; current->thread.task_size = IA32_PAGE_OFFSET;
set_fs(USER_DS); set_fs(USER_DS);
...@@ -755,7 +755,7 @@ exit_thread (void) ...@@ -755,7 +755,7 @@ exit_thread (void)
if (current->thread.flags & IA64_THREAD_DBG_VALID) if (current->thread.flags & IA64_THREAD_DBG_VALID)
pfm_release_debug_registers(current); pfm_release_debug_registers(current);
#endif #endif
if (IS_IA32_PROCESS(ia64_task_regs(current))) if (IS_IA32_PROCESS(task_pt_regs(current)))
ia32_drop_partial_page_list(current); ia32_drop_partial_page_list(current);
} }
......
...@@ -254,7 +254,7 @@ get_rnat (struct task_struct *task, struct switch_stack *sw, ...@@ -254,7 +254,7 @@ get_rnat (struct task_struct *task, struct switch_stack *sw,
long num_regs, nbits; long num_regs, nbits;
struct pt_regs *pt; struct pt_regs *pt;
pt = ia64_task_regs(task); pt = task_pt_regs(task);
kbsp = (unsigned long *) sw->ar_bspstore; kbsp = (unsigned long *) sw->ar_bspstore;
ubspstore = (unsigned long *) pt->ar_bspstore; ubspstore = (unsigned long *) pt->ar_bspstore;
...@@ -314,7 +314,7 @@ put_rnat (struct task_struct *task, struct switch_stack *sw, ...@@ -314,7 +314,7 @@ put_rnat (struct task_struct *task, struct switch_stack *sw,
struct pt_regs *pt; struct pt_regs *pt;
unsigned long cfm, *urbs_kargs; unsigned long cfm, *urbs_kargs;
pt = ia64_task_regs(task); pt = task_pt_regs(task);
kbsp = (unsigned long *) sw->ar_bspstore; kbsp = (unsigned long *) sw->ar_bspstore;
ubspstore = (unsigned long *) pt->ar_bspstore; ubspstore = (unsigned long *) pt->ar_bspstore;
...@@ -407,7 +407,7 @@ ia64_peek (struct task_struct *child, struct switch_stack *child_stack, ...@@ -407,7 +407,7 @@ ia64_peek (struct task_struct *child, struct switch_stack *child_stack,
urbs_end = (long *) user_rbs_end; urbs_end = (long *) user_rbs_end;
laddr = (unsigned long *) addr; laddr = (unsigned long *) addr;
child_regs = ia64_task_regs(child); child_regs = task_pt_regs(child);
bspstore = (unsigned long *) child_regs->ar_bspstore; bspstore = (unsigned long *) child_regs->ar_bspstore;
krbs = (unsigned long *) child + IA64_RBS_OFFSET/8; krbs = (unsigned long *) child + IA64_RBS_OFFSET/8;
if (on_kernel_rbs(addr, (unsigned long) bspstore, if (on_kernel_rbs(addr, (unsigned long) bspstore,
...@@ -467,7 +467,7 @@ ia64_poke (struct task_struct *child, struct switch_stack *child_stack, ...@@ -467,7 +467,7 @@ ia64_poke (struct task_struct *child, struct switch_stack *child_stack,
struct pt_regs *child_regs; struct pt_regs *child_regs;
laddr = (unsigned long *) addr; laddr = (unsigned long *) addr;
child_regs = ia64_task_regs(child); child_regs = task_pt_regs(child);
bspstore = (unsigned long *) child_regs->ar_bspstore; bspstore = (unsigned long *) child_regs->ar_bspstore;
krbs = (unsigned long *) child + IA64_RBS_OFFSET/8; krbs = (unsigned long *) child + IA64_RBS_OFFSET/8;
if (on_kernel_rbs(addr, (unsigned long) bspstore, if (on_kernel_rbs(addr, (unsigned long) bspstore,
...@@ -567,7 +567,7 @@ thread_matches (struct task_struct *thread, unsigned long addr) ...@@ -567,7 +567,7 @@ thread_matches (struct task_struct *thread, unsigned long addr)
*/ */
return 0; return 0;
thread_regs = ia64_task_regs(thread); thread_regs = task_pt_regs(thread);
thread_rbs_end = ia64_get_user_rbs_end(thread, thread_regs, NULL); thread_rbs_end = ia64_get_user_rbs_end(thread, thread_regs, NULL);
if (!on_kernel_rbs(addr, thread_regs->ar_bspstore, thread_rbs_end)) if (!on_kernel_rbs(addr, thread_regs->ar_bspstore, thread_rbs_end))
return 0; return 0;
...@@ -627,7 +627,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr) ...@@ -627,7 +627,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr)
inline void inline void
ia64_flush_fph (struct task_struct *task) ia64_flush_fph (struct task_struct *task)
{ {
struct ia64_psr *psr = ia64_psr(ia64_task_regs(task)); struct ia64_psr *psr = ia64_psr(task_pt_regs(task));
/* /*
* Prevent migrating this task while * Prevent migrating this task while
...@@ -653,7 +653,7 @@ ia64_flush_fph (struct task_struct *task) ...@@ -653,7 +653,7 @@ ia64_flush_fph (struct task_struct *task)
void void
ia64_sync_fph (struct task_struct *task) ia64_sync_fph (struct task_struct *task)
{ {
struct ia64_psr *psr = ia64_psr(ia64_task_regs(task)); struct ia64_psr *psr = ia64_psr(task_pt_regs(task));
ia64_flush_fph(task); ia64_flush_fph(task);
if (!(task->thread.flags & IA64_THREAD_FPH_VALID)) { if (!(task->thread.flags & IA64_THREAD_FPH_VALID)) {
...@@ -794,7 +794,7 @@ access_uarea (struct task_struct *child, unsigned long addr, ...@@ -794,7 +794,7 @@ access_uarea (struct task_struct *child, unsigned long addr,
+ offsetof(struct pt_regs, reg))) + offsetof(struct pt_regs, reg)))
pt = ia64_task_regs(child); pt = task_pt_regs(child);
sw = (struct switch_stack *) (child->thread.ksp + 16); sw = (struct switch_stack *) (child->thread.ksp + 16);
if ((addr & 0x7) != 0) { if ((addr & 0x7) != 0) {
...@@ -1120,7 +1120,7 @@ ptrace_getregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) ...@@ -1120,7 +1120,7 @@ ptrace_getregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
if (!access_ok(VERIFY_WRITE, ppr, sizeof(struct pt_all_user_regs))) if (!access_ok(VERIFY_WRITE, ppr, sizeof(struct pt_all_user_regs)))
return -EIO; return -EIO;
pt = ia64_task_regs(child); pt = task_pt_regs(child);
sw = (struct switch_stack *) (child->thread.ksp + 16); sw = (struct switch_stack *) (child->thread.ksp + 16);
unw_init_from_blocked_task(&info, child); unw_init_from_blocked_task(&info, child);
if (unw_unwind_to_user(&info) < 0) { if (unw_unwind_to_user(&info) < 0) {
...@@ -1265,7 +1265,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) ...@@ -1265,7 +1265,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
if (!access_ok(VERIFY_READ, ppr, sizeof(struct pt_all_user_regs))) if (!access_ok(VERIFY_READ, ppr, sizeof(struct pt_all_user_regs)))
return -EIO; return -EIO;
pt = ia64_task_regs(child); pt = task_pt_regs(child);
sw = (struct switch_stack *) (child->thread.ksp + 16); sw = (struct switch_stack *) (child->thread.ksp + 16);
unw_init_from_blocked_task(&info, child); unw_init_from_blocked_task(&info, child);
if (unw_unwind_to_user(&info) < 0) { if (unw_unwind_to_user(&info) < 0) {
...@@ -1403,7 +1403,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) ...@@ -1403,7 +1403,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
void void
ptrace_disable (struct task_struct *child) ptrace_disable (struct task_struct *child)
{ {
struct ia64_psr *child_psr = ia64_psr(ia64_task_regs(child)); struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
/* make sure the single step/taken-branch trap bits are not set: */ /* make sure the single step/taken-branch trap bits are not set: */
child_psr->ss = 0; child_psr->ss = 0;
...@@ -1456,7 +1456,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data) ...@@ -1456,7 +1456,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
if (ret < 0) if (ret < 0)
goto out_tsk; goto out_tsk;
pt = ia64_task_regs(child); pt = task_pt_regs(child);
sw = (struct switch_stack *) (child->thread.ksp + 16); sw = (struct switch_stack *) (child->thread.ksp + 16);
switch (request) { switch (request) {
...