diff options
| -rw-r--r-- | arch/mips/kernel/cpu-probe.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 234c7f5005fb..c8c47a2d1972 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
| @@ -922,6 +922,14 @@ __init void cpu_probe(void) | |||
| 922 | default: | 922 | default: |
| 923 | c->cputype = CPU_UNKNOWN; | 923 | c->cputype = CPU_UNKNOWN; |
| 924 | } | 924 | } |
| 925 | |||
| 926 | /* | ||
| 927 | * Platform code can force the cpu type to optimize code | ||
| 928 | * generation. In that case be sure the cpu type is correctly | ||
| 929 | * manually setup otherwise it could trigger some nasty bugs. | ||
| 930 | */ | ||
| 931 | BUG_ON(current_cpu_type() != c->cputype); | ||
| 932 | |||
| 925 | if (c->options & MIPS_CPU_FPU) { | 933 | if (c->options & MIPS_CPU_FPU) { |
| 926 | c->fpu_id = cpu_get_fpu_id(); | 934 | c->fpu_id = cpu_get_fpu_id(); |
| 927 | 935 | ||
