bigsmp.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * APIC driver for "bigsmp" XAPIC machines with more than 8 virtual CPUs.
  3. * Drives the local APIC in "clustered mode".
  4. */
  5. #define APIC_DEFINITION 1
  6. #include <linux/threads.h>
  7. #include <linux/cpumask.h>
  8. #include <asm/mpspec.h>
  9. #include <asm/genapic.h>
  10. #include <asm/fixmap.h>
  11. #include <asm/apicdef.h>
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/dmi.h>
  15. #include <asm/bigsmp/apicdef.h>
  16. #include <linux/smp.h>
  17. #include <asm/bigsmp/apic.h>
  18. #include <asm/bigsmp/ipi.h>
  19. #include <asm/mach-default/mach_mpparse.h>
  20. #include <asm/mach-default/mach_wakecpu.h>
  21. static int dmi_bigsmp; /* can be set by dmi scanners */
  22. static int hp_ht_bigsmp(const struct dmi_system_id *d)
  23. {
  24. printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
  25. dmi_bigsmp = 1;
  26. return 0;
  27. }
  28. static const struct dmi_system_id bigsmp_dmi_table[] = {
  29. { hp_ht_bigsmp, "HP ProLiant DL760 G2",
  30. { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
  31. DMI_MATCH(DMI_BIOS_VERSION, "P44-"),}
  32. },
  33. { hp_ht_bigsmp, "HP ProLiant DL740",
  34. { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
  35. DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
  36. },
  37. { }
  38. };
  39. static void vector_allocation_domain(int cpu, cpumask_t *retmask)
  40. {
  41. cpus_clear(*retmask);
  42. cpu_set(cpu, *retmask);
  43. }
  44. static int probe_bigsmp(void)
  45. {
  46. if (def_to_bigsmp)
  47. dmi_bigsmp = 1;
  48. else
  49. dmi_check_system(bigsmp_dmi_table);
  50. return dmi_bigsmp;
  51. }
  52. struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp);