]> Git Repo - linux.git/blob - arch/s390/include/asm/abs_lowcore.h
Linux 6.14-rc3
[linux.git] / arch / s390 / include / asm / abs_lowcore.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_ABS_LOWCORE_H
3 #define _ASM_S390_ABS_LOWCORE_H
4
5 #include <linux/smp.h>
6 #include <asm/lowcore.h>
7
8 #define ABS_LOWCORE_MAP_SIZE    (NR_CPUS * sizeof(struct lowcore))
9
10 extern unsigned long __abs_lowcore;
11
12 int abs_lowcore_map(int cpu, struct lowcore *lc, bool alloc);
13 void abs_lowcore_unmap(int cpu);
14
15 static inline struct lowcore *get_abs_lowcore(void)
16 {
17         int cpu;
18
19         cpu = get_cpu();
20         return ((struct lowcore *)__abs_lowcore) + cpu;
21 }
22
23 static inline void put_abs_lowcore(struct lowcore *lc)
24 {
25         put_cpu();
26 }
27
28 extern int relocate_lowcore;
29
30 static inline int have_relocated_lowcore(void)
31 {
32         return relocate_lowcore;
33 }
34
35 #endif /* _ASM_S390_ABS_LOWCORE_H */
This page took 0.031925 seconds and 4 git commands to generate.