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