genapic_64.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _ASM_X86_GENAPIC_64_H
  2. #define _ASM_X86_GENAPIC_64_H
  3. #include <linux/cpumask.h>
  4. /*
  5. * Copyright 2004 James Cleverdon, IBM.
  6. * Subject to the GNU Public License, v.2
  7. *
  8. * Generic APIC sub-arch data struct.
  9. *
  10. * Hacked for x86-64 by James Cleverdon from i386 architecture code by
  11. * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
  12. * James Cleverdon.
  13. */
  14. struct genapic {
  15. char *name;
  16. int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
  17. u32 int_delivery_mode;
  18. u32 int_dest_mode;
  19. int (*apic_id_registered)(void);
  20. const struct cpumask *(*target_cpus)(void);
  21. void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
  22. void (*init_apic_ldr)(void);
  23. /* ipi */
  24. void (*send_IPI_mask)(const struct cpumask *mask, int vector);
  25. void (*send_IPI_mask_allbutself)(const struct cpumask *mask,
  26. int vector);
  27. void (*send_IPI_allbutself)(int vector);
  28. void (*send_IPI_all)(int vector);
  29. void (*send_IPI_self)(int vector);
  30. /* */
  31. unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask);
  32. unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
  33. const struct cpumask *andmask);
  34. unsigned int (*phys_pkg_id)(int index_msb);
  35. unsigned int (*get_apic_id)(unsigned long x);
  36. unsigned long (*set_apic_id)(unsigned int id);
  37. unsigned long apic_id_mask;
  38. /* wakeup_secondary_cpu */
  39. int (*wakeup_cpu)(int apicid, unsigned long start_eip);
  40. };
  41. extern struct genapic *genapic;
  42. extern struct genapic apic_flat;
  43. extern struct genapic apic_physflat;
  44. extern struct genapic apic_x2apic_cluster;
  45. extern struct genapic apic_x2apic_phys;
  46. extern int acpi_madt_oem_check(char *, char *);
  47. extern void apic_send_IPI_self(int vector);
  48. enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
  49. extern enum uv_system_type get_uv_system_type(void);
  50. extern int is_uv_system(void);
  51. extern struct genapic apic_x2apic_uv_x;
  52. DECLARE_PER_CPU(int, x2apic_extra_bits);
  53. extern void uv_cpu_init(void);
  54. extern void uv_system_init(void);
  55. extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
  56. extern void setup_apic_routing(void);
  57. #endif /* _ASM_X86_GENAPIC_64_H */