mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
MIPS: nofpu and nodsp only affect CPU0
The "nofpu" and "nodsp" kernel command line options currently do not affect CPUs that are brought online later in the boot process or hotplugged at runtime. It is desirable to apply the nofpu/nodsp options to all CPUs in the system, so that surprising results are not seen when a process migrates from one CPU to another. [Ralf: Moved definitions of mips_fpu_disabled, fpu_disable, mips_dsp_disabled and dsp_disable from setup.c to cpu-probe.c to allow making mips_fpu_disabled and mips_dsp_disabled static.] Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: http://patchwork.linux-mips.org/patch/1169/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
4f1e099582
commit
0103d23f44
@ -125,6 +125,30 @@ static int __init wait_disable(char *s)
|
||||
|
||||
__setup("nowait", wait_disable);
|
||||
|
||||
static int __cpuinitdata mips_fpu_disabled;
|
||||
|
||||
static int __init fpu_disable(char *s)
|
||||
{
|
||||
cpu_data[0].options &= ~MIPS_CPU_FPU;
|
||||
mips_fpu_disabled = 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("nofpu", fpu_disable);
|
||||
|
||||
int __cpuinitdata mips_dsp_disabled;
|
||||
|
||||
static int __init dsp_disable(char *s)
|
||||
{
|
||||
cpu_data[0].ases &= ~MIPS_ASE_DSP;
|
||||
mips_dsp_disabled = 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("nodsp", dsp_disable);
|
||||
|
||||
void __init check_wait(void)
|
||||
{
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
@ -982,6 +1006,12 @@ __cpuinit void cpu_probe(void)
|
||||
*/
|
||||
BUG_ON(current_cpu_type() != c->cputype);
|
||||
|
||||
if (mips_fpu_disabled)
|
||||
c->options &= ~MIPS_CPU_FPU;
|
||||
|
||||
if (mips_dsp_disabled)
|
||||
c->ases &= ~MIPS_ASE_DSP;
|
||||
|
||||
if (c->options & MIPS_CPU_FPU) {
|
||||
c->fpu_id = cpu_get_fpu_id();
|
||||
|
||||
|
@ -569,27 +569,6 @@ void __init setup_arch(char **cmdline_p)
|
||||
plat_smp_setup();
|
||||
}
|
||||
|
||||
static int __init fpu_disable(char *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NR_CPUS; i++)
|
||||
cpu_data[i].options &= ~MIPS_CPU_FPU;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("nofpu", fpu_disable);
|
||||
|
||||
static int __init dsp_disable(char *s)
|
||||
{
|
||||
cpu_data[0].ases &= ~MIPS_ASE_DSP;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("nodsp", dsp_disable);
|
||||
|
||||
unsigned long kernelsp[NR_CPUS];
|
||||
unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user