cpu-probe.c 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. /*
  2. * Processor capabilities determination functions.
  3. *
  4. * Copyright (C) xxxx the Anonymous
  5. * Copyright (C) 1994 - 2006 Ralf Baechle
  6. * Copyright (C) 2003, 2004 Maciej W. Rozycki
  7. * Copyright (C) 2001, 2004 MIPS Inc.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version
  12. * 2 of the License, or (at your option) any later version.
  13. */
  14. #include <linux/init.h>
  15. #include <linux/kernel.h>
  16. #include <linux/ptrace.h>
  17. #include <linux/smp.h>
  18. #include <linux/stddef.h>
  19. #include <linux/export.h>
  20. #include <asm/bugs.h>
  21. #include <asm/cpu.h>
  22. #include <asm/fpu.h>
  23. #include <asm/mipsregs.h>
  24. #include <asm/system.h>
  25. #include <asm/watch.h>
  26. #include <asm/elf.h>
  27. #include <asm/spram.h>
  28. #include <asm/uaccess.h>
  29. /*
  30. * Not all of the MIPS CPUs have the "wait" instruction available. Moreover,
  31. * the implementation of the "wait" feature differs between CPU families. This
  32. * points to the function that implements CPU specific wait.
  33. * The wait instruction stops the pipeline and reduces the power consumption of
  34. * the CPU very much.
  35. */
  36. void (*cpu_wait)(void);
  37. EXPORT_SYMBOL(cpu_wait);
  38. static void r3081_wait(void)
  39. {
  40. unsigned long cfg = read_c0_conf();
  41. write_c0_conf(cfg | R30XX_CONF_HALT);
  42. }
  43. static void r39xx_wait(void)
  44. {
  45. local_irq_disable();
  46. if (!need_resched())
  47. write_c0_conf(read_c0_conf() | TX39_CONF_HALT);
  48. local_irq_enable();
  49. }
  50. extern void r4k_wait(void);
  51. /*
  52. * This variant is preferable as it allows testing need_resched and going to
  53. * sleep depending on the outcome atomically. Unfortunately the "It is
  54. * implementation-dependent whether the pipeline restarts when a non-enabled
  55. * interrupt is requested" restriction in the MIPS32/MIPS64 architecture makes
  56. * using this version a gamble.
  57. */
  58. void r4k_wait_irqoff(void)
  59. {
  60. local_irq_disable();
  61. if (!need_resched())
  62. __asm__(" .set push \n"
  63. " .set mips3 \n"
  64. " wait \n"
  65. " .set pop \n");
  66. local_irq_enable();
  67. __asm__(" .globl __pastwait \n"
  68. "__pastwait: \n");
  69. }
  70. /*
  71. * The RM7000 variant has to handle erratum 38. The workaround is to not
  72. * have any pending stores when the WAIT instruction is executed.
  73. */
  74. static void rm7k_wait_irqoff(void)
  75. {
  76. local_irq_disable();
  77. if (!need_resched())
  78. __asm__(
  79. " .set push \n"
  80. " .set mips3 \n"
  81. " .set noat \n"
  82. " mfc0 $1, $12 \n"
  83. " sync \n"
  84. " mtc0 $1, $12 # stalls until W stage \n"
  85. " wait \n"
  86. " mtc0 $1, $12 # stalls until W stage \n"
  87. " .set pop \n");
  88. local_irq_enable();
  89. }
  90. /*
  91. * The Au1xxx wait is available only if using 32khz counter or
  92. * external timer source, but specifically not CP0 Counter.
  93. * alchemy/common/time.c may override cpu_wait!
  94. */
  95. static void au1k_wait(void)
  96. {
  97. __asm__(" .set mips3 \n"
  98. " cache 0x14, 0(%0) \n"
  99. " cache 0x14, 32(%0) \n"
  100. " sync \n"
  101. " nop \n"
  102. " wait \n"
  103. " nop \n"
  104. " nop \n"
  105. " nop \n"
  106. " nop \n"
  107. " .set mips0 \n"
  108. : : "r" (au1k_wait));
  109. }
  110. static int __initdata nowait;
  111. static int __init wait_disable(char *s)
  112. {
  113. nowait = 1;
  114. return 1;
  115. }
  116. __setup("nowait", wait_disable);
  117. static int __cpuinitdata mips_fpu_disabled;
  118. static int __init fpu_disable(char *s)
  119. {
  120. cpu_data[0].options &= ~MIPS_CPU_FPU;
  121. mips_fpu_disabled = 1;
  122. return 1;
  123. }
  124. __setup("nofpu", fpu_disable);
  125. int __cpuinitdata mips_dsp_disabled;
  126. static int __init dsp_disable(char *s)
  127. {
  128. cpu_data[0].ases &= ~MIPS_ASE_DSP;
  129. mips_dsp_disabled = 1;
  130. return 1;
  131. }
  132. __setup("nodsp", dsp_disable);
  133. void __init check_wait(void)
  134. {
  135. struct cpuinfo_mips *c = &current_cpu_data;
  136. if (nowait) {
  137. printk("Wait instruction disabled.\n");
  138. return;
  139. }
  140. switch (c->cputype) {
  141. case CPU_R3081:
  142. case CPU_R3081E:
  143. cpu_wait = r3081_wait;
  144. break;
  145. case CPU_TX3927:
  146. cpu_wait = r39xx_wait;
  147. break;
  148. case CPU_R4200:
  149. /* case CPU_R4300: */
  150. case CPU_R4600:
  151. case CPU_R4640:
  152. case CPU_R4650:
  153. case CPU_R4700:
  154. case CPU_R5000:
  155. case CPU_R5500:
  156. case CPU_NEVADA:
  157. case CPU_4KC:
  158. case CPU_4KEC:
  159. case CPU_4KSC:
  160. case CPU_5KC:
  161. case CPU_25KF:
  162. case CPU_PR4450:
  163. case CPU_BMIPS3300:
  164. case CPU_BMIPS4350:
  165. case CPU_BMIPS4380:
  166. case CPU_BMIPS5000:
  167. case CPU_CAVIUM_OCTEON:
  168. case CPU_CAVIUM_OCTEON_PLUS:
  169. case CPU_CAVIUM_OCTEON2:
  170. case CPU_JZRISC:
  171. case CPU_XLR:
  172. case CPU_XLP:
  173. cpu_wait = r4k_wait;
  174. break;
  175. case CPU_RM7000:
  176. cpu_wait = rm7k_wait_irqoff;
  177. break;
  178. case CPU_24K:
  179. case CPU_34K:
  180. case CPU_1004K:
  181. cpu_wait = r4k_wait;
  182. if (read_c0_config7() & MIPS_CONF7_WII)
  183. cpu_wait = r4k_wait_irqoff;
  184. break;
  185. case CPU_74K:
  186. cpu_wait = r4k_wait;
  187. if ((c->processor_id & 0xff) >= PRID_REV_ENCODE_332(2, 1, 0))
  188. cpu_wait = r4k_wait_irqoff;
  189. break;
  190. case CPU_TX49XX:
  191. cpu_wait = r4k_wait_irqoff;
  192. break;
  193. case CPU_ALCHEMY:
  194. cpu_wait = au1k_wait;
  195. break;
  196. case CPU_20KC:
  197. /*
  198. * WAIT on Rev1.0 has E1, E2, E3 and E16.
  199. * WAIT on Rev2.0 and Rev3.0 has E16.
  200. * Rev3.1 WAIT is nop, why bother
  201. */
  202. if ((c->processor_id & 0xff) <= 0x64)
  203. break;
  204. /*
  205. * Another rev is incremeting c0_count at a reduced clock
  206. * rate while in WAIT mode. So we basically have the choice
  207. * between using the cp0 timer as clocksource or avoiding
  208. * the WAIT instruction. Until more details are known,
  209. * disable the use of WAIT for 20Kc entirely.
  210. cpu_wait = r4k_wait;
  211. */
  212. break;
  213. case CPU_RM9000:
  214. if ((c->processor_id & 0x00ff) >= 0x40)
  215. cpu_wait = r4k_wait;
  216. break;
  217. default:
  218. break;
  219. }
  220. }
  221. static inline void check_errata(void)
  222. {
  223. struct cpuinfo_mips *c = &current_cpu_data;
  224. switch (c->cputype) {
  225. case CPU_34K:
  226. /*
  227. * Erratum "RPS May Cause Incorrect Instruction Execution"
  228. * This code only handles VPE0, any SMP/SMTC/RTOS code
  229. * making use of VPE1 will be responsable for that VPE.
  230. */
  231. if ((c->processor_id & PRID_REV_MASK) <= PRID_REV_34K_V1_0_2)
  232. write_c0_config7(read_c0_config7() | MIPS_CONF7_RPS);
  233. break;
  234. default:
  235. break;
  236. }
  237. }
  238. void __init check_bugs32(void)
  239. {
  240. check_errata();
  241. }
  242. /*
  243. * Probe whether cpu has config register by trying to play with
  244. * alternate cache bit and see whether it matters.
  245. * It's used by cpu_probe to distinguish between R3000A and R3081.
  246. */
  247. static inline int cpu_has_confreg(void)
  248. {
  249. #ifdef CONFIG_CPU_R3000
  250. extern unsigned long r3k_cache_size(unsigned long);
  251. unsigned long size1, size2;
  252. unsigned long cfg = read_c0_conf();
  253. size1 = r3k_cache_size(ST0_ISC);
  254. write_c0_conf(cfg ^ R30XX_CONF_AC);
  255. size2 = r3k_cache_size(ST0_ISC);
  256. write_c0_conf(cfg);
  257. return size1 != size2;
  258. #else
  259. return 0;
  260. #endif
  261. }
  262. static inline void set_elf_platform(int cpu, const char *plat)
  263. {
  264. if (cpu == 0)
  265. __elf_platform = plat;
  266. }
  267. /*
  268. * Get the FPU Implementation/Revision.
  269. */
  270. static inline unsigned long cpu_get_fpu_id(void)
  271. {
  272. unsigned long tmp, fpu_id;
  273. tmp = read_c0_status();
  274. __enable_fpu();
  275. fpu_id = read_32bit_cp1_register(CP1_REVISION);
  276. write_c0_status(tmp);
  277. return fpu_id;
  278. }
  279. /*
  280. * Check the CPU has an FPU the official way.
  281. */
  282. static inline int __cpu_has_fpu(void)
  283. {
  284. return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE);
  285. }
  286. static inline void cpu_probe_vmbits(struct cpuinfo_mips *c)
  287. {
  288. #ifdef __NEED_VMBITS_PROBE
  289. write_c0_entryhi(0x3fffffffffffe000ULL);
  290. back_to_back_c0_hazard();
  291. c->vmbits = fls64(read_c0_entryhi() & 0x3fffffffffffe000ULL);
  292. #endif
  293. }
  294. #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \
  295. | MIPS_CPU_COUNTER)
  296. static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
  297. {
  298. switch (c->processor_id & 0xff00) {
  299. case PRID_IMP_R2000:
  300. c->cputype = CPU_R2000;
  301. __cpu_name[cpu] = "R2000";
  302. c->isa_level = MIPS_CPU_ISA_I;
  303. c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
  304. MIPS_CPU_NOFPUEX;
  305. if (__cpu_has_fpu())
  306. c->options |= MIPS_CPU_FPU;
  307. c->tlbsize = 64;
  308. break;
  309. case PRID_IMP_R3000:
  310. if ((c->processor_id & 0xff) == PRID_REV_R3000A) {
  311. if (cpu_has_confreg()) {
  312. c->cputype = CPU_R3081E;
  313. __cpu_name[cpu] = "R3081";
  314. } else {
  315. c->cputype = CPU_R3000A;
  316. __cpu_name[cpu] = "R3000A";
  317. }
  318. break;
  319. } else {
  320. c->cputype = CPU_R3000;
  321. __cpu_name[cpu] = "R3000";
  322. }
  323. c->isa_level = MIPS_CPU_ISA_I;
  324. c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
  325. MIPS_CPU_NOFPUEX;
  326. if (__cpu_has_fpu())
  327. c->options |= MIPS_CPU_FPU;
  328. c->tlbsize = 64;
  329. break;
  330. case PRID_IMP_R4000:
  331. if (read_c0_config() & CONF_SC) {
  332. if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
  333. c->cputype = CPU_R4400PC;
  334. __cpu_name[cpu] = "R4400PC";
  335. } else {
  336. c->cputype = CPU_R4000PC;
  337. __cpu_name[cpu] = "R4000PC";
  338. }
  339. } else {
  340. if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
  341. c->cputype = CPU_R4400SC;
  342. __cpu_name[cpu] = "R4400SC";
  343. } else {
  344. c->cputype = CPU_R4000SC;
  345. __cpu_name[cpu] = "R4000SC";
  346. }
  347. }
  348. c->isa_level = MIPS_CPU_ISA_III;
  349. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  350. MIPS_CPU_WATCH | MIPS_CPU_VCE |
  351. MIPS_CPU_LLSC;
  352. c->tlbsize = 48;
  353. break;
  354. case PRID_IMP_VR41XX:
  355. switch (c->processor_id & 0xf0) {
  356. case PRID_REV_VR4111:
  357. c->cputype = CPU_VR4111;
  358. __cpu_name[cpu] = "NEC VR4111";
  359. break;
  360. case PRID_REV_VR4121:
  361. c->cputype = CPU_VR4121;
  362. __cpu_name[cpu] = "NEC VR4121";
  363. break;
  364. case PRID_REV_VR4122:
  365. if ((c->processor_id & 0xf) < 0x3) {
  366. c->cputype = CPU_VR4122;
  367. __cpu_name[cpu] = "NEC VR4122";
  368. } else {
  369. c->cputype = CPU_VR4181A;
  370. __cpu_name[cpu] = "NEC VR4181A";
  371. }
  372. break;
  373. case PRID_REV_VR4130:
  374. if ((c->processor_id & 0xf) < 0x4) {
  375. c->cputype = CPU_VR4131;
  376. __cpu_name[cpu] = "NEC VR4131";
  377. } else {
  378. c->cputype = CPU_VR4133;
  379. __cpu_name[cpu] = "NEC VR4133";
  380. }
  381. break;
  382. default:
  383. printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
  384. c->cputype = CPU_VR41XX;
  385. __cpu_name[cpu] = "NEC Vr41xx";
  386. break;
  387. }
  388. c->isa_level = MIPS_CPU_ISA_III;
  389. c->options = R4K_OPTS;
  390. c->tlbsize = 32;
  391. break;
  392. case PRID_IMP_R4300:
  393. c->cputype = CPU_R4300;
  394. __cpu_name[cpu] = "R4300";
  395. c->isa_level = MIPS_CPU_ISA_III;
  396. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  397. MIPS_CPU_LLSC;
  398. c->tlbsize = 32;
  399. break;
  400. case PRID_IMP_R4600:
  401. c->cputype = CPU_R4600;
  402. __cpu_name[cpu] = "R4600";
  403. c->isa_level = MIPS_CPU_ISA_III;
  404. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  405. MIPS_CPU_LLSC;
  406. c->tlbsize = 48;
  407. break;
  408. #if 0
  409. case PRID_IMP_R4650:
  410. /*
  411. * This processor doesn't have an MMU, so it's not
  412. * "real easy" to run Linux on it. It is left purely
  413. * for documentation. Commented out because it shares
  414. * it's c0_prid id number with the TX3900.
  415. */
  416. c->cputype = CPU_R4650;
  417. __cpu_name[cpu] = "R4650";
  418. c->isa_level = MIPS_CPU_ISA_III;
  419. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC;
  420. c->tlbsize = 48;
  421. break;
  422. #endif
  423. case PRID_IMP_TX39:
  424. c->isa_level = MIPS_CPU_ISA_I;
  425. c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE;
  426. if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) {
  427. c->cputype = CPU_TX3927;
  428. __cpu_name[cpu] = "TX3927";
  429. c->tlbsize = 64;
  430. } else {
  431. switch (c->processor_id & 0xff) {
  432. case PRID_REV_TX3912:
  433. c->cputype = CPU_TX3912;
  434. __cpu_name[cpu] = "TX3912";
  435. c->tlbsize = 32;
  436. break;
  437. case PRID_REV_TX3922:
  438. c->cputype = CPU_TX3922;
  439. __cpu_name[cpu] = "TX3922";
  440. c->tlbsize = 64;
  441. break;
  442. }
  443. }
  444. break;
  445. case PRID_IMP_R4700:
  446. c->cputype = CPU_R4700;
  447. __cpu_name[cpu] = "R4700";
  448. c->isa_level = MIPS_CPU_ISA_III;
  449. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  450. MIPS_CPU_LLSC;
  451. c->tlbsize = 48;
  452. break;
  453. case PRID_IMP_TX49:
  454. c->cputype = CPU_TX49XX;
  455. __cpu_name[cpu] = "R49XX";
  456. c->isa_level = MIPS_CPU_ISA_III;
  457. c->options = R4K_OPTS | MIPS_CPU_LLSC;
  458. if (!(c->processor_id & 0x08))
  459. c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR;
  460. c->tlbsize = 48;
  461. break;
  462. case PRID_IMP_R5000:
  463. c->cputype = CPU_R5000;
  464. __cpu_name[cpu] = "R5000";
  465. c->isa_level = MIPS_CPU_ISA_IV;
  466. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  467. MIPS_CPU_LLSC;
  468. c->tlbsize = 48;
  469. break;
  470. case PRID_IMP_R5432:
  471. c->cputype = CPU_R5432;
  472. __cpu_name[cpu] = "R5432";
  473. c->isa_level = MIPS_CPU_ISA_IV;
  474. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  475. MIPS_CPU_WATCH | MIPS_CPU_LLSC;
  476. c->tlbsize = 48;
  477. break;
  478. case PRID_IMP_R5500:
  479. c->cputype = CPU_R5500;
  480. __cpu_name[cpu] = "R5500";
  481. c->isa_level = MIPS_CPU_ISA_IV;
  482. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  483. MIPS_CPU_WATCH | MIPS_CPU_LLSC;
  484. c->tlbsize = 48;
  485. break;
  486. case PRID_IMP_NEVADA:
  487. c->cputype = CPU_NEVADA;
  488. __cpu_name[cpu] = "Nevada";
  489. c->isa_level = MIPS_CPU_ISA_IV;
  490. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  491. MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
  492. c->tlbsize = 48;
  493. break;
  494. case PRID_IMP_R6000:
  495. c->cputype = CPU_R6000;
  496. __cpu_name[cpu] = "R6000";
  497. c->isa_level = MIPS_CPU_ISA_II;
  498. c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
  499. MIPS_CPU_LLSC;
  500. c->tlbsize = 32;
  501. break;
  502. case PRID_IMP_R6000A:
  503. c->cputype = CPU_R6000A;
  504. __cpu_name[cpu] = "R6000A";
  505. c->isa_level = MIPS_CPU_ISA_II;
  506. c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
  507. MIPS_CPU_LLSC;
  508. c->tlbsize = 32;
  509. break;
  510. case PRID_IMP_RM7000:
  511. c->cputype = CPU_RM7000;
  512. __cpu_name[cpu] = "RM7000";
  513. c->isa_level = MIPS_CPU_ISA_IV;
  514. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  515. MIPS_CPU_LLSC;
  516. /*
  517. * Undocumented RM7000: Bit 29 in the info register of
  518. * the RM7000 v2.0 indicates if the TLB has 48 or 64
  519. * entries.
  520. *
  521. * 29 1 => 64 entry JTLB
  522. * 0 => 48 entry JTLB
  523. */
  524. c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48;
  525. break;
  526. case PRID_IMP_RM9000:
  527. c->cputype = CPU_RM9000;
  528. __cpu_name[cpu] = "RM9000";
  529. c->isa_level = MIPS_CPU_ISA_IV;
  530. c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
  531. MIPS_CPU_LLSC;
  532. /*
  533. * Bit 29 in the info register of the RM9000
  534. * indicates if the TLB has 48 or 64 entries.
  535. *
  536. * 29 1 => 64 entry JTLB
  537. * 0 => 48 entry JTLB
  538. */
  539. c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48;
  540. break;
  541. case PRID_IMP_R8000:
  542. c->cputype = CPU_R8000;
  543. __cpu_name[cpu] = "RM8000";
  544. c->isa_level = MIPS_CPU_ISA_IV;
  545. c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
  546. MIPS_CPU_FPU | MIPS_CPU_32FPR |
  547. MIPS_CPU_LLSC;
  548. c->tlbsize = 384; /* has weird TLB: 3-way x 128 */
  549. break;
  550. case PRID_IMP_R10000:
  551. c->cputype = CPU_R10000;
  552. __cpu_name[cpu] = "R10000";
  553. c->isa_level = MIPS_CPU_ISA_IV;
  554. c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
  555. MIPS_CPU_FPU | MIPS_CPU_32FPR |
  556. MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
  557. MIPS_CPU_LLSC;
  558. c->tlbsize = 64;
  559. break;
  560. case PRID_IMP_R12000:
  561. c->cputype = CPU_R12000;
  562. __cpu_name[cpu] = "R12000";
  563. c->isa_level = MIPS_CPU_ISA_IV;
  564. c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
  565. MIPS_CPU_FPU | MIPS_CPU_32FPR |
  566. MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
  567. MIPS_CPU_LLSC;
  568. c->tlbsize = 64;
  569. break;
  570. case PRID_IMP_R14000:
  571. c->cputype = CPU_R14000;
  572. __cpu_name[cpu] = "R14000";
  573. c->isa_level = MIPS_CPU_ISA_IV;
  574. c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
  575. MIPS_CPU_FPU | MIPS_CPU_32FPR |
  576. MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
  577. MIPS_CPU_LLSC;
  578. c->tlbsize = 64;
  579. break;
  580. case PRID_IMP_LOONGSON2:
  581. c->cputype = CPU_LOONGSON2;
  582. __cpu_name[cpu] = "ICT Loongson-2";
  583. switch (c->processor_id & PRID_REV_MASK) {
  584. case PRID_REV_LOONGSON2E:
  585. set_elf_platform(cpu, "loongson2e");
  586. break;
  587. case PRID_REV_LOONGSON2F:
  588. set_elf_platform(cpu, "loongson2f");
  589. break;
  590. }
  591. c->isa_level = MIPS_CPU_ISA_III;
  592. c->options = R4K_OPTS |
  593. MIPS_CPU_FPU | MIPS_CPU_LLSC |
  594. MIPS_CPU_32FPR;
  595. c->tlbsize = 64;
  596. break;
  597. }
  598. }
  599. static char unknown_isa[] __cpuinitdata = KERN_ERR \
  600. "Unsupported ISA type, c0.config0: %d.";
  601. static inline unsigned int decode_config0(struct cpuinfo_mips *c)
  602. {
  603. unsigned int config0;
  604. int isa;
  605. config0 = read_c0_config();
  606. if (((config0 & MIPS_CONF_MT) >> 7) == 1)
  607. c->options |= MIPS_CPU_TLB;
  608. isa = (config0 & MIPS_CONF_AT) >> 13;
  609. switch (isa) {
  610. case 0:
  611. switch ((config0 & MIPS_CONF_AR) >> 10) {
  612. case 0:
  613. c->isa_level = MIPS_CPU_ISA_M32R1;
  614. break;
  615. case 1:
  616. c->isa_level = MIPS_CPU_ISA_M32R2;
  617. break;
  618. default:
  619. goto unknown;
  620. }
  621. break;
  622. case 2:
  623. switch ((config0 & MIPS_CONF_AR) >> 10) {
  624. case 0:
  625. c->isa_level = MIPS_CPU_ISA_M64R1;
  626. break;
  627. case 1:
  628. c->isa_level = MIPS_CPU_ISA_M64R2;
  629. break;
  630. default:
  631. goto unknown;
  632. }
  633. break;
  634. default:
  635. goto unknown;
  636. }
  637. return config0 & MIPS_CONF_M;
  638. unknown:
  639. panic(unknown_isa, config0);
  640. }
  641. static inline unsigned int decode_config1(struct cpuinfo_mips *c)
  642. {
  643. unsigned int config1;
  644. config1 = read_c0_config1();
  645. if (config1 & MIPS_CONF1_MD)
  646. c->ases |= MIPS_ASE_MDMX;
  647. if (config1 & MIPS_CONF1_WR)
  648. c->options |= MIPS_CPU_WATCH;
  649. if (config1 & MIPS_CONF1_CA)
  650. c->ases |= MIPS_ASE_MIPS16;
  651. if (config1 & MIPS_CONF1_EP)
  652. c->options |= MIPS_CPU_EJTAG;
  653. if (config1 & MIPS_CONF1_FP) {
  654. c->options |= MIPS_CPU_FPU;
  655. c->options |= MIPS_CPU_32FPR;
  656. }
  657. if (cpu_has_tlb)
  658. c->tlbsize = ((config1 & MIPS_CONF1_TLBS) >> 25) + 1;
  659. return config1 & MIPS_CONF_M;
  660. }
  661. static inline unsigned int decode_config2(struct cpuinfo_mips *c)
  662. {
  663. unsigned int config2;
  664. config2 = read_c0_config2();
  665. if (config2 & MIPS_CONF2_SL)
  666. c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
  667. return config2 & MIPS_CONF_M;
  668. }
  669. static inline unsigned int decode_config3(struct cpuinfo_mips *c)
  670. {
  671. unsigned int config3;
  672. config3 = read_c0_config3();
  673. if (config3 & MIPS_CONF3_SM)
  674. c->ases |= MIPS_ASE_SMARTMIPS;
  675. if (config3 & MIPS_CONF3_DSP)
  676. c->ases |= MIPS_ASE_DSP;
  677. if (config3 & MIPS_CONF3_VINT)
  678. c->options |= MIPS_CPU_VINT;
  679. if (config3 & MIPS_CONF3_VEIC)
  680. c->options |= MIPS_CPU_VEIC;
  681. if (config3 & MIPS_CONF3_MT)
  682. c->ases |= MIPS_ASE_MIPSMT;
  683. if (config3 & MIPS_CONF3_ULRI)
  684. c->options |= MIPS_CPU_ULRI;
  685. return config3 & MIPS_CONF_M;
  686. }
  687. static inline unsigned int decode_config4(struct cpuinfo_mips *c)
  688. {
  689. unsigned int config4;
  690. config4 = read_c0_config4();
  691. if ((config4 & MIPS_CONF4_MMUEXTDEF) == MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT
  692. && cpu_has_tlb)
  693. c->tlbsize += (config4 & MIPS_CONF4_MMUSIZEEXT) * 0x40;
  694. c->kscratch_mask = (config4 >> 16) & 0xff;
  695. return config4 & MIPS_CONF_M;
  696. }
  697. static void __cpuinit decode_configs(struct cpuinfo_mips *c)
  698. {
  699. int ok;
  700. /* MIPS32 or MIPS64 compliant CPU. */
  701. c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER |
  702. MIPS_CPU_DIVEC | MIPS_CPU_LLSC | MIPS_CPU_MCHECK;
  703. c->scache.flags = MIPS_CACHE_NOT_PRESENT;
  704. ok = decode_config0(c); /* Read Config registers. */
  705. BUG_ON(!ok); /* Arch spec violation! */
  706. if (ok)
  707. ok = decode_config1(c);
  708. if (ok)
  709. ok = decode_config2(c);
  710. if (ok)
  711. ok = decode_config3(c);
  712. if (ok)
  713. ok = decode_config4(c);
  714. mips_probe_watch_registers(c);
  715. if (cpu_has_mips_r2)
  716. c->core = read_c0_ebase() & 0x3ff;
  717. }
  718. static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
  719. {
  720. decode_configs(c);
  721. switch (c->processor_id & 0xff00) {
  722. case PRID_IMP_4KC:
  723. c->cputype = CPU_4KC;
  724. __cpu_name[cpu] = "MIPS 4Kc";
  725. break;
  726. case PRID_IMP_4KEC:
  727. case PRID_IMP_4KECR2:
  728. c->cputype = CPU_4KEC;
  729. __cpu_name[cpu] = "MIPS 4KEc";
  730. break;
  731. case PRID_IMP_4KSC:
  732. case PRID_IMP_4KSD:
  733. c->cputype = CPU_4KSC;
  734. __cpu_name[cpu] = "MIPS 4KSc";
  735. break;
  736. case PRID_IMP_5KC:
  737. c->cputype = CPU_5KC;
  738. __cpu_name[cpu] = "MIPS 5Kc";
  739. break;
  740. case PRID_IMP_20KC:
  741. c->cputype = CPU_20KC;
  742. __cpu_name[cpu] = "MIPS 20Kc";
  743. break;
  744. case PRID_IMP_24K:
  745. case PRID_IMP_24KE:
  746. c->cputype = CPU_24K;
  747. __cpu_name[cpu] = "MIPS 24Kc";
  748. break;
  749. case PRID_IMP_25KF:
  750. c->cputype = CPU_25KF;
  751. __cpu_name[cpu] = "MIPS 25Kc";
  752. break;
  753. case PRID_IMP_34K:
  754. c->cputype = CPU_34K;
  755. __cpu_name[cpu] = "MIPS 34Kc";
  756. break;
  757. case PRID_IMP_74K:
  758. c->cputype = CPU_74K;
  759. __cpu_name[cpu] = "MIPS 74Kc";
  760. break;
  761. case PRID_IMP_1004K:
  762. c->cputype = CPU_1004K;
  763. __cpu_name[cpu] = "MIPS 1004Kc";
  764. break;
  765. }
  766. spram_config();
  767. }
  768. static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
  769. {
  770. decode_configs(c);
  771. switch (c->processor_id & 0xff00) {
  772. case PRID_IMP_AU1_REV1:
  773. case PRID_IMP_AU1_REV2:
  774. c->cputype = CPU_ALCHEMY;
  775. switch ((c->processor_id >> 24) & 0xff) {
  776. case 0:
  777. __cpu_name[cpu] = "Au1000";
  778. break;
  779. case 1:
  780. __cpu_name[cpu] = "Au1500";
  781. break;
  782. case 2:
  783. __cpu_name[cpu] = "Au1100";
  784. break;
  785. case 3:
  786. __cpu_name[cpu] = "Au1550";
  787. break;
  788. case 4:
  789. __cpu_name[cpu] = "Au1200";
  790. if ((c->processor_id & 0xff) == 2)
  791. __cpu_name[cpu] = "Au1250";
  792. break;
  793. case 5:
  794. __cpu_name[cpu] = "Au1210";
  795. break;
  796. default:
  797. __cpu_name[cpu] = "Au1xxx";
  798. break;
  799. }
  800. break;
  801. }
  802. }
  803. static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu)
  804. {
  805. decode_configs(c);
  806. switch (c->processor_id & 0xff00) {
  807. case PRID_IMP_SB1:
  808. c->cputype = CPU_SB1;
  809. __cpu_name[cpu] = "SiByte SB1";
  810. /* FPU in pass1 is known to have issues. */
  811. if ((c->processor_id & 0xff) < 0x02)
  812. c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
  813. break;
  814. case PRID_IMP_SB1A:
  815. c->cputype = CPU_SB1A;
  816. __cpu_name[cpu] = "SiByte SB1A";
  817. break;
  818. }
  819. }
  820. static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu)
  821. {
  822. decode_configs(c);
  823. switch (c->processor_id & 0xff00) {
  824. case PRID_IMP_SR71000:
  825. c->cputype = CPU_SR71000;
  826. __cpu_name[cpu] = "Sandcraft SR71000";
  827. c->scache.ways = 8;
  828. c->tlbsize = 64;
  829. break;
  830. }
  831. }
  832. static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu)
  833. {
  834. decode_configs(c);
  835. switch (c->processor_id & 0xff00) {
  836. case PRID_IMP_PR4450:
  837. c->cputype = CPU_PR4450;
  838. __cpu_name[cpu] = "Philips PR4450";
  839. c->isa_level = MIPS_CPU_ISA_M32R1;
  840. break;
  841. }
  842. }
  843. static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
  844. {
  845. decode_configs(c);
  846. switch (c->processor_id & 0xff00) {
  847. case PRID_IMP_BMIPS32_REV4:
  848. case PRID_IMP_BMIPS32_REV8:
  849. c->cputype = CPU_BMIPS32;
  850. __cpu_name[cpu] = "Broadcom BMIPS32";
  851. set_elf_platform(cpu, "bmips32");
  852. break;
  853. case PRID_IMP_BMIPS3300:
  854. case PRID_IMP_BMIPS3300_ALT:
  855. case PRID_IMP_BMIPS3300_BUG:
  856. c->cputype = CPU_BMIPS3300;
  857. __cpu_name[cpu] = "Broadcom BMIPS3300";
  858. set_elf_platform(cpu, "bmips3300");
  859. break;
  860. case PRID_IMP_BMIPS43XX: {
  861. int rev = c->processor_id & 0xff;
  862. if (rev >= PRID_REV_BMIPS4380_LO &&
  863. rev <= PRID_REV_BMIPS4380_HI) {
  864. c->cputype = CPU_BMIPS4380;
  865. __cpu_name[cpu] = "Broadcom BMIPS4380";
  866. set_elf_platform(cpu, "bmips4380");
  867. } else {
  868. c->cputype = CPU_BMIPS4350;
  869. __cpu_name[cpu] = "Broadcom BMIPS4350";
  870. set_elf_platform(cpu, "bmips4350");
  871. }
  872. break;
  873. }
  874. case PRID_IMP_BMIPS5000:
  875. c->cputype = CPU_BMIPS5000;
  876. __cpu_name[cpu] = "Broadcom BMIPS5000";
  877. set_elf_platform(cpu, "bmips5000");
  878. c->options |= MIPS_CPU_ULRI;
  879. break;
  880. }
  881. }
  882. static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu)
  883. {
  884. decode_configs(c);
  885. switch (c->processor_id & 0xff00) {
  886. case PRID_IMP_CAVIUM_CN38XX:
  887. case PRID_IMP_CAVIUM_CN31XX:
  888. case PRID_IMP_CAVIUM_CN30XX:
  889. c->cputype = CPU_CAVIUM_OCTEON;
  890. __cpu_name[cpu] = "Cavium Octeon";
  891. goto platform;
  892. case PRID_IMP_CAVIUM_CN58XX:
  893. case PRID_IMP_CAVIUM_CN56XX:
  894. case PRID_IMP_CAVIUM_CN50XX:
  895. case PRID_IMP_CAVIUM_CN52XX:
  896. c->cputype = CPU_CAVIUM_OCTEON_PLUS;
  897. __cpu_name[cpu] = "Cavium Octeon+";
  898. platform:
  899. set_elf_platform(cpu, "octeon");
  900. break;
  901. case PRID_IMP_CAVIUM_CN61XX:
  902. case PRID_IMP_CAVIUM_CN63XX:
  903. case PRID_IMP_CAVIUM_CN66XX:
  904. case PRID_IMP_CAVIUM_CN68XX:
  905. c->cputype = CPU_CAVIUM_OCTEON2;
  906. __cpu_name[cpu] = "Cavium Octeon II";
  907. set_elf_platform(cpu, "octeon2");
  908. break;
  909. default:
  910. printk(KERN_INFO "Unknown Octeon chip!\n");
  911. c->cputype = CPU_UNKNOWN;
  912. break;
  913. }
  914. }
  915. static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
  916. {
  917. decode_configs(c);
  918. /* JZRISC does not implement the CP0 counter. */
  919. c->options &= ~MIPS_CPU_COUNTER;
  920. switch (c->processor_id & 0xff00) {
  921. case PRID_IMP_JZRISC:
  922. c->cputype = CPU_JZRISC;
  923. __cpu_name[cpu] = "Ingenic JZRISC";
  924. break;
  925. default:
  926. panic("Unknown Ingenic Processor ID!");
  927. break;
  928. }
  929. }
  930. static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
  931. {
  932. decode_configs(c);
  933. c->options = (MIPS_CPU_TLB |
  934. MIPS_CPU_4KEX |
  935. MIPS_CPU_COUNTER |
  936. MIPS_CPU_DIVEC |
  937. MIPS_CPU_WATCH |
  938. MIPS_CPU_EJTAG |
  939. MIPS_CPU_LLSC);
  940. switch (c->processor_id & 0xff00) {
  941. case PRID_IMP_NETLOGIC_XLP8XX:
  942. case PRID_IMP_NETLOGIC_XLP3XX:
  943. c->cputype = CPU_XLP;
  944. __cpu_name[cpu] = "Netlogic XLP";
  945. break;
  946. case PRID_IMP_NETLOGIC_XLR732:
  947. case PRID_IMP_NETLOGIC_XLR716:
  948. case PRID_IMP_NETLOGIC_XLR532:
  949. case PRID_IMP_NETLOGIC_XLR308:
  950. case PRID_IMP_NETLOGIC_XLR532C:
  951. case PRID_IMP_NETLOGIC_XLR516C:
  952. case PRID_IMP_NETLOGIC_XLR508C:
  953. case PRID_IMP_NETLOGIC_XLR308C:
  954. c->cputype = CPU_XLR;
  955. __cpu_name[cpu] = "Netlogic XLR";
  956. break;
  957. case PRID_IMP_NETLOGIC_XLS608:
  958. case PRID_IMP_NETLOGIC_XLS408:
  959. case PRID_IMP_NETLOGIC_XLS404:
  960. case PRID_IMP_NETLOGIC_XLS208:
  961. case PRID_IMP_NETLOGIC_XLS204:
  962. case PRID_IMP_NETLOGIC_XLS108:
  963. case PRID_IMP_NETLOGIC_XLS104:
  964. case PRID_IMP_NETLOGIC_XLS616B:
  965. case PRID_IMP_NETLOGIC_XLS608B:
  966. case PRID_IMP_NETLOGIC_XLS416B:
  967. case PRID_IMP_NETLOGIC_XLS412B:
  968. case PRID_IMP_NETLOGIC_XLS408B:
  969. case PRID_IMP_NETLOGIC_XLS404B:
  970. c->cputype = CPU_XLR;
  971. __cpu_name[cpu] = "Netlogic XLS";
  972. break;
  973. default:
  974. pr_info("Unknown Netlogic chip id [%02x]!\n",
  975. c->processor_id);
  976. c->cputype = CPU_XLR;
  977. break;
  978. }
  979. if (c->cputype == CPU_XLP) {
  980. c->isa_level = MIPS_CPU_ISA_M64R2;
  981. c->options |= (MIPS_CPU_FPU | MIPS_CPU_ULRI | MIPS_CPU_MCHECK);
  982. /* This will be updated again after all threads are woken up */
  983. c->tlbsize = ((read_c0_config6() >> 16) & 0xffff) + 1;
  984. } else {
  985. c->isa_level = MIPS_CPU_ISA_M64R1;
  986. c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1;
  987. }
  988. }
  989. #ifdef CONFIG_64BIT
  990. /* For use by uaccess.h */
  991. u64 __ua_limit;
  992. EXPORT_SYMBOL(__ua_limit);
  993. #endif
  994. const char *__cpu_name[NR_CPUS];
  995. const char *__elf_platform;
  996. __cpuinit void cpu_probe(void)
  997. {
  998. struct cpuinfo_mips *c = &current_cpu_data;
  999. unsigned int cpu = smp_processor_id();
  1000. c->processor_id = PRID_IMP_UNKNOWN;
  1001. c->fpu_id = FPIR_IMP_NONE;
  1002. c->cputype = CPU_UNKNOWN;
  1003. c->processor_id = read_c0_prid();
  1004. switch (c->processor_id & 0xff0000) {
  1005. case PRID_COMP_LEGACY:
  1006. cpu_probe_legacy(c, cpu);
  1007. break;
  1008. case PRID_COMP_MIPS:
  1009. cpu_probe_mips(c, cpu);
  1010. break;
  1011. case PRID_COMP_ALCHEMY:
  1012. cpu_probe_alchemy(c, cpu);
  1013. break;
  1014. case PRID_COMP_SIBYTE:
  1015. cpu_probe_sibyte(c, cpu);
  1016. break;
  1017. case PRID_COMP_BROADCOM:
  1018. cpu_probe_broadcom(c, cpu);
  1019. break;
  1020. case PRID_COMP_SANDCRAFT:
  1021. cpu_probe_sandcraft(c, cpu);
  1022. break;
  1023. case PRID_COMP_NXP:
  1024. cpu_probe_nxp(c, cpu);
  1025. break;
  1026. case PRID_COMP_CAVIUM:
  1027. cpu_probe_cavium(c, cpu);
  1028. break;
  1029. case PRID_COMP_INGENIC:
  1030. cpu_probe_ingenic(c, cpu);
  1031. break;
  1032. case PRID_COMP_NETLOGIC:
  1033. cpu_probe_netlogic(c, cpu);
  1034. break;
  1035. }
  1036. BUG_ON(!__cpu_name[cpu]);
  1037. BUG_ON(c->cputype == CPU_UNKNOWN);
  1038. /*
  1039. * Platform code can force the cpu type to optimize code
  1040. * generation. In that case be sure the cpu type is correctly
  1041. * manually setup otherwise it could trigger some nasty bugs.
  1042. */
  1043. BUG_ON(current_cpu_type() != c->cputype);
  1044. if (mips_fpu_disabled)
  1045. c->options &= ~MIPS_CPU_FPU;
  1046. if (mips_dsp_disabled)
  1047. c->ases &= ~MIPS_ASE_DSP;
  1048. if (c->options & MIPS_CPU_FPU) {
  1049. c->fpu_id = cpu_get_fpu_id();
  1050. if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
  1051. c->isa_level == MIPS_CPU_ISA_M32R2 ||
  1052. c->isa_level == MIPS_CPU_ISA_M64R1 ||
  1053. c->isa_level == MIPS_CPU_ISA_M64R2) {
  1054. if (c->fpu_id & MIPS_FPIR_3D)
  1055. c->ases |= MIPS_ASE_MIPS3D;
  1056. }
  1057. }
  1058. if (cpu_has_mips_r2)
  1059. c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
  1060. else
  1061. c->srsets = 1;
  1062. cpu_probe_vmbits(c);
  1063. #ifdef CONFIG_64BIT
  1064. if (cpu == 0)
  1065. __ua_limit = ~((1ull << cpu_vmbits) - 1);
  1066. #endif
  1067. }
  1068. __cpuinit void cpu_report(void)
  1069. {
  1070. struct cpuinfo_mips *c = &current_cpu_data;
  1071. printk(KERN_INFO "CPU revision is: %08x (%s)\n",
  1072. c->processor_id, cpu_name_string());
  1073. if (c->options & MIPS_CPU_FPU)
  1074. printk(KERN_INFO "FPU revision is: %08x\n", c->fpu_id);
  1075. }