diff options
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/auxvec.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/bug.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/byteorder.h | 72 | ||||
-rw-r--r-- | arch/s390/include/asm/elf.h | 16 | ||||
-rw-r--r-- | arch/s390/include/asm/fcx.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/ftrace.h | 8 | ||||
-rw-r--r-- | arch/s390/include/asm/isc.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/mmu.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/pgalloc.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/qdio.h | 16 | ||||
-rw-r--r-- | arch/s390/include/asm/sigp.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/smp.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/sysinfo.h | 11 | ||||
-rw-r--r-- | arch/s390/include/asm/system.h | 24 | ||||
-rw-r--r-- | arch/s390/include/asm/timer.h | 9 | ||||
-rw-r--r-- | arch/s390/include/asm/vdso.h | 39 |
18 files changed, 144 insertions, 81 deletions
diff --git a/arch/s390/include/asm/auxvec.h b/arch/s390/include/asm/auxvec.h index 0d340720fd99..a1f153e89133 100644 --- a/arch/s390/include/asm/auxvec.h +++ b/arch/s390/include/asm/auxvec.h | |||
@@ -1,4 +1,6 @@ | |||
1 | #ifndef __ASMS390_AUXVEC_H | 1 | #ifndef __ASMS390_AUXVEC_H |
2 | #define __ASMS390_AUXVEC_H | 2 | #define __ASMS390_AUXVEC_H |
3 | 3 | ||
4 | #define AT_SYSINFO_EHDR 33 | ||
5 | |||
4 | #endif | 6 | #endif |
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index 384e3621e341..7efd0abe8887 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h | |||
@@ -47,7 +47,10 @@ | |||
47 | 47 | ||
48 | #endif /* CONFIG_DEBUG_BUGVERBOSE */ | 48 | #endif /* CONFIG_DEBUG_BUGVERBOSE */ |
49 | 49 | ||
50 | #define BUG() __EMIT_BUG(0) | 50 | #define BUG() do { \ |
51 | __EMIT_BUG(0); \ | ||
52 | for (;;); \ | ||
53 | } while (0) | ||
51 | 54 | ||
52 | #define WARN_ON(x) ({ \ | 55 | #define WARN_ON(x) ({ \ |
53 | int __ret_warn_on = !!(x); \ | 56 | int __ret_warn_on = !!(x); \ |
diff --git a/arch/s390/include/asm/byteorder.h b/arch/s390/include/asm/byteorder.h index 1fe2492baa8d..8bcf277c8468 100644 --- a/arch/s390/include/asm/byteorder.h +++ b/arch/s390/include/asm/byteorder.h | |||
@@ -11,32 +11,39 @@ | |||
11 | 11 | ||
12 | #include <asm/types.h> | 12 | #include <asm/types.h> |
13 | 13 | ||
14 | #ifdef __GNUC__ | 14 | #define __BIG_ENDIAN |
15 | |||
16 | #ifndef __s390x__ | ||
17 | # define __SWAB_64_THRU_32__ | ||
18 | #endif | ||
15 | 19 | ||
16 | #ifdef __s390x__ | 20 | #ifdef __s390x__ |
17 | static inline __u64 ___arch__swab64p(const __u64 *x) | 21 | static inline __u64 __arch_swab64p(const __u64 *x) |
18 | { | 22 | { |
19 | __u64 result; | 23 | __u64 result; |
20 | 24 | ||
21 | asm volatile("lrvg %0,%1" : "=d" (result) : "m" (*x)); | 25 | asm volatile("lrvg %0,%1" : "=d" (result) : "m" (*x)); |
22 | return result; | 26 | return result; |
23 | } | 27 | } |
28 | #define __arch_swab64p __arch_swab64p | ||
24 | 29 | ||
25 | static inline __u64 ___arch__swab64(__u64 x) | 30 | static inline __u64 __arch_swab64(__u64 x) |
26 | { | 31 | { |
27 | __u64 result; | 32 | __u64 result; |
28 | 33 | ||
29 | asm volatile("lrvgr %0,%1" : "=d" (result) : "d" (x)); | 34 | asm volatile("lrvgr %0,%1" : "=d" (result) : "d" (x)); |
30 | return result; | 35 | return result; |
31 | } | 36 | } |
37 | #define __arch_swab64 __arch_swab64 | ||
32 | 38 | ||
33 | static inline void ___arch__swab64s(__u64 *x) | 39 | static inline void __arch_swab64s(__u64 *x) |
34 | { | 40 | { |
35 | *x = ___arch__swab64p(x); | 41 | *x = __arch_swab64p(x); |
36 | } | 42 | } |
43 | #define __arch_swab64s __arch_swab64s | ||
37 | #endif /* __s390x__ */ | 44 | #endif /* __s390x__ */ |
38 | 45 | ||
39 | static inline __u32 ___arch__swab32p(const __u32 *x) | 46 | static inline __u32 __arch_swab32p(const __u32 *x) |
40 | { | 47 | { |
41 | __u32 result; | 48 | __u32 result; |
42 | 49 | ||
@@ -53,25 +60,20 @@ static inline __u32 ___arch__swab32p(const __u32 *x) | |||
53 | #endif /* __s390x__ */ | 60 | #endif /* __s390x__ */ |
54 | return result; | 61 | return result; |
55 | } | 62 | } |
63 | #define __arch_swab32p __arch_swab32p | ||
56 | 64 | ||
57 | static inline __u32 ___arch__swab32(__u32 x) | 65 | #ifdef __s390x__ |
66 | static inline __u32 __arch_swab32(__u32 x) | ||
58 | { | 67 | { |
59 | #ifndef __s390x__ | ||
60 | return ___arch__swab32p(&x); | ||
61 | #else /* __s390x__ */ | ||
62 | __u32 result; | 68 | __u32 result; |
63 | 69 | ||
64 | asm volatile("lrvr %0,%1" : "=d" (result) : "d" (x)); | 70 | asm volatile("lrvr %0,%1" : "=d" (result) : "d" (x)); |
65 | return result; | 71 | return result; |
66 | #endif /* __s390x__ */ | ||
67 | } | ||
68 | |||
69 | static __inline__ void ___arch__swab32s(__u32 *x) | ||
70 | { | ||
71 | *x = ___arch__swab32p(x); | ||
72 | } | 72 | } |
73 | #define __arch_swab32 __arch_swab32 | ||
74 | #endif /* __s390x__ */ | ||
73 | 75 | ||
74 | static __inline__ __u16 ___arch__swab16p(const __u16 *x) | 76 | static inline __u16 __arch_swab16p(const __u16 *x) |
75 | { | 77 | { |
76 | __u16 result; | 78 | __u16 result; |
77 | 79 | ||
@@ -86,40 +88,8 @@ static __inline__ __u16 ___arch__swab16p(const __u16 *x) | |||
86 | #endif /* __s390x__ */ | 88 | #endif /* __s390x__ */ |
87 | return result; | 89 | return result; |
88 | } | 90 | } |
91 | #define __arch_swab16p __arch_swab16p | ||
89 | 92 | ||
90 | static __inline__ __u16 ___arch__swab16(__u16 x) | 93 | #include <linux/byteorder.h> |
91 | { | ||
92 | return ___arch__swab16p(&x); | ||
93 | } | ||
94 | |||
95 | static __inline__ void ___arch__swab16s(__u16 *x) | ||
96 | { | ||
97 | *x = ___arch__swab16p(x); | ||
98 | } | ||
99 | |||
100 | #ifdef __s390x__ | ||
101 | #define __arch__swab64(x) ___arch__swab64(x) | ||
102 | #define __arch__swab64p(x) ___arch__swab64p(x) | ||
103 | #define __arch__swab64s(x) ___arch__swab64s(x) | ||
104 | #endif /* __s390x__ */ | ||
105 | #define __arch__swab32(x) ___arch__swab32(x) | ||
106 | #define __arch__swab16(x) ___arch__swab16(x) | ||
107 | #define __arch__swab32p(x) ___arch__swab32p(x) | ||
108 | #define __arch__swab16p(x) ___arch__swab16p(x) | ||
109 | #define __arch__swab32s(x) ___arch__swab32s(x) | ||
110 | #define __arch__swab16s(x) ___arch__swab16s(x) | ||
111 | |||
112 | #ifndef __s390x__ | ||
113 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
114 | # define __BYTEORDER_HAS_U64__ | ||
115 | # define __SWAB_64_THRU_32__ | ||
116 | #endif | ||
117 | #else /* __s390x__ */ | ||
118 | #define __BYTEORDER_HAS_U64__ | ||
119 | #endif /* __s390x__ */ | ||
120 | |||
121 | #endif /* __GNUC__ */ | ||
122 | |||
123 | #include <linux/byteorder/big_endian.h> | ||
124 | 94 | ||
125 | #endif /* _S390_BYTEORDER_H */ | 95 | #endif /* _S390_BYTEORDER_H */ |
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index 261785ab5b22..d480f39d65e6 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h | |||
@@ -120,6 +120,10 @@ typedef s390_compat_regs compat_elf_gregset_t; | |||
120 | #include <asm/system.h> /* for save_access_regs */ | 120 | #include <asm/system.h> /* for save_access_regs */ |
121 | #include <asm/mmu_context.h> | 121 | #include <asm/mmu_context.h> |
122 | 122 | ||
123 | #include <asm/vdso.h> | ||
124 | |||
125 | extern unsigned int vdso_enabled; | ||
126 | |||
123 | /* | 127 | /* |
124 | * This is used to ensure we don't load something for the wrong architecture. | 128 | * This is used to ensure we don't load something for the wrong architecture. |
125 | */ | 129 | */ |
@@ -191,4 +195,16 @@ do { \ | |||
191 | current->mm->context.noexec == 0; \ | 195 | current->mm->context.noexec == 0; \ |
192 | }) | 196 | }) |
193 | 197 | ||
198 | #define ARCH_DLINFO \ | ||
199 | do { \ | ||
200 | if (vdso_enabled) \ | ||
201 | NEW_AUX_ENT(AT_SYSINFO_EHDR, \ | ||
202 | (unsigned long)current->mm->context.vdso_base); \ | ||
203 | } while (0) | ||
204 | |||
205 | struct linux_binprm; | ||
206 | |||
207 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | ||
208 | int arch_setup_additional_pages(struct linux_binprm *, int); | ||
209 | |||
194 | #endif | 210 | #endif |
diff --git a/arch/s390/include/asm/fcx.h b/arch/s390/include/asm/fcx.h index 8be1f3a58042..ef6170995076 100644 --- a/arch/s390/include/asm/fcx.h +++ b/arch/s390/include/asm/fcx.h | |||
@@ -248,8 +248,8 @@ struct dcw { | |||
248 | #define TCCB_MAX_SIZE (sizeof(struct tccb_tcah) + \ | 248 | #define TCCB_MAX_SIZE (sizeof(struct tccb_tcah) + \ |
249 | TCCB_MAX_DCW * sizeof(struct dcw) + \ | 249 | TCCB_MAX_DCW * sizeof(struct dcw) + \ |
250 | sizeof(struct tccb_tcat)) | 250 | sizeof(struct tccb_tcat)) |
251 | #define TCCB_SAC_DEFAULT 0xf901 | 251 | #define TCCB_SAC_DEFAULT 0x1ffe |
252 | #define TCCB_SAC_INTRG 0xf902 | 252 | #define TCCB_SAC_INTRG 0x1fff |
253 | 253 | ||
254 | /** | 254 | /** |
255 | * struct tccb_tcah - Transport-Command-Area Header (TCAH) | 255 | * struct tccb_tcah - Transport-Command-Area Header (TCAH) |
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h new file mode 100644 index 000000000000..5a5bc75e19d4 --- /dev/null +++ b/arch/s390/include/asm/ftrace.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _ASM_S390_FTRACE_H | ||
2 | #define _ASM_S390_FTRACE_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | extern void _mcount(void); | ||
6 | #endif | ||
7 | |||
8 | #endif /* _ASM_S390_FTRACE_H */ | ||
diff --git a/arch/s390/include/asm/isc.h b/arch/s390/include/asm/isc.h index 34bb8916db4f..1420a1115948 100644 --- a/arch/s390/include/asm/isc.h +++ b/arch/s390/include/asm/isc.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define CHSC_SCH_ISC 7 /* CHSC subchannels */ | 17 | #define CHSC_SCH_ISC 7 /* CHSC subchannels */ |
18 | /* Adapter interrupts. */ | 18 | /* Adapter interrupts. */ |
19 | #define QDIO_AIRQ_ISC IO_SCH_ISC /* I/O subchannel in qdio mode */ | 19 | #define QDIO_AIRQ_ISC IO_SCH_ISC /* I/O subchannel in qdio mode */ |
20 | #define AP_ISC 6 /* adjunct processor (crypto) devices */ | ||
20 | 21 | ||
21 | /* Functions for registration of I/O interruption subclasses */ | 22 | /* Functions for registration of I/O interruption subclasses */ |
22 | void isc_register(unsigned int isc); | 23 | void isc_register(unsigned int isc); |
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h index d2b4ff831477..3b59216e6284 100644 --- a/arch/s390/include/asm/mmu.h +++ b/arch/s390/include/asm/mmu.h | |||
@@ -6,6 +6,7 @@ typedef struct { | |||
6 | struct list_head pgtable_list; | 6 | struct list_head pgtable_list; |
7 | unsigned long asce_bits; | 7 | unsigned long asce_bits; |
8 | unsigned long asce_limit; | 8 | unsigned long asce_limit; |
9 | unsigned long vdso_base; | ||
9 | int noexec; | 10 | int noexec; |
10 | int has_pgste; /* The mmu context has extended page tables */ | 11 | int has_pgste; /* The mmu context has extended page tables */ |
11 | int alloc_pgste; /* cloned contexts will have extended page tables */ | 12 | int alloc_pgste; /* cloned contexts will have extended page tables */ |
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 991ba939408c..32e8f6aa4384 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
@@ -152,4 +152,6 @@ void arch_alloc_page(struct page *page, int order); | |||
152 | #include <asm-generic/memory_model.h> | 152 | #include <asm-generic/memory_model.h> |
153 | #include <asm-generic/page.h> | 153 | #include <asm-generic/page.h> |
154 | 154 | ||
155 | #define __HAVE_ARCH_GATE_AREA 1 | ||
156 | |||
155 | #endif /* _S390_PAGE_H */ | 157 | #endif /* _S390_PAGE_H */ |
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h index f5b2bf3d7c1d..b2658b9220fe 100644 --- a/arch/s390/include/asm/pgalloc.h +++ b/arch/s390/include/asm/pgalloc.h | |||
@@ -28,6 +28,8 @@ void disable_noexec(struct mm_struct *, struct task_struct *); | |||
28 | 28 | ||
29 | static inline void clear_table(unsigned long *s, unsigned long val, size_t n) | 29 | static inline void clear_table(unsigned long *s, unsigned long val, size_t n) |
30 | { | 30 | { |
31 | typedef struct { char _[n]; } addrtype; | ||
32 | |||
31 | *s = val; | 33 | *s = val; |
32 | n = (n / 256) - 1; | 34 | n = (n / 256) - 1; |
33 | asm volatile( | 35 | asm volatile( |
@@ -39,7 +41,8 @@ static inline void clear_table(unsigned long *s, unsigned long val, size_t n) | |||
39 | "0: mvc 256(256,%0),0(%0)\n" | 41 | "0: mvc 256(256,%0),0(%0)\n" |
40 | " la %0,256(%0)\n" | 42 | " la %0,256(%0)\n" |
41 | " brct %1,0b\n" | 43 | " brct %1,0b\n" |
42 | : "+a" (s), "+d" (n)); | 44 | : "+a" (s), "+d" (n), "=m" (*(addrtype *) s) |
45 | : "m" (*(addrtype *) s)); | ||
43 | } | 46 | } |
44 | 47 | ||
45 | static inline void crst_table_init(unsigned long *crst, unsigned long entry) | 48 | static inline void crst_table_init(unsigned long *crst, unsigned long entry) |
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 4af80af2a88f..066b99502e09 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef __ASM_S390_PROCESSOR_H | 13 | #ifndef __ASM_S390_PROCESSOR_H |
14 | #define __ASM_S390_PROCESSOR_H | 14 | #define __ASM_S390_PROCESSOR_H |
15 | 15 | ||
16 | #include <linux/linkage.h> | ||
16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
17 | 18 | ||
18 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
@@ -258,7 +259,7 @@ static inline void enabled_wait(void) | |||
258 | * Function to drop a processor into disabled wait state | 259 | * Function to drop a processor into disabled wait state |
259 | */ | 260 | */ |
260 | 261 | ||
261 | static inline void disabled_wait(unsigned long code) | 262 | static inline void ATTRIB_NORET disabled_wait(unsigned long code) |
262 | { | 263 | { |
263 | unsigned long ctl_buf; | 264 | unsigned long ctl_buf; |
264 | psw_t dw_psw; | 265 | psw_t dw_psw; |
@@ -322,6 +323,7 @@ static inline void disabled_wait(unsigned long code) | |||
322 | : "=m" (ctl_buf) | 323 | : "=m" (ctl_buf) |
323 | : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0"); | 324 | : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0"); |
324 | #endif /* __s390x__ */ | 325 | #endif /* __s390x__ */ |
326 | while (1); | ||
325 | } | 327 | } |
326 | 328 | ||
327 | /* | 329 | /* |
diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h index 4734c3f05354..27fc1746de15 100644 --- a/arch/s390/include/asm/qdio.h +++ b/arch/s390/include/asm/qdio.h | |||
@@ -373,16 +373,16 @@ struct qdio_initialize { | |||
373 | #define QDIO_FLAG_SYNC_OUTPUT 0x02 | 373 | #define QDIO_FLAG_SYNC_OUTPUT 0x02 |
374 | #define QDIO_FLAG_PCI_OUT 0x10 | 374 | #define QDIO_FLAG_PCI_OUT 0x10 |
375 | 375 | ||
376 | extern int qdio_initialize(struct qdio_initialize *init_data); | 376 | extern int qdio_initialize(struct qdio_initialize *); |
377 | extern int qdio_allocate(struct qdio_initialize *init_data); | 377 | extern int qdio_allocate(struct qdio_initialize *); |
378 | extern int qdio_establish(struct qdio_initialize *init_data); | 378 | extern int qdio_establish(struct qdio_initialize *); |
379 | extern int qdio_activate(struct ccw_device *); | 379 | extern int qdio_activate(struct ccw_device *); |
380 | 380 | ||
381 | extern int do_QDIO(struct ccw_device*, unsigned int flags, | 381 | extern int do_QDIO(struct ccw_device *cdev, unsigned int callflags, |
382 | int q_nr, int qidx, int count); | 382 | int q_nr, int bufnr, int count); |
383 | extern int qdio_cleanup(struct ccw_device*, int how); | 383 | extern int qdio_cleanup(struct ccw_device*, int); |
384 | extern int qdio_shutdown(struct ccw_device*, int how); | 384 | extern int qdio_shutdown(struct ccw_device*, int); |
385 | extern int qdio_free(struct ccw_device *); | 385 | extern int qdio_free(struct ccw_device *); |
386 | extern struct qdio_ssqd_desc *qdio_get_ssqd_desc(struct ccw_device *cdev); | 386 | extern int qdio_get_ssqd_desc(struct ccw_device *dev, struct qdio_ssqd_desc*); |
387 | 387 | ||
388 | #endif /* __QDIO_H__ */ | 388 | #endif /* __QDIO_H__ */ |
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h index e16d56f8dfe1..ec403d4304f8 100644 --- a/arch/s390/include/asm/sigp.h +++ b/arch/s390/include/asm/sigp.h | |||
@@ -61,6 +61,7 @@ typedef enum | |||
61 | { | 61 | { |
62 | ec_schedule=0, | 62 | ec_schedule=0, |
63 | ec_call_function, | 63 | ec_call_function, |
64 | ec_call_function_single, | ||
64 | ec_bit_last | 65 | ec_bit_last |
65 | } ec_bit_sig; | 66 | } ec_bit_sig; |
66 | 67 | ||
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h index ae89cf2478fc..024b91e06239 100644 --- a/arch/s390/include/asm/smp.h +++ b/arch/s390/include/asm/smp.h | |||
@@ -91,8 +91,9 @@ extern int __cpu_up (unsigned int cpu); | |||
91 | extern struct mutex smp_cpu_state_mutex; | 91 | extern struct mutex smp_cpu_state_mutex; |
92 | extern int smp_cpu_polarization[]; | 92 | extern int smp_cpu_polarization[]; |
93 | 93 | ||
94 | extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), | 94 | extern void arch_send_call_function_single_ipi(int cpu); |
95 | void *info, int wait); | 95 | extern void arch_send_call_function_ipi(cpumask_t mask); |
96 | |||
96 | #endif | 97 | #endif |
97 | 98 | ||
98 | #ifndef CONFIG_SMP | 99 | #ifndef CONFIG_SMP |
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h index 79d01343f8b0..ad93212d9e16 100644 --- a/arch/s390/include/asm/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h | |||
@@ -118,4 +118,15 @@ static inline int stsi(void *sysinfo, int fc, int sel1, int sel2) | |||
118 | return r0; | 118 | return r0; |
119 | } | 119 | } |
120 | 120 | ||
121 | /* | ||
122 | * Service level reporting interface. | ||
123 | */ | ||
124 | struct service_level { | ||
125 | struct list_head list; | ||
126 | void (*seq_print)(struct seq_file *, struct service_level *); | ||
127 | }; | ||
128 | |||
129 | int register_service_level(struct service_level *); | ||
130 | int unregister_service_level(struct service_level *); | ||
131 | |||
121 | #endif /* __ASM_S390_SYSINFO_H */ | 132 | #endif /* __ASM_S390_SYSINFO_H */ |
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 819e7d99ca0c..024ef42ed6d7 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define __ASM_SYSTEM_H | 12 | #define __ASM_SYSTEM_H |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | ||
15 | #include <asm/types.h> | 16 | #include <asm/types.h> |
16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
17 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
@@ -98,13 +99,9 @@ static inline void restore_access_regs(unsigned int *acrs) | |||
98 | prev = __switch_to(prev,next); \ | 99 | prev = __switch_to(prev,next); \ |
99 | } while (0) | 100 | } while (0) |
100 | 101 | ||
101 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
102 | extern void account_vtime(struct task_struct *); | 102 | extern void account_vtime(struct task_struct *); |
103 | extern void account_tick_vtime(struct task_struct *); | 103 | extern void account_tick_vtime(struct task_struct *); |
104 | extern void account_system_vtime(struct task_struct *); | 104 | extern void account_system_vtime(struct task_struct *); |
105 | #else | ||
106 | #define account_vtime(x) do { /* empty */ } while (0) | ||
107 | #endif | ||
108 | 105 | ||
109 | #ifdef CONFIG_PFAULT | 106 | #ifdef CONFIG_PFAULT |
110 | extern void pfault_irq_init(void); | 107 | extern void pfault_irq_init(void); |
@@ -413,8 +410,6 @@ __set_psw_mask(unsigned long mask) | |||
413 | #define local_mcck_enable() __set_psw_mask(psw_kernel_bits) | 410 | #define local_mcck_enable() __set_psw_mask(psw_kernel_bits) |
414 | #define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) | 411 | #define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) |
415 | 412 | ||
416 | int stfle(unsigned long long *list, int doublewords); | ||
417 | |||
418 | #ifdef CONFIG_SMP | 413 | #ifdef CONFIG_SMP |
419 | 414 | ||
420 | extern void smp_ctl_set_bit(int cr, int bit); | 415 | extern void smp_ctl_set_bit(int cr, int bit); |
@@ -438,6 +433,23 @@ static inline unsigned int stfl(void) | |||
438 | return S390_lowcore.stfl_fac_list; | 433 | return S390_lowcore.stfl_fac_list; |
439 | } | 434 | } |
440 | 435 | ||
436 | static inline int __stfle(unsigned long long *list, int doublewords) | ||
437 | { | ||
438 | typedef struct { unsigned long long _[doublewords]; } addrtype; | ||
439 | register unsigned long __nr asm("0") = doublewords - 1; | ||
440 | |||
441 | asm volatile(".insn s,0xb2b00000,%0" /* stfle */ | ||
442 | : "=m" (*(addrtype *) list), "+d" (__nr) : : "cc"); | ||
443 | return __nr + 1; | ||
444 | } | ||
445 | |||
446 | static inline int stfle(unsigned long long *list, int doublewords) | ||
447 | { | ||
448 | if (!(stfl() & (1UL << 24))) | ||
449 | return -EOPNOTSUPP; | ||
450 | return __stfle(list, doublewords); | ||
451 | } | ||
452 | |||
441 | static inline unsigned short stap(void) | 453 | static inline unsigned short stap(void) |
442 | { | 454 | { |
443 | unsigned short cpu_address; | 455 | unsigned short cpu_address; |
diff --git a/arch/s390/include/asm/timer.h b/arch/s390/include/asm/timer.h index d98d79e35cd6..61705d60f995 100644 --- a/arch/s390/include/asm/timer.h +++ b/arch/s390/include/asm/timer.h | |||
@@ -48,18 +48,9 @@ extern int del_virt_timer(struct vtimer_list *timer); | |||
48 | extern void init_cpu_vtimer(void); | 48 | extern void init_cpu_vtimer(void); |
49 | extern void vtime_init(void); | 49 | extern void vtime_init(void); |
50 | 50 | ||
51 | #ifdef CONFIG_VIRT_TIMER | ||
52 | |||
53 | extern void vtime_start_cpu_timer(void); | 51 | extern void vtime_start_cpu_timer(void); |
54 | extern void vtime_stop_cpu_timer(void); | 52 | extern void vtime_stop_cpu_timer(void); |
55 | 53 | ||
56 | #else | ||
57 | |||
58 | static inline void vtime_start_cpu_timer(void) { } | ||
59 | static inline void vtime_stop_cpu_timer(void) { } | ||
60 | |||
61 | #endif /* CONFIG_VIRT_TIMER */ | ||
62 | |||
63 | #endif /* __KERNEL__ */ | 54 | #endif /* __KERNEL__ */ |
64 | 55 | ||
65 | #endif /* _ASM_S390_TIMER_H */ | 56 | #endif /* _ASM_S390_TIMER_H */ |
diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h new file mode 100644 index 000000000000..a44f4fe16a35 --- /dev/null +++ b/arch/s390/include/asm/vdso.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef __S390_VDSO_H__ | ||
2 | #define __S390_VDSO_H__ | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | /* Default link addresses for the vDSOs */ | ||
7 | #define VDSO32_LBASE 0 | ||
8 | #define VDSO64_LBASE 0 | ||
9 | |||
10 | #define VDSO_VERSION_STRING LINUX_2.6.26 | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | |||
14 | /* | ||
15 | * Note about this structure: | ||
16 | * | ||
17 | * NEVER USE THIS IN USERSPACE CODE DIRECTLY. The layout of this | ||
18 | * structure is supposed to be known only to the function in the vdso | ||
19 | * itself and may change without notice. | ||
20 | */ | ||
21 | |||
22 | struct vdso_data { | ||
23 | __u64 tb_update_count; /* Timebase atomicity ctr 0x00 */ | ||
24 | __u64 xtime_tod_stamp; /* TOD clock for xtime 0x08 */ | ||
25 | __u64 xtime_clock_sec; /* Kernel time 0x10 */ | ||
26 | __u64 xtime_clock_nsec; /* 0x18 */ | ||
27 | __u64 wtom_clock_sec; /* Wall to monotonic clock 0x20 */ | ||
28 | __u64 wtom_clock_nsec; /* 0x28 */ | ||
29 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ | ||
30 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ | ||
31 | }; | ||
32 | |||
33 | extern struct vdso_data *vdso_data; | ||
34 | |||
35 | #endif /* __ASSEMBLY__ */ | ||
36 | |||
37 | #endif /* __KERNEL__ */ | ||
38 | |||
39 | #endif /* __S390_VDSO_H__ */ | ||