bugs.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (C) 1994 Linus Torvalds
  3. *
  4. * Cyrix stuff, June 1998 by:
  5. * - Rafael R. Reilova (moved everything from head.S),
  6. * <rreilova@ececs.uc.edu>
  7. * - Channing Corn (tests & fixes),
  8. * - Andrew D. Balsa (code cleanup).
  9. */
  10. #include <linux/init.h>
  11. #include <linux/utsname.h>
  12. #include <asm/bugs.h>
  13. #include <asm/processor.h>
  14. #include <asm/processor-flags.h>
  15. #include <asm/fpu/internal.h>
  16. #include <asm/msr.h>
  17. #include <asm/paravirt.h>
  18. #include <asm/alternative.h>
  19. void __init check_bugs(void)
  20. {
  21. identify_boot_cpu();
  22. #ifndef CONFIG_SMP
  23. pr_info("CPU: ");
  24. print_cpu_info(&boot_cpu_data);
  25. #endif
  26. /*
  27. * Check whether we are able to run this kernel safely on SMP.
  28. *
  29. * - i386 is no longer supported.
  30. * - In order to run on anything without a TSC, we need to be
  31. * compiled for a i486.
  32. */
  33. if (boot_cpu_data.x86 < 4)
  34. panic("Kernel requires i486+ for 'invlpg' and other features");
  35. init_utsname()->machine[1] =
  36. '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
  37. alternative_instructions();
  38. fpu__init_check_bugs();
  39. }