diff options
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/cpuid.h | 25 | ||||
-rw-r--r-- | arch/s390/include/asm/cputime.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 12 | ||||
-rw-r--r-- | arch/s390/include/asm/processor.h | 17 | ||||
-rw-r--r-- | arch/s390/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/setup.h | 24 | ||||
-rw-r--r-- | arch/s390/include/asm/thread_info.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/timer.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/timex.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/unistd.h | 4 |
11 files changed, 64 insertions, 34 deletions
diff --git a/arch/s390/include/asm/cpuid.h b/arch/s390/include/asm/cpuid.h new file mode 100644 index 000000000000..07836a2e5222 --- /dev/null +++ b/arch/s390/include/asm/cpuid.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright IBM Corp. 2000,2009 | ||
3 | * Author(s): Hartmut Penner <hp@de.ibm.com>, | ||
4 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
5 | * Christian Ehrhardt <ehrhardt@de.ibm.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_S390_CPUID_H_ | ||
9 | #define _ASM_S390_CPUID_H_ | ||
10 | |||
11 | /* | ||
12 | * CPU type and hardware bug flags. Kept separately for each CPU. | ||
13 | * Members of this structure are referenced in head.S, so think twice | ||
14 | * before touching them. [mj] | ||
15 | */ | ||
16 | |||
17 | typedef struct | ||
18 | { | ||
19 | unsigned int version : 8; | ||
20 | unsigned int ident : 24; | ||
21 | unsigned int machine : 16; | ||
22 | unsigned int unused : 16; | ||
23 | } __attribute__ ((packed)) cpuid_t; | ||
24 | |||
25 | #endif /* _ASM_S390_CPUID_H_ */ | ||
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 95b0f7db3c69..941384fbd39c 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -174,4 +174,8 @@ cputime64_to_clock_t(cputime64_t cputime) | |||
174 | return __div(cputime, 4096000000ULL / USER_HZ); | 174 | return __div(cputime, 4096000000ULL / USER_HZ); |
175 | } | 175 | } |
176 | 176 | ||
177 | cputime64_t s390_get_idle_time(int cpu); | ||
178 | |||
179 | #define arch_idle_time(cpu) s390_get_idle_time(cpu) | ||
180 | |||
177 | #endif /* _S390_CPUTIME_H */ | 181 | #endif /* _S390_CPUTIME_H */ |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index c6e674f5fca9..54ea39f96ecd 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define ASM_KVM_HOST_H | 15 | #define ASM_KVM_HOST_H |
16 | #include <linux/kvm_host.h> | 16 | #include <linux/kvm_host.h> |
17 | #include <asm/debug.h> | 17 | #include <asm/debug.h> |
18 | #include <asm/cpuid.h> | ||
18 | 19 | ||
19 | #define KVM_MAX_VCPUS 64 | 20 | #define KVM_MAX_VCPUS 64 |
20 | #define KVM_MEMORY_SLOTS 32 | 21 | #define KVM_MEMORY_SLOTS 32 |
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index b349f1c7fdfa..3aeca492b147 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -66,6 +66,7 @@ | |||
66 | #define __LC_USER_EXEC_ASCE 0x02ac | 66 | #define __LC_USER_EXEC_ASCE 0x02ac |
67 | #define __LC_CPUID 0x02b0 | 67 | #define __LC_CPUID 0x02b0 |
68 | #define __LC_INT_CLOCK 0x02c8 | 68 | #define __LC_INT_CLOCK 0x02c8 |
69 | #define __LC_MACHINE_FLAGS 0x02d8 | ||
69 | #define __LC_IRB 0x0300 | 70 | #define __LC_IRB 0x0300 |
70 | #define __LC_PFAULT_INTPARM 0x0080 | 71 | #define __LC_PFAULT_INTPARM 0x0080 |
71 | #define __LC_CPU_TIMER_SAVE_AREA 0x00d8 | 72 | #define __LC_CPU_TIMER_SAVE_AREA 0x00d8 |
@@ -110,6 +111,7 @@ | |||
110 | #define __LC_CPUID 0x0320 | 111 | #define __LC_CPUID 0x0320 |
111 | #define __LC_INT_CLOCK 0x0340 | 112 | #define __LC_INT_CLOCK 0x0340 |
112 | #define __LC_VDSO_PER_CPU 0x0350 | 113 | #define __LC_VDSO_PER_CPU 0x0350 |
114 | #define __LC_MACHINE_FLAGS 0x0358 | ||
113 | #define __LC_IRB 0x0380 | 115 | #define __LC_IRB 0x0380 |
114 | #define __LC_PASTE 0x03c0 | 116 | #define __LC_PASTE 0x03c0 |
115 | #define __LC_PFAULT_INTPARM 0x11b8 | 117 | #define __LC_PFAULT_INTPARM 0x11b8 |
@@ -127,9 +129,9 @@ | |||
127 | 129 | ||
128 | #ifndef __ASSEMBLY__ | 130 | #ifndef __ASSEMBLY__ |
129 | 131 | ||
130 | #include <asm/processor.h> | 132 | #include <asm/cpuid.h> |
133 | #include <asm/ptrace.h> | ||
131 | #include <linux/types.h> | 134 | #include <linux/types.h> |
132 | #include <asm/sigp.h> | ||
133 | 135 | ||
134 | void restart_int_handler(void); | 136 | void restart_int_handler(void); |
135 | void ext_int_handler(void); | 137 | void ext_int_handler(void); |
@@ -277,7 +279,8 @@ struct _lowcore | |||
277 | __u32 ext_call_fast; /* 0x02c4 */ | 279 | __u32 ext_call_fast; /* 0x02c4 */ |
278 | __u64 int_clock; /* 0x02c8 */ | 280 | __u64 int_clock; /* 0x02c8 */ |
279 | __u64 clock_comparator; /* 0x02d0 */ | 281 | __u64 clock_comparator; /* 0x02d0 */ |
280 | __u8 pad_0x02d8[0x0300-0x02d8]; /* 0x02d8 */ | 282 | __u32 machine_flags; /* 0x02d8 */ |
283 | __u8 pad_0x02dc[0x0300-0x02dc]; /* 0x02dc */ | ||
281 | 284 | ||
282 | /* Interrupt response block */ | 285 | /* Interrupt response block */ |
283 | __u8 irb[64]; /* 0x0300 */ | 286 | __u8 irb[64]; /* 0x0300 */ |
@@ -381,7 +384,8 @@ struct _lowcore | |||
381 | __u64 int_clock; /* 0x0340 */ | 384 | __u64 int_clock; /* 0x0340 */ |
382 | __u64 clock_comparator; /* 0x0348 */ | 385 | __u64 clock_comparator; /* 0x0348 */ |
383 | __u64 vdso_per_cpu_data; /* 0x0350 */ | 386 | __u64 vdso_per_cpu_data; /* 0x0350 */ |
384 | __u8 pad_0x0358[0x0380-0x0358]; /* 0x0358 */ | 387 | __u64 machine_flags; /* 0x0358 */ |
388 | __u8 pad_0x0360[0x0380-0x0360]; /* 0x0360 */ | ||
385 | 389 | ||
386 | /* Interrupt response block. */ | 390 | /* Interrupt response block. */ |
387 | __u8 irb[64]; /* 0x0380 */ | 391 | __u8 irb[64]; /* 0x0380 */ |
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 61862b3ac794..c139fa7b8e89 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -14,7 +14,10 @@ | |||
14 | #define __ASM_S390_PROCESSOR_H | 14 | #define __ASM_S390_PROCESSOR_H |
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <asm/cpuid.h> | ||
18 | #include <asm/page.h> | ||
17 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | #include <asm/setup.h> | ||
18 | 21 | ||
19 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
20 | /* | 23 | /* |
@@ -23,20 +26,6 @@ | |||
23 | */ | 26 | */ |
24 | #define current_text_addr() ({ void *pc; asm("basr %0,0" : "=a" (pc)); pc; }) | 27 | #define current_text_addr() ({ void *pc; asm("basr %0,0" : "=a" (pc)); pc; }) |
25 | 28 | ||
26 | /* | ||
27 | * CPU type and hardware bug flags. Kept separately for each CPU. | ||
28 | * Members of this structure are referenced in head.S, so think twice | ||
29 | * before touching them. [mj] | ||
30 | */ | ||
31 | |||
32 | typedef struct | ||
33 | { | ||
34 | unsigned int version : 8; | ||
35 | unsigned int ident : 24; | ||
36 | unsigned int machine : 16; | ||
37 | unsigned int unused : 16; | ||
38 | } __attribute__ ((packed)) cpuid_t; | ||
39 | |||
40 | static inline void get_cpu_id(cpuid_t *ptr) | 29 | static inline void get_cpu_id(cpuid_t *ptr) |
41 | { | 30 | { |
42 | asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr)); | 31 | asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr)); |
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index f1b051630c50..539263fc9ab9 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -313,8 +313,6 @@ typedef struct | |||
313 | 313 | ||
314 | 314 | ||
315 | #ifdef __KERNEL__ | 315 | #ifdef __KERNEL__ |
316 | #include <asm/setup.h> | ||
317 | #include <asm/page.h> | ||
318 | 316 | ||
319 | /* | 317 | /* |
320 | * The pt_regs struct defines the way the registers are stored on | 318 | * The pt_regs struct defines the way the registers are stored on |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index e8bd6ac22c99..38b0fc221ed7 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | 16 | ||
17 | #include <asm/lowcore.h> | ||
17 | #include <asm/types.h> | 18 | #include <asm/types.h> |
18 | 19 | ||
19 | #define PARMAREA 0x10400 | 20 | #define PARMAREA 0x10400 |
@@ -63,7 +64,6 @@ extern unsigned int s390_noexec; | |||
63 | /* | 64 | /* |
64 | * Machine features detected in head.S | 65 | * Machine features detected in head.S |
65 | */ | 66 | */ |
66 | extern unsigned long machine_flags; | ||
67 | 67 | ||
68 | #define MACHINE_FLAG_VM (1UL << 0) | 68 | #define MACHINE_FLAG_VM (1UL << 0) |
69 | #define MACHINE_FLAG_IEEE (1UL << 1) | 69 | #define MACHINE_FLAG_IEEE (1UL << 1) |
@@ -77,28 +77,28 @@ extern unsigned long machine_flags; | |||
77 | #define MACHINE_FLAG_HPAGE (1UL << 10) | 77 | #define MACHINE_FLAG_HPAGE (1UL << 10) |
78 | #define MACHINE_FLAG_PFMF (1UL << 11) | 78 | #define MACHINE_FLAG_PFMF (1UL << 11) |
79 | 79 | ||
80 | #define MACHINE_IS_VM (machine_flags & MACHINE_FLAG_VM) | 80 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) |
81 | #define MACHINE_IS_KVM (machine_flags & MACHINE_FLAG_KVM) | 81 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) |
82 | #define MACHINE_HAS_DIAG9C (machine_flags & MACHINE_FLAG_DIAG9C) | 82 | #define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C) |
83 | 83 | ||
84 | #ifndef __s390x__ | 84 | #ifndef __s390x__ |
85 | #define MACHINE_HAS_IEEE (machine_flags & MACHINE_FLAG_IEEE) | 85 | #define MACHINE_HAS_IEEE (S390_lowcore.machine_flags & MACHINE_FLAG_IEEE) |
86 | #define MACHINE_HAS_CSP (machine_flags & MACHINE_FLAG_CSP) | 86 | #define MACHINE_HAS_CSP (S390_lowcore.machine_flags & MACHINE_FLAG_CSP) |
87 | #define MACHINE_HAS_IDTE (0) | 87 | #define MACHINE_HAS_IDTE (0) |
88 | #define MACHINE_HAS_DIAG44 (1) | 88 | #define MACHINE_HAS_DIAG44 (1) |
89 | #define MACHINE_HAS_MVPG (machine_flags & MACHINE_FLAG_MVPG) | 89 | #define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) |
90 | #define MACHINE_HAS_MVCOS (0) | 90 | #define MACHINE_HAS_MVCOS (0) |
91 | #define MACHINE_HAS_HPAGE (0) | 91 | #define MACHINE_HAS_HPAGE (0) |
92 | #define MACHINE_HAS_PFMF (0) | 92 | #define MACHINE_HAS_PFMF (0) |
93 | #else /* __s390x__ */ | 93 | #else /* __s390x__ */ |
94 | #define MACHINE_HAS_IEEE (1) | 94 | #define MACHINE_HAS_IEEE (1) |
95 | #define MACHINE_HAS_CSP (1) | 95 | #define MACHINE_HAS_CSP (1) |
96 | #define MACHINE_HAS_IDTE (machine_flags & MACHINE_FLAG_IDTE) | 96 | #define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE) |
97 | #define MACHINE_HAS_DIAG44 (machine_flags & MACHINE_FLAG_DIAG44) | 97 | #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) |
98 | #define MACHINE_HAS_MVPG (1) | 98 | #define MACHINE_HAS_MVPG (1) |
99 | #define MACHINE_HAS_MVCOS (machine_flags & MACHINE_FLAG_MVCOS) | 99 | #define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS) |
100 | #define MACHINE_HAS_HPAGE (machine_flags & MACHINE_FLAG_HPAGE) | 100 | #define MACHINE_HAS_HPAGE (S390_lowcore.machine_flags & MACHINE_FLAG_HPAGE) |
101 | #define MACHINE_HAS_PFMF (machine_flags & MACHINE_FLAG_PFMF) | 101 | #define MACHINE_HAS_PFMF (S390_lowcore.machine_flags & MACHINE_FLAG_PFMF) |
102 | #endif /* __s390x__ */ | 102 | #endif /* __s390x__ */ |
103 | 103 | ||
104 | #define ZFCPDUMP_HSA_SIZE (32UL<<20) | 104 | #define ZFCPDUMP_HSA_SIZE (32UL<<20) |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index c544aa524535..461f2abd2e6f 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -31,8 +31,9 @@ | |||
31 | #define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER) | 31 | #define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER) |
32 | 32 | ||
33 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
34 | #include <asm/processor.h> | ||
35 | #include <asm/lowcore.h> | 34 | #include <asm/lowcore.h> |
35 | #include <asm/page.h> | ||
36 | #include <asm/processor.h> | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * low level task data that entry.S needs immediate access to | 39 | * low level task data that entry.S needs immediate access to |
diff --git a/arch/s390/include/asm/timer.h b/arch/s390/include/asm/timer.h index e4bcab739c19..814243cafdfe 100644 --- a/arch/s390/include/asm/timer.h +++ b/arch/s390/include/asm/timer.h | |||
@@ -41,6 +41,7 @@ extern void init_virt_timer(struct vtimer_list *timer); | |||
41 | extern void add_virt_timer(void *new); | 41 | extern void add_virt_timer(void *new); |
42 | extern void add_virt_timer_periodic(void *new); | 42 | extern void add_virt_timer_periodic(void *new); |
43 | extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); | 43 | extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); |
44 | extern int mod_virt_timer_periodic(struct vtimer_list *timer, __u64 expires); | ||
44 | extern int del_virt_timer(struct vtimer_list *timer); | 45 | extern int del_virt_timer(struct vtimer_list *timer); |
45 | 46 | ||
46 | extern void init_cpu_vtimer(void); | 47 | extern void init_cpu_vtimer(void); |
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index d744c3d62de5..cc21e3e20fd7 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
@@ -11,6 +11,9 @@ | |||
11 | #ifndef _ASM_S390_TIMEX_H | 11 | #ifndef _ASM_S390_TIMEX_H |
12 | #define _ASM_S390_TIMEX_H | 12 | #define _ASM_S390_TIMEX_H |
13 | 13 | ||
14 | /* The value of the TOD clock for 1.1.1970. */ | ||
15 | #define TOD_UNIX_EPOCH 0x7d91048bca000000ULL | ||
16 | |||
14 | /* Inline functions for clock register access. */ | 17 | /* Inline functions for clock register access. */ |
15 | static inline int set_clock(__u64 time) | 18 | static inline int set_clock(__u64 time) |
16 | { | 19 | { |
@@ -85,4 +88,6 @@ int get_sync_clock(unsigned long long *clock); | |||
85 | void init_cpu_timer(void); | 88 | void init_cpu_timer(void); |
86 | unsigned long long monotonic_clock(void); | 89 | unsigned long long monotonic_clock(void); |
87 | 90 | ||
91 | extern u64 sched_clock_base_cc; | ||
92 | |||
88 | #endif | 93 | #endif |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index c8ad350d1444..f0f19e6ace6c 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
@@ -265,7 +265,9 @@ | |||
265 | #define __NR_pipe2 325 | 265 | #define __NR_pipe2 325 |
266 | #define __NR_dup3 326 | 266 | #define __NR_dup3 326 |
267 | #define __NR_epoll_create1 327 | 267 | #define __NR_epoll_create1 327 |
268 | #define NR_syscalls 328 | 268 | #define __NR_preadv 328 |
269 | #define __NR_pwritev 329 | ||
270 | #define NR_syscalls 330 | ||
269 | 271 | ||
270 | /* | 272 | /* |
271 | * There are some system calls that are not present on 64 bit, some | 273 | * There are some system calls that are not present on 64 bit, some |