diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-05-15 12:26:03 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-06-19 12:39:18 -0400 |
commit | eae89076e696f51762d81d6e2538c3beb59fa7bd (patch) | |
tree | 7aab0972d6786721eb6c9b01d77a1b5f13263c49 /include/asm-mips | |
parent | 5deee2dbf495b2693629f7e8f846483432096278 (diff) |
[MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs.
The struct mips_fpu_soft_struct and mips_fpu_hard_struct are
completely same now and the kernel fpu emulator assumes that. This
patch unifies them to mips_fpu_struct and get rid of mips_fpu_union.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/fpu.h | 3 | ||||
-rw-r--r-- | include/asm-mips/fpu_emulator.h | 4 | ||||
-rw-r--r-- | include/asm-mips/processor.h | 16 |
3 files changed, 6 insertions, 17 deletions
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index b0f50015e252..8bf510a27c64 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h | |||
@@ -138,10 +138,9 @@ static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) | |||
138 | if (cpu_has_fpu) { | 138 | if (cpu_has_fpu) { |
139 | if ((tsk == current) && __is_fpu_owner()) | 139 | if ((tsk == current) && __is_fpu_owner()) |
140 | _save_fp(current); | 140 | _save_fp(current); |
141 | return tsk->thread.fpu.hard.fpr; | ||
142 | } | 141 | } |
143 | 142 | ||
144 | return tsk->thread.fpu.soft.fpr; | 143 | return tsk->thread.fpu.fpr; |
145 | } | 144 | } |
146 | 145 | ||
147 | #endif /* _ASM_FPU_H */ | 146 | #endif /* _ASM_FPU_H */ |
diff --git a/include/asm-mips/fpu_emulator.h b/include/asm-mips/fpu_emulator.h index 16cb4d11dd0b..2731c38bd7ae 100644 --- a/include/asm-mips/fpu_emulator.h +++ b/include/asm-mips/fpu_emulator.h | |||
@@ -12,8 +12,8 @@ | |||
12 | * with this program; if not, write to the Free Software Foundation, Inc., | 12 | * with this program; if not, write to the Free Software Foundation, Inc., |
13 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 13 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
14 | * | 14 | * |
15 | * Further private data for which no space exists in mips_fpu_soft_struct. | 15 | * Further private data for which no space exists in mips_fpu_struct. |
16 | * This should be subsumed into the mips_fpu_soft_struct structure as | 16 | * This should be subsumed into the mips_fpu_struct structure as |
17 | * defined in processor.h as soon as the absurd wired absolute assembler | 17 | * defined in processor.h as soon as the absurd wired absolute assembler |
18 | * offsets become dynamic at compile time. | 18 | * offsets become dynamic at compile time. |
19 | * | 19 | * |
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 0fb75f0762e0..83936469fe87 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -71,11 +71,6 @@ extern unsigned int vced_count, vcei_count; | |||
71 | 71 | ||
72 | typedef __u64 fpureg_t; | 72 | typedef __u64 fpureg_t; |
73 | 73 | ||
74 | struct mips_fpu_hard_struct { | ||
75 | fpureg_t fpr[NUM_FPU_REGS]; | ||
76 | unsigned int fcr31; | ||
77 | }; | ||
78 | |||
79 | /* | 74 | /* |
80 | * It would be nice to add some more fields for emulator statistics, but there | 75 | * It would be nice to add some more fields for emulator statistics, but there |
81 | * are a number of fixed offsets in offset.h and elsewhere that would have to | 76 | * are a number of fixed offsets in offset.h and elsewhere that would have to |
@@ -83,18 +78,13 @@ struct mips_fpu_hard_struct { | |||
83 | * the FPU emulator for now. See asm-mips/fpu_emulator.h. | 78 | * the FPU emulator for now. See asm-mips/fpu_emulator.h. |
84 | */ | 79 | */ |
85 | 80 | ||
86 | struct mips_fpu_soft_struct { | 81 | struct mips_fpu_struct { |
87 | fpureg_t fpr[NUM_FPU_REGS]; | 82 | fpureg_t fpr[NUM_FPU_REGS]; |
88 | unsigned int fcr31; | 83 | unsigned int fcr31; |
89 | }; | 84 | }; |
90 | 85 | ||
91 | union mips_fpu_union { | ||
92 | struct mips_fpu_hard_struct hard; | ||
93 | struct mips_fpu_soft_struct soft; | ||
94 | }; | ||
95 | |||
96 | #define INIT_FPU { \ | 86 | #define INIT_FPU { \ |
97 | {{0,},} \ | 87 | {0,} \ |
98 | } | 88 | } |
99 | 89 | ||
100 | #define NUM_DSP_REGS 6 | 90 | #define NUM_DSP_REGS 6 |
@@ -133,7 +123,7 @@ struct thread_struct { | |||
133 | unsigned long cp0_status; | 123 | unsigned long cp0_status; |
134 | 124 | ||
135 | /* Saved fpu/fpu emulator stuff. */ | 125 | /* Saved fpu/fpu emulator stuff. */ |
136 | union mips_fpu_union fpu; | 126 | struct mips_fpu_struct fpu; |
137 | #ifdef CONFIG_MIPS_MT_FPAFF | 127 | #ifdef CONFIG_MIPS_MT_FPAFF |
138 | /* Emulated instruction count */ | 128 | /* Emulated instruction count */ |
139 | unsigned long emulated_fp; | 129 | unsigned long emulated_fp; |