uv.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_UV_UV_H
  3. #define _ASM_X86_UV_UV_H
  4. enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC};
  5. #ifdef CONFIG_X86_UV
  6. #include <linux/efi.h>
  7. #define UV_PROC_NODE "sgi_uv"
  8. static inline int uv(int uvtype)
  9. {
  10. /* uv(0) is "any" */
  11. if (uvtype >= 0 && uvtype <= 30)
  12. return 1 << uvtype;
  13. return 1;
  14. }
  15. extern unsigned long uv_systab_phys;
  16. extern enum uv_system_type get_uv_system_type(void);
  17. static inline bool is_early_uv_system(void)
  18. {
  19. return uv_systab_phys && uv_systab_phys != EFI_INVALID_TABLE_ADDR;
  20. }
  21. extern int is_uv_system(void);
  22. extern int is_uv_hubbed(int uvtype);
  23. extern void uv_cpu_init(void);
  24. extern void uv_nmi_init(void);
  25. extern void uv_system_init(void);
  26. #else /* !X86_UV */
  27. static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
  28. static inline bool is_early_uv_system(void) { return 0; }
  29. static inline int is_uv_system(void) { return 0; }
  30. static inline int is_uv_hubbed(int uv) { return 0; }
  31. static inline void uv_cpu_init(void) { }
  32. static inline void uv_system_init(void) { }
  33. #endif /* X86_UV */
  34. #endif /* _ASM_X86_UV_UV_H */