xref: /linux/arch/s390/include/asm/abs_lowcore.h (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_ABS_LOWCORE_H
3 #define _ASM_S390_ABS_LOWCORE_H
4 
5 #include <asm/lowcore.h>
6 
7 #define ABS_LOWCORE_MAP_SIZE	(NR_CPUS * sizeof(struct lowcore))
8 
9 extern unsigned long __abs_lowcore;
10 
11 int abs_lowcore_map(int cpu, struct lowcore *lc, bool alloc);
12 void abs_lowcore_unmap(int cpu);
13 
14 static inline struct lowcore *get_abs_lowcore(void)
15 {
16 	int cpu;
17 
18 	cpu = get_cpu();
19 	return ((struct lowcore *)__abs_lowcore) + cpu;
20 }
21 
22 static inline void put_abs_lowcore(struct lowcore *lc)
23 {
24 	put_cpu();
25 }
26 
27 #endif /* _ASM_S390_ABS_LOWCORE_H */
28