File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,15 @@ config SMP
188
188
189
189
If you don't know what to do here, say N.
190
190
191
+ config FPU
192
+ bool "FPU support"
193
+ default y
194
+ help
195
+ Say N here if you want to disable all floating-point related procedures
196
+ in the kernel and reduce binary size.
197
+
198
+ If you don't know what to do here, say Y.
199
+
191
200
source "kernel/Kconfig.hz"
192
201
193
202
config OPENRISC_NO_SPR_SR_DSX
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ static int genregs_set(struct task_struct *target,
88
88
return ret ;
89
89
}
90
90
91
+ #ifdef CONFIG_FPU
91
92
/*
92
93
* As OpenRISC shares GPRs and floating point registers we don't need to export
93
94
* the floating point registers again. So here we only export the fpcsr special
@@ -115,13 +116,16 @@ static int fpregs_set(struct task_struct *target,
115
116
& regs -> fpcsr , 0 , 4 );
116
117
return ret ;
117
118
}
119
+ #endif
118
120
119
121
/*
120
122
* Define the register sets available on OpenRISC under Linux
121
123
*/
122
124
enum or1k_regset {
123
125
REGSET_GENERAL ,
126
+ #ifdef CONFIG_FPU
124
127
REGSET_FPU ,
128
+ #endif
125
129
};
126
130
127
131
static const struct user_regset or1k_regsets [] = {
@@ -133,6 +137,7 @@ static const struct user_regset or1k_regsets[] = {
133
137
.regset_get = genregs_get ,
134
138
.set = genregs_set ,
135
139
},
140
+ #ifdef CONFIG_FPU
136
141
[REGSET_FPU ] = {
137
142
.core_note_type = NT_PRFPREG ,
138
143
.n = sizeof (struct __or1k_fpu_state ) / sizeof (long ),
@@ -141,6 +146,7 @@ static const struct user_regset or1k_regsets[] = {
141
146
.regset_get = fpregs_get ,
142
147
.set = fpregs_set ,
143
148
},
149
+ #endif
144
150
};
145
151
146
152
static const struct user_regset_view user_or1k_native_view = {
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address)
182
182
{
183
183
if (user_mode (regs )) {
184
184
int code = FPE_FLTUNK ;
185
+ #ifdef CONFIG_FPU
185
186
unsigned long fpcsr = regs -> fpcsr ;
186
187
187
188
if (fpcsr & SPR_FPCSR_IVF )
@@ -197,7 +198,7 @@ asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address)
197
198
198
199
/* Clear all flags */
199
200
regs -> fpcsr &= ~SPR_FPCSR_ALLF ;
200
-
201
+ #endif
201
202
force_sig_fault (SIGFPE , code , (void __user * )regs -> pc );
202
203
} else {
203
204
pr_emerg ("KERNEL: Illegal fpe exception 0x%.8lx\n" , regs -> pc );
You can’t perform that action at this time.
0 commit comments