]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - arch/x86/include/asm/uv/uv.h
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-hirsute-kernel.git] / arch / x86 / include / asm / uv / uv.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
bdbcdd48
TH
2#ifndef _ASM_X86_UV_UV_H
3#define _ASM_X86_UV_UV_H
4
a2055abe
AL
5#include <asm/tlbflush.h>
6
bdbcdd48
TH
7enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
8
58105ef1
RD
9struct cpumask;
10struct mm_struct;
11
03b48632 12#ifdef CONFIG_X86_UV
20a8378a 13#include <linux/efi.h>
bdbcdd48 14
8785968b
MT
15#define UV_PROC_NODE "sgi_uv"
16
0959f825
MT
17static inline int uv(int uvtype)
18{
19 /* uv(0) is "any" */
20 if (uvtype >= 0 && uvtype <= 30)
21 return 1 << uvtype;
22 return 1;
23}
24
ec7e1605
AB
25extern unsigned long uv_systab_phys;
26
bdbcdd48 27extern enum uv_system_type get_uv_system_type(void);
20a8378a
MT
28static inline bool is_early_uv_system(void)
29{
ec7e1605 30 return uv_systab_phys && uv_systab_phys != EFI_INVALID_TABLE_ADDR;
20a8378a 31}
bdbcdd48 32extern int is_uv_system(void);
8785968b 33extern int is_uv_hubbed(int uvtype);
0959f825 34extern int is_uv_hubless(int uvtype);
bdbcdd48 35extern void uv_cpu_init(void);
78c06176 36extern void uv_nmi_init(void);
bdbcdd48 37extern void uv_system_init(void);
bdbcdd48 38extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
a2055abe 39 const struct flush_tlb_info *info);
bdbcdd48 40
03b48632 41#else /* X86_UV */
bdbcdd48
TH
42
43static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
20a8378a 44static inline bool is_early_uv_system(void) { return 0; }
bdbcdd48 45static inline int is_uv_system(void) { return 0; }
8785968b 46static inline int is_uv_hubbed(int uv) { return 0; }
0959f825 47static inline int is_uv_hubless(int uv) { return 0; }
bdbcdd48
TH
48static inline void uv_cpu_init(void) { }
49static inline void uv_system_init(void) { }
bdbcdd48 50static inline const struct cpumask *
a2055abe
AL
51uv_flush_tlb_others(const struct cpumask *cpumask,
52 const struct flush_tlb_info *info)
bdbcdd48
TH
53{ return cpumask; }
54
03b48632 55#endif /* X86_UV */
bdbcdd48
TH
56
57#endif /* _ASM_X86_UV_UV_H */