aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/ccwgroup.h2
-rw-r--r--arch/s390/include/asm/sigp.h19
-rw-r--r--arch/s390/include/asm/smp.h13
-rw-r--r--arch/s390/include/asm/tlb.h13
-rw-r--r--arch/s390/include/uapi/asm/unistd.h3
5 files changed, 46 insertions, 4 deletions
diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h
index 6e670f88d125..ebc2913f9ee0 100644
--- a/arch/s390/include/asm/ccwgroup.h
+++ b/arch/s390/include/asm/ccwgroup.h
@@ -22,8 +22,8 @@ struct ccwgroup_device {
22/* public: */ 22/* public: */
23 unsigned int count; 23 unsigned int count;
24 struct device dev; 24 struct device dev;
25 struct ccw_device *cdev[0];
26 struct work_struct ungroup_work; 25 struct work_struct ungroup_work;
26 struct ccw_device *cdev[0];
27}; 27};
28 28
29/** 29/**
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h
index d091aa1aaf11..bf9c823d4020 100644
--- a/arch/s390/include/asm/sigp.h
+++ b/arch/s390/include/asm/sigp.h
@@ -31,4 +31,23 @@
31#define SIGP_STATUS_INCORRECT_STATE 0x00000200UL 31#define SIGP_STATUS_INCORRECT_STATE 0x00000200UL
32#define SIGP_STATUS_NOT_RUNNING 0x00000400UL 32#define SIGP_STATUS_NOT_RUNNING 0x00000400UL
33 33
34#ifndef __ASSEMBLY__
35
36static inline int __pcpu_sigp(u16 addr, u8 order, u32 parm, u32 *status)
37{
38 register unsigned int reg1 asm ("1") = parm;
39 int cc;
40
41 asm volatile(
42 " sigp %1,%2,0(%3)\n"
43 " ipm %0\n"
44 " srl %0,28\n"
45 : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
46 if (status && cc == 1)
47 *status = reg1;
48 return cc;
49}
50
51#endif /* __ASSEMBLY__ */
52
34#endif /* __S390_ASM_SIGP_H */ 53#endif /* __S390_ASM_SIGP_H */
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index 160779394096..21703f85b48d 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -7,6 +7,8 @@
7#ifndef __ASM_SMP_H 7#ifndef __ASM_SMP_H
8#define __ASM_SMP_H 8#define __ASM_SMP_H
9 9
10#include <asm/sigp.h>
11
10#ifdef CONFIG_SMP 12#ifdef CONFIG_SMP
11 13
12#include <asm/lowcore.h> 14#include <asm/lowcore.h>
@@ -50,9 +52,18 @@ static inline int smp_store_status(int cpu) { return 0; }
50static inline int smp_vcpu_scheduled(int cpu) { return 1; } 52static inline int smp_vcpu_scheduled(int cpu) { return 1; }
51static inline void smp_yield_cpu(int cpu) { } 53static inline void smp_yield_cpu(int cpu) { }
52static inline void smp_yield(void) { } 54static inline void smp_yield(void) { }
53static inline void smp_stop_cpu(void) { }
54static inline void smp_fill_possible_mask(void) { } 55static inline void smp_fill_possible_mask(void) { }
55 56
57static inline void smp_stop_cpu(void)
58{
59 u16 pcpu = stap();
60
61 for (;;) {
62 __pcpu_sigp(pcpu, SIGP_STOP, 0, NULL);
63 cpu_relax();
64 }
65}
66
56#endif /* CONFIG_SMP */ 67#endif /* CONFIG_SMP */
57 68
58#ifdef CONFIG_HOTPLUG_CPU 69#ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
index c544b6f05d95..a25f09fbaf36 100644
--- a/arch/s390/include/asm/tlb.h
+++ b/arch/s390/include/asm/tlb.h
@@ -59,12 +59,23 @@ static inline void tlb_gather_mmu(struct mmu_gather *tlb,
59 tlb->batch = NULL; 59 tlb->batch = NULL;
60} 60}
61 61
62static inline void tlb_flush_mmu(struct mmu_gather *tlb) 62static inline void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb)
63{ 63{
64 __tlb_flush_mm_lazy(tlb->mm); 64 __tlb_flush_mm_lazy(tlb->mm);
65}
66
67static inline void tlb_flush_mmu_free(struct mmu_gather *tlb)
68{
65 tlb_table_flush(tlb); 69 tlb_table_flush(tlb);
66} 70}
67 71
72
73static inline void tlb_flush_mmu(struct mmu_gather *tlb)
74{
75 tlb_flush_mmu_tlbonly(tlb);
76 tlb_flush_mmu_free(tlb);
77}
78
68static inline void tlb_finish_mmu(struct mmu_gather *tlb, 79static inline void tlb_finish_mmu(struct mmu_gather *tlb,
69 unsigned long start, unsigned long end) 80 unsigned long start, unsigned long end)
70{ 81{
diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h
index 5eb5c9ddb120..3802d2d3a18d 100644
--- a/arch/s390/include/uapi/asm/unistd.h
+++ b/arch/s390/include/uapi/asm/unistd.h
@@ -282,7 +282,8 @@
282#define __NR_finit_module 344 282#define __NR_finit_module 344
283#define __NR_sched_setattr 345 283#define __NR_sched_setattr 345
284#define __NR_sched_getattr 346 284#define __NR_sched_getattr 346
285#define NR_syscalls 345 285#define __NR_renameat2 347
286#define NR_syscalls 348
286 287
287/* 288/*
288 * There are some system calls that are not present on 64 bit, some 289 * There are some system calls that are not present on 64 bit, some