1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_X86_UV_UV_H 3 #define _ASM_X86_UV_UV_H 4 5 #include <asm/tlbflush.h> 6 7 enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC}; 8 9 struct cpumask; 10 struct mm_struct; 11 struct flush_tlb_info; 12 13 #ifdef CONFIG_X86_UV 14 #include <linux/efi.h> 15 16 #define UV_PROC_NODE "sgi_uv" 17 18 static inline int uv(int uvtype) 19 { 20 /* uv(0) is "any" */ 21 if (uvtype >= 0 && uvtype <= 30) 22 return 1 << uvtype; 23 return 1; 24 } 25 26 extern unsigned long uv_systab_phys; 27 28 extern enum uv_system_type get_uv_system_type(void); 29 static inline bool is_early_uv_system(void) 30 { 31 return uv_systab_phys && uv_systab_phys != EFI_INVALID_TABLE_ADDR; 32 } 33 extern int is_uv_system(void); 34 extern int is_uv_hubbed(int uvtype); 35 extern void uv_cpu_init(void); 36 extern void uv_nmi_init(void); 37 extern void uv_system_init(void); 38 39 #else /* !X86_UV */ 40 41 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; } 42 static inline bool is_early_uv_system(void) { return 0; } 43 static inline int is_uv_system(void) { return 0; } 44 static inline int is_uv_hubbed(int uv) { return 0; } 45 static inline void uv_cpu_init(void) { } 46 static inline void uv_system_init(void) { } 47 static inline const struct cpumask * 48 uv_flush_tlb_others(const struct cpumask *cpumask, 49 const struct flush_tlb_info *info) 50 { return cpumask; } 51 52 #endif /* X86_UV */ 53 54 #endif /* _ASM_X86_UV_UV_H */ 55