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

source code of linux/arch/x86/include/asm/uv/uv.h