diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/sh5/fpu.c | 12 | ||||
-rw-r--r-- | arch/sh/kernel/process_64.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace_64.c | 10 | ||||
-rw-r--r-- | arch/sh/kernel/signal_64.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/traps_64.c | 28 |
5 files changed, 28 insertions, 28 deletions
diff --git a/arch/sh/kernel/cpu/sh5/fpu.c b/arch/sh/kernel/cpu/sh5/fpu.c index 4648ccee6c4d..92df285fbe4b 100644 --- a/arch/sh/kernel/cpu/sh5/fpu.c +++ b/arch/sh/kernel/cpu/sh5/fpu.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #define sNAN64 0xFFFFFFFFFFFFFFFFULL | 27 | #define sNAN64 0xFFFFFFFFFFFFFFFFULL |
28 | #define sNAN32 0xFFFFFFFFUL | 28 | #define sNAN32 0xFFFFFFFFUL |
29 | 29 | ||
30 | static union sh_fpu_union init_fpuregs = { | 30 | static union thread_xstate init_fpuregs = { |
31 | .hard = { | 31 | .hardfpu = { |
32 | .fp_regs = { [0 ... 63] = sNAN32 }, | 32 | .fp_regs = { [0 ... 63] = sNAN32 }, |
33 | .fpscr = FPSCR_INIT | 33 | .fpscr = FPSCR_INIT |
34 | } | 34 | } |
@@ -72,7 +72,7 @@ void save_fpu(struct task_struct *tsk) | |||
72 | "fgetscr fr63\n\t" | 72 | "fgetscr fr63\n\t" |
73 | "fst.s %0, (32*8), fr63\n\t" | 73 | "fst.s %0, (32*8), fr63\n\t" |
74 | : /* no output */ | 74 | : /* no output */ |
75 | : "r" (&tsk->thread.fpu.hard) | 75 | : "r" (&tsk->thread.xstate->hardfpu) |
76 | : "memory"); | 76 | : "memory"); |
77 | } | 77 | } |
78 | 78 | ||
@@ -121,7 +121,7 @@ fpload(struct sh_fpu_hard_struct *fpregs) | |||
121 | 121 | ||
122 | void fpinit(struct sh_fpu_hard_struct *fpregs) | 122 | void fpinit(struct sh_fpu_hard_struct *fpregs) |
123 | { | 123 | { |
124 | *fpregs = init_fpuregs.hard; | 124 | *fpregs = init_fpuregs.hardfpu; |
125 | } | 125 | } |
126 | 126 | ||
127 | asmlinkage void | 127 | asmlinkage void |
@@ -157,10 +157,10 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs) | |||
157 | 157 | ||
158 | last_task_used_math = current; | 158 | last_task_used_math = current; |
159 | if (used_math()) { | 159 | if (used_math()) { |
160 | fpload(¤t->thread.fpu.hard); | 160 | fpload(¤t->thread.xstate->hardfpu); |
161 | } else { | 161 | } else { |
162 | /* First time FPU user. */ | 162 | /* First time FPU user. */ |
163 | fpload(&init_fpuregs.hard); | 163 | fpload(&init_fpuregs.hardfpu); |
164 | set_used_math(); | 164 | set_used_math(); |
165 | } | 165 | } |
166 | disable_fpu(); | 166 | disable_fpu(); |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index 31f80c61b031..c9554a70bd0e 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -410,7 +410,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | |||
410 | regs->sr |= SR_FD; | 410 | regs->sr |= SR_FD; |
411 | } | 411 | } |
412 | 412 | ||
413 | memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); | 413 | memcpy(fpu, &tsk->thread.xstate->hardfpu, sizeof(*fpu)); |
414 | } | 414 | } |
415 | 415 | ||
416 | return fpvalid; | 416 | return fpvalid; |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 873ebdc4f98e..67fbcee89e7e 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -88,7 +88,7 @@ get_fpu_long(struct task_struct *task, unsigned long addr) | |||
88 | regs->sr |= SR_FD; | 88 | regs->sr |= SR_FD; |
89 | } | 89 | } |
90 | 90 | ||
91 | tmp = ((long *)&task->thread.fpu)[addr / sizeof(unsigned long)]; | 91 | tmp = ((long *)task->thread.xstate)[addr / sizeof(unsigned long)]; |
92 | return tmp; | 92 | return tmp; |
93 | } | 93 | } |
94 | 94 | ||
@@ -114,7 +114,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data) | |||
114 | regs = (struct pt_regs*)((unsigned char *)task + THREAD_SIZE) - 1; | 114 | regs = (struct pt_regs*)((unsigned char *)task + THREAD_SIZE) - 1; |
115 | 115 | ||
116 | if (!tsk_used_math(task)) { | 116 | if (!tsk_used_math(task)) { |
117 | fpinit(&task->thread.fpu.hard); | 117 | fpinit(&task->thread.xstate->hardfpu); |
118 | set_stopped_child_used_math(task); | 118 | set_stopped_child_used_math(task); |
119 | } else if (last_task_used_math == task) { | 119 | } else if (last_task_used_math == task) { |
120 | enable_fpu(); | 120 | enable_fpu(); |
@@ -124,7 +124,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data) | |||
124 | regs->sr |= SR_FD; | 124 | regs->sr |= SR_FD; |
125 | } | 125 | } |
126 | 126 | ||
127 | ((long *)&task->thread.fpu)[addr / sizeof(unsigned long)] = data; | 127 | ((long *)task->thread.xstate)[addr / sizeof(unsigned long)] = data; |
128 | return 0; | 128 | return 0; |
129 | } | 129 | } |
130 | 130 | ||
@@ -222,7 +222,7 @@ int fpregs_get(struct task_struct *target, | |||
222 | return ret; | 222 | return ret; |
223 | 223 | ||
224 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 224 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
225 | &target->thread.fpu.hard, 0, -1); | 225 | &target->thread.xstate->hardfpu, 0, -1); |
226 | } | 226 | } |
227 | 227 | ||
228 | static int fpregs_set(struct task_struct *target, | 228 | static int fpregs_set(struct task_struct *target, |
@@ -239,7 +239,7 @@ static int fpregs_set(struct task_struct *target, | |||
239 | set_stopped_child_used_math(target); | 239 | set_stopped_child_used_math(target); |
240 | 240 | ||
241 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, | 241 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
242 | &target->thread.fpu.hard, 0, -1); | 242 | &target->thread.xstate->hardfpu, 0, -1); |
243 | } | 243 | } |
244 | 244 | ||
245 | static int fpregs_active(struct task_struct *target, | 245 | static int fpregs_active(struct task_struct *target, |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index ce76dbdef294..4733bfc59d39 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
@@ -295,7 +295,7 @@ restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) | |||
295 | regs->sr |= SR_FD; | 295 | regs->sr |= SR_FD; |
296 | } | 296 | } |
297 | 297 | ||
298 | err |= __copy_from_user(¤t->thread.fpu.hard, &sc->sc_fpregs[0], | 298 | err |= __copy_from_user(¤t->thread.xstate->hardfpu, &sc->sc_fpregs[0], |
299 | (sizeof(long long) * 32) + (sizeof(int) * 1)); | 299 | (sizeof(long long) * 32) + (sizeof(int) * 1)); |
300 | 300 | ||
301 | return err; | 301 | return err; |
@@ -320,7 +320,7 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) | |||
320 | regs->sr |= SR_FD; | 320 | regs->sr |= SR_FD; |
321 | } | 321 | } |
322 | 322 | ||
323 | err |= __copy_to_user(&sc->sc_fpregs[0], ¤t->thread.fpu.hard, | 323 | err |= __copy_to_user(&sc->sc_fpregs[0], ¤t->thread.xstate->hardfpu, |
324 | (sizeof(long long) * 32) + (sizeof(int) * 1)); | 324 | (sizeof(long long) * 32) + (sizeof(int) * 1)); |
325 | clear_used_math(); | 325 | clear_used_math(); |
326 | 326 | ||
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c index d86f5315a0c1..e3f92eb05ffd 100644 --- a/arch/sh/kernel/traps_64.c +++ b/arch/sh/kernel/traps_64.c | |||
@@ -611,19 +611,19 @@ static int misaligned_fpu_load(struct pt_regs *regs, | |||
611 | 611 | ||
612 | switch (width_shift) { | 612 | switch (width_shift) { |
613 | case 2: | 613 | case 2: |
614 | current->thread.fpu.hard.fp_regs[destreg] = buflo; | 614 | current->thread.xstate->hardfpu.fp_regs[destreg] = buflo; |
615 | break; | 615 | break; |
616 | case 3: | 616 | case 3: |
617 | if (do_paired_load) { | 617 | if (do_paired_load) { |
618 | current->thread.fpu.hard.fp_regs[destreg] = buflo; | 618 | current->thread.xstate->hardfpu.fp_regs[destreg] = buflo; |
619 | current->thread.fpu.hard.fp_regs[destreg+1] = bufhi; | 619 | current->thread.xstate->hardfpu.fp_regs[destreg+1] = bufhi; |
620 | } else { | 620 | } else { |
621 | #if defined(CONFIG_CPU_LITTLE_ENDIAN) | 621 | #if defined(CONFIG_CPU_LITTLE_ENDIAN) |
622 | current->thread.fpu.hard.fp_regs[destreg] = bufhi; | 622 | current->thread.xstate->hardfpu.fp_regs[destreg] = bufhi; |
623 | current->thread.fpu.hard.fp_regs[destreg+1] = buflo; | 623 | current->thread.xstate->hardfpu.fp_regs[destreg+1] = buflo; |
624 | #else | 624 | #else |
625 | current->thread.fpu.hard.fp_regs[destreg] = buflo; | 625 | current->thread.xstate->hardfpu.fp_regs[destreg] = buflo; |
626 | current->thread.fpu.hard.fp_regs[destreg+1] = bufhi; | 626 | current->thread.xstate->hardfpu.fp_regs[destreg+1] = bufhi; |
627 | #endif | 627 | #endif |
628 | } | 628 | } |
629 | break; | 629 | break; |
@@ -681,19 +681,19 @@ static int misaligned_fpu_store(struct pt_regs *regs, | |||
681 | 681 | ||
682 | switch (width_shift) { | 682 | switch (width_shift) { |
683 | case 2: | 683 | case 2: |
684 | buflo = current->thread.fpu.hard.fp_regs[srcreg]; | 684 | buflo = current->thread.xstate->hardfpu.fp_regs[srcreg]; |
685 | break; | 685 | break; |
686 | case 3: | 686 | case 3: |
687 | if (do_paired_load) { | 687 | if (do_paired_load) { |
688 | buflo = current->thread.fpu.hard.fp_regs[srcreg]; | 688 | buflo = current->thread.xstate->hardfpu.fp_regs[srcreg]; |
689 | bufhi = current->thread.fpu.hard.fp_regs[srcreg+1]; | 689 | bufhi = current->thread.xstate->hardfpu.fp_regs[srcreg+1]; |
690 | } else { | 690 | } else { |
691 | #if defined(CONFIG_CPU_LITTLE_ENDIAN) | 691 | #if defined(CONFIG_CPU_LITTLE_ENDIAN) |
692 | bufhi = current->thread.fpu.hard.fp_regs[srcreg]; | 692 | bufhi = current->thread.xstate->hardfpu.fp_regs[srcreg]; |
693 | buflo = current->thread.fpu.hard.fp_regs[srcreg+1]; | 693 | buflo = current->thread.xstate->hardfpu.fp_regs[srcreg+1]; |
694 | #else | 694 | #else |
695 | buflo = current->thread.fpu.hard.fp_regs[srcreg]; | 695 | buflo = current->thread.xstate->hardfpu.fp_regs[srcreg]; |
696 | bufhi = current->thread.fpu.hard.fp_regs[srcreg+1]; | 696 | bufhi = current->thread.xstate->hardfpu.fp_regs[srcreg+1]; |
697 | #endif | 697 | #endif |
698 | } | 698 | } |
699 | break; | 699 | break; |