summaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2020-11-16 08:06:41 +0100
committerHeiko Carstens <hca@linux.ibm.com>2020-11-23 12:01:13 +0100
commit80f06306240e0ad1c75116111be11950474dfda7 (patch)
tree99ed304a1c6d26ad408145ba98b83d9fbf807b7f /arch/s390/include
parent062e527956d05fae02f143c0d5ff9e8525c6799f (diff)
s390/vdso: reimplement getcpu vdso syscall
Implement the previously removed getcpu vdso syscall by using the TOD programmable field to pass the cpu number to user space. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/timex.h7
-rw-r--r--arch/s390/include/asm/vdso.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
index 289aaff4d365..c8e244ecdfde 100644
--- a/arch/s390/include/asm/timex.h
+++ b/arch/s390/include/asm/timex.h
@@ -49,6 +49,13 @@ static inline void set_clock_comparator(__u64 time)
asm volatile("sckc %0" : : "Q" (time));
}
+static inline void set_tod_programmable_field(u16 val)
+{
+ register unsigned long reg0 asm("0") = val;
+
+ asm volatile("sckpf" : : "d" (reg0));
+}
+
void clock_comparator_work(void);
void __init time_early_init(void);
diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h
index 9b299c05abf1..f65590889054 100644
--- a/arch/s390/include/asm/vdso.h
+++ b/arch/s390/include/asm/vdso.h
@@ -14,5 +14,7 @@
extern struct vdso_data *vdso_data;
+void vdso_getcpu_init(void);
+
#endif /* __ASSEMBLY__ */
#endif /* __S390_VDSO_H__ */