uv.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _ASM_X86_UV_UV_H
  2. #define _ASM_X86_UV_UV_H
  3. enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
  4. struct cpumask;
  5. struct mm_struct;
  6. #ifdef CONFIG_X86_UV
  7. extern enum uv_system_type get_uv_system_type(void);
  8. extern int is_uv_system(void);
  9. extern void uv_cpu_init(void);
  10. extern void uv_nmi_init(void);
  11. extern void uv_register_nmi_notifier(void);
  12. extern void uv_system_init(void);
  13. extern void (*uv_trace_nmi_func)(unsigned int reason, struct pt_regs *regs);
  14. extern void (*uv_trace_func)(const char *f, const int l, const char *fmt, ...);
  15. #define uv_trace(fmt, ...) \
  16. do { \
  17. if (unlikely(uv_trace_func)) \
  18. (uv_trace_func)(__func__, __LINE__, fmt, ##__VA_ARGS__);\
  19. } while (0)
  20. extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
  21. struct mm_struct *mm,
  22. unsigned long start,
  23. unsigned long end,
  24. unsigned int cpu);
  25. #else /* X86_UV */
  26. static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
  27. static inline int is_uv_system(void) { return 0; }
  28. static inline void uv_cpu_init(void) { }
  29. static inline void uv_system_init(void) { }
  30. static inline void uv_trace(void *fmt, ...) { }
  31. static inline void uv_register_nmi_notifier(void) { }
  32. static inline const struct cpumask *
  33. uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm,
  34. unsigned long start, unsigned long end, unsigned int cpu)
  35. { return cpumask; }
  36. #endif /* X86_UV */
  37. #endif /* _ASM_X86_UV_UV_H */