diff options
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/bitops.h | 1 | ||||
-rw-r--r-- | include/asm-s390/cmb.h | 2 | ||||
-rw-r--r-- | include/asm-s390/debug.h | 1 | ||||
-rw-r--r-- | include/asm-s390/hardirq.h | 1 | ||||
-rw-r--r-- | include/asm-s390/idals.h | 1 | ||||
-rw-r--r-- | include/asm-s390/io.h | 5 | ||||
-rw-r--r-- | include/asm-s390/local.h | 1 | ||||
-rw-r--r-- | include/asm-s390/lowcore.h | 1 | ||||
-rw-r--r-- | include/asm-s390/page.h | 6 | ||||
-rw-r--r-- | include/asm-s390/pgalloc.h | 1 | ||||
-rw-r--r-- | include/asm-s390/posix_types.h | 44 | ||||
-rw-r--r-- | include/asm-s390/ptrace.h | 6 | ||||
-rw-r--r-- | include/asm-s390/sfp-machine.h | 1 | ||||
-rw-r--r-- | include/asm-s390/smp.h | 1 | ||||
-rw-r--r-- | include/asm-s390/system.h | 1 | ||||
-rw-r--r-- | include/asm-s390/tlbflush.h | 1 | ||||
-rw-r--r-- | include/asm-s390/types.h | 1 | ||||
-rw-r--r-- | include/asm-s390/unistd.h | 8 | ||||
-rw-r--r-- | include/asm-s390/vtoc.h | 38 | ||||
-rw-r--r-- | include/asm-s390/z90crypt.h | 212 |
20 files changed, 275 insertions, 58 deletions
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index ca092ffb7a95..4d2b126ba159 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -12,7 +12,6 @@ | |||
12 | * Copyright (C) 1992, Linus Torvalds | 12 | * Copyright (C) 1992, Linus Torvalds |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | ||
16 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
17 | 16 | ||
18 | /* | 17 | /* |
diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h index dae1dd4fb937..2d09950a9c11 100644 --- a/include/asm-s390/cmb.h +++ b/include/asm-s390/cmb.h | |||
@@ -47,7 +47,7 @@ struct cmbdata { | |||
47 | /* reset channel measurement block */ | 47 | /* reset channel measurement block */ |
48 | #define BIODASDRESETCMB _IO(DASD_IOCTL_LETTER,34) | 48 | #define BIODASDRESETCMB _IO(DASD_IOCTL_LETTER,34) |
49 | /* read channel measurement data */ | 49 | /* read channel measurement data */ |
50 | #define BIODASDREADCMB _IOWR(DASD_IOCTL_LETTER,32,u64) | 50 | #define BIODASDREADCMB _IOWR(DASD_IOCTL_LETTER,32,__u64) |
51 | /* read channel measurement data */ | 51 | /* read channel measurement data */ |
52 | #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) | 52 | #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) |
53 | 53 | ||
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 23450ed4b571..7f1ef99fd1e1 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #ifndef DEBUG_H | 9 | #ifndef DEBUG_H |
10 | #define DEBUG_H | 10 | #define DEBUG_H |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
14 | #include <linux/string.h> | 13 | #include <linux/string.h> |
15 | 14 | ||
diff --git a/include/asm-s390/hardirq.h b/include/asm-s390/hardirq.h index 6792c559a124..e84b7ef54aac 100644 --- a/include/asm-s390/hardirq.h +++ b/include/asm-s390/hardirq.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #ifndef __ASM_HARDIRQ_H | 12 | #ifndef __ASM_HARDIRQ_H |
13 | #define __ASM_HARDIRQ_H | 13 | #define __ASM_HARDIRQ_H |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/threads.h> | 15 | #include <linux/threads.h> |
17 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
18 | #include <linux/cache.h> | 17 | #include <linux/cache.h> |
diff --git a/include/asm-s390/idals.h b/include/asm-s390/idals.h index 8038858b86bb..e82c10efe65a 100644 --- a/include/asm-s390/idals.h +++ b/include/asm-s390/idals.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef _S390_IDALS_H | 13 | #ifndef _S390_IDALS_H |
14 | #define _S390_IDALS_H | 14 | #define _S390_IDALS_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
18 | #include <linux/err.h> | 17 | #include <linux/err.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index b05825dd16d7..d4614b35f423 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -86,20 +86,25 @@ extern void iounmap(void *addr); | |||
86 | #define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) | 86 | #define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) |
87 | #define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) | 87 | #define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) |
88 | #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) | 88 | #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) |
89 | #define readq(addr) (*(volatile unsigned long long *) __io_virt(addr)) | ||
89 | 90 | ||
90 | #define readb_relaxed(addr) readb(addr) | 91 | #define readb_relaxed(addr) readb(addr) |
91 | #define readw_relaxed(addr) readw(addr) | 92 | #define readw_relaxed(addr) readw(addr) |
92 | #define readl_relaxed(addr) readl(addr) | 93 | #define readl_relaxed(addr) readl(addr) |
94 | #define readq_relaxed(addr) readq(addr) | ||
93 | #define __raw_readb readb | 95 | #define __raw_readb readb |
94 | #define __raw_readw readw | 96 | #define __raw_readw readw |
95 | #define __raw_readl readl | 97 | #define __raw_readl readl |
98 | #define __raw_readq readq | ||
96 | 99 | ||
97 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) | 100 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) |
98 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) | 101 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) |
99 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) | 102 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) |
103 | #define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b)) | ||
100 | #define __raw_writeb writeb | 104 | #define __raw_writeb writeb |
101 | #define __raw_writew writew | 105 | #define __raw_writew writew |
102 | #define __raw_writel writel | 106 | #define __raw_writel writel |
107 | #define __raw_writeq writeq | ||
103 | 108 | ||
104 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) | 109 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) |
105 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) | 110 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) |
diff --git a/include/asm-s390/local.h b/include/asm-s390/local.h index cf8189009c30..86745a1b29bb 100644 --- a/include/asm-s390/local.h +++ b/include/asm-s390/local.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_LOCAL_H | 1 | #ifndef _ASM_LOCAL_H |
2 | #define _ASM_LOCAL_H | 2 | #define _ASM_LOCAL_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
6 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
7 | 6 | ||
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index bea727904287..596c8b172104 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h | |||
@@ -124,7 +124,6 @@ | |||
124 | 124 | ||
125 | #ifndef __ASSEMBLY__ | 125 | #ifndef __ASSEMBLY__ |
126 | 126 | ||
127 | #include <linux/config.h> | ||
128 | #include <asm/processor.h> | 127 | #include <asm/processor.h> |
129 | #include <linux/types.h> | 128 | #include <linux/types.h> |
130 | #include <asm/sigp.h> | 129 | #include <asm/sigp.h> |
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 3b1138ac7e79..b2628dc5c490 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #ifndef _S390_PAGE_H | 9 | #ifndef _S390_PAGE_H |
10 | #define _S390_PAGE_H | 10 | #define _S390_PAGE_H |
11 | 11 | ||
12 | #include <asm/setup.h> | ||
13 | #include <asm/types.h> | 12 | #include <asm/types.h> |
14 | 13 | ||
15 | /* PAGE_SHIFT determines the page size */ | 14 | /* PAGE_SHIFT determines the page size */ |
@@ -20,6 +19,7 @@ | |||
20 | #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) | 19 | #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) |
21 | 20 | ||
22 | #ifdef __KERNEL__ | 21 | #ifdef __KERNEL__ |
22 | #include <asm/setup.h> | ||
23 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
24 | 24 | ||
25 | #ifndef __s390x__ | 25 | #ifndef __s390x__ |
@@ -189,9 +189,9 @@ page_get_storage_key(unsigned long addr) | |||
189 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 189 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
190 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 190 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
191 | 191 | ||
192 | #endif /* __KERNEL__ */ | ||
193 | |||
194 | #include <asm-generic/memory_model.h> | 192 | #include <asm-generic/memory_model.h> |
195 | #include <asm-generic/page.h> | 193 | #include <asm-generic/page.h> |
196 | 194 | ||
195 | #endif /* __KERNEL__ */ | ||
196 | |||
197 | #endif /* _S390_PAGE_H */ | 197 | #endif /* _S390_PAGE_H */ |
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index e28aaf28e4a8..3002fda89d33 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef _S390_PGALLOC_H | 13 | #ifndef _S390_PGALLOC_H |
14 | #define _S390_PGALLOC_H | 14 | #define _S390_PGALLOC_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
18 | #include <linux/gfp.h> | 17 | #include <linux/gfp.h> |
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
diff --git a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h index 61788de3c0c3..b94c98856e12 100644 --- a/include/asm-s390/posix_types.h +++ b/include/asm-s390/posix_types.h | |||
@@ -76,24 +76,36 @@ typedef struct { | |||
76 | } __kernel_fsid_t; | 76 | } __kernel_fsid_t; |
77 | 77 | ||
78 | 78 | ||
79 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 79 | #ifdef __KERNEL__ |
80 | 80 | ||
81 | #ifndef _S390_BITOPS_H | 81 | #undef __FD_SET |
82 | #include <asm/bitops.h> | 82 | static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) |
83 | #endif | 83 | { |
84 | 84 | unsigned long _tmp = fd / __NFDBITS; | |
85 | #undef __FD_SET | 85 | unsigned long _rem = fd % __NFDBITS; |
86 | #define __FD_SET(fd,fdsetp) set_bit((fd),(fdsetp)->fds_bits) | 86 | fdsetp->fds_bits[_tmp] |= (1UL<<_rem); |
87 | 87 | } | |
88 | #undef __FD_CLR | 88 | |
89 | #define __FD_CLR(fd,fdsetp) clear_bit((fd),(fdsetp)->fds_bits) | 89 | #undef __FD_CLR |
90 | 90 | static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) | |
91 | #undef __FD_ISSET | 91 | { |
92 | #define __FD_ISSET(fd,fdsetp) test_bit((fd),(fdsetp)->fds_bits) | 92 | unsigned long _tmp = fd / __NFDBITS; |
93 | unsigned long _rem = fd % __NFDBITS; | ||
94 | fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem); | ||
95 | } | ||
96 | |||
97 | #undef __FD_ISSET | ||
98 | static inline int __FD_ISSET(unsigned long fd, const __kernel_fd_set *fdsetp) | ||
99 | { | ||
100 | unsigned long _tmp = fd / __NFDBITS; | ||
101 | unsigned long _rem = fd % __NFDBITS; | ||
102 | return (fdsetp->fds_bits[_tmp] & (1UL<<_rem)) != 0; | ||
103 | } | ||
93 | 104 | ||
94 | #undef __FD_ZERO | 105 | #undef __FD_ZERO |
95 | #define __FD_ZERO(fdsetp) (memset ((fdsetp), 0, sizeof(*(fd_set *)(fdsetp)))) | 106 | #define __FD_ZERO(fdsetp) \ |
107 | ((void) memset ((__ptr_t) (fdsetp), 0, sizeof (__kernel_fd_set))) | ||
96 | 108 | ||
97 | #endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)*/ | 109 | #endif /* __KERNEL__ */ |
98 | 110 | ||
99 | #endif | 111 | #endif |
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index a949cc077cc7..4d75d77b0f99 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h | |||
@@ -181,11 +181,8 @@ | |||
181 | #define PTRACE_OLDSETOPTIONS 21 | 181 | #define PTRACE_OLDSETOPTIONS 21 |
182 | 182 | ||
183 | #ifndef __ASSEMBLY__ | 183 | #ifndef __ASSEMBLY__ |
184 | #include <linux/config.h> | ||
185 | #include <linux/stddef.h> | 184 | #include <linux/stddef.h> |
186 | #include <linux/types.h> | 185 | #include <linux/types.h> |
187 | #include <asm/setup.h> | ||
188 | #include <asm/page.h> | ||
189 | 186 | ||
190 | typedef union | 187 | typedef union |
191 | { | 188 | { |
@@ -301,6 +298,9 @@ typedef struct | |||
301 | } s390_regs; | 298 | } s390_regs; |
302 | 299 | ||
303 | #ifdef __KERNEL__ | 300 | #ifdef __KERNEL__ |
301 | #include <asm/setup.h> | ||
302 | #include <asm/page.h> | ||
303 | |||
304 | /* | 304 | /* |
305 | * The pt_regs struct defines the way the registers are stored on | 305 | * The pt_regs struct defines the way the registers are stored on |
306 | * the stack during a system call. | 306 | * the stack during a system call. |
diff --git a/include/asm-s390/sfp-machine.h b/include/asm-s390/sfp-machine.h index 3c79b5384f44..de69dfa46fbb 100644 --- a/include/asm-s390/sfp-machine.h +++ b/include/asm-s390/sfp-machine.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #ifndef _SFP_MACHINE_H | 25 | #ifndef _SFP_MACHINE_H |
26 | #define _SFP_MACHINE_H | 26 | #define _SFP_MACHINE_H |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #define _FP_W_TYPE_SIZE 32 | 29 | #define _FP_W_TYPE_SIZE 32 |
31 | #define _FP_W_TYPE unsigned long | 30 | #define _FP_W_TYPE unsigned long |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index 444dae5912e6..657646054c5e 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef __ASM_SMP_H | 10 | #ifndef __ASM_SMP_H |
11 | #define __ASM_SMP_H | 11 | #define __ASM_SMP_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/threads.h> | 13 | #include <linux/threads.h> |
15 | #include <linux/cpumask.h> | 14 | #include <linux/cpumask.h> |
16 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 6a89dbb03c1e..71a0732cd518 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ASM_SYSTEM_H | 11 | #ifndef __ASM_SYSTEM_H |
12 | #define __ASM_SYSTEM_H | 12 | #define __ASM_SYSTEM_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <asm/types.h> | 15 | #include <asm/types.h> |
17 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h index 1bb73b0e61fa..73cd85bebfb2 100644 --- a/include/asm-s390/tlbflush.h +++ b/include/asm-s390/tlbflush.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _S390_TLBFLUSH_H | 1 | #ifndef _S390_TLBFLUSH_H |
2 | #define _S390_TLBFLUSH_H | 2 | #define _S390_TLBFLUSH_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
6 | #include <asm/processor.h> | 5 | #include <asm/processor.h> |
7 | 6 | ||
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 5738ad63537c..ae2951cc83ac 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -58,7 +58,6 @@ typedef __signed__ long saddr_t; | |||
58 | 58 | ||
59 | #ifndef __ASSEMBLY__ | 59 | #ifndef __ASSEMBLY__ |
60 | 60 | ||
61 | #include <linux/config.h> | ||
62 | 61 | ||
63 | typedef signed char s8; | 62 | typedef signed char s8; |
64 | typedef unsigned char u8; | 63 | typedef unsigned char u8; |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 41c2792ff6b0..e21443d3ea1d 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -392,6 +392,8 @@ | |||
392 | 392 | ||
393 | #endif | 393 | #endif |
394 | 394 | ||
395 | #ifdef __KERNEL__ | ||
396 | |||
395 | /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */ | 397 | /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */ |
396 | 398 | ||
397 | #define __syscall_return(type, res) \ | 399 | #define __syscall_return(type, res) \ |
@@ -546,7 +548,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ | |||
546 | __syscall_return(type,__res); \ | 548 | __syscall_return(type,__res); \ |
547 | } | 549 | } |
548 | 550 | ||
549 | #ifdef __KERNEL__ | ||
550 | #define __ARCH_WANT_IPC_PARSE_VERSION | 551 | #define __ARCH_WANT_IPC_PARSE_VERSION |
551 | #define __ARCH_WANT_OLD_READDIR | 552 | #define __ARCH_WANT_OLD_READDIR |
552 | #define __ARCH_WANT_SYS_ALARM | 553 | #define __ARCH_WANT_SYS_ALARM |
@@ -573,11 +574,9 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ | |||
573 | # define __ARCH_WANT_COMPAT_SYS_TIME | 574 | # define __ARCH_WANT_COMPAT_SYS_TIME |
574 | # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 575 | # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
575 | # endif | 576 | # endif |
576 | #endif | ||
577 | 577 | ||
578 | #ifdef __KERNEL_SYSCALLS__ | 578 | #ifdef __KERNEL_SYSCALLS__ |
579 | 579 | ||
580 | #include <linux/config.h> | ||
581 | #include <linux/compiler.h> | 580 | #include <linux/compiler.h> |
582 | #include <linux/types.h> | 581 | #include <linux/types.h> |
583 | #include <asm/ptrace.h> | 582 | #include <asm/ptrace.h> |
@@ -625,7 +624,7 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
625 | struct sigaction __user *oact, | 624 | struct sigaction __user *oact, |
626 | size_t sigsetsize); | 625 | size_t sigsetsize); |
627 | 626 | ||
628 | #endif | 627 | #endif /* __KERNEL_SYSCALLS__ */ |
629 | 628 | ||
630 | /* | 629 | /* |
631 | * "Conditional" syscalls | 630 | * "Conditional" syscalls |
@@ -635,4 +634,5 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
635 | */ | 634 | */ |
636 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 635 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
637 | 636 | ||
637 | #endif /* __KERNEL__ */ | ||
638 | #endif /* _ASM_S390_UNISTD_H_ */ | 638 | #endif /* _ASM_S390_UNISTD_H_ */ |
diff --git a/include/asm-s390/vtoc.h b/include/asm-s390/vtoc.h index d1de5b7ebb0b..3a5267d90d29 100644 --- a/include/asm-s390/vtoc.h +++ b/include/asm-s390/vtoc.h | |||
@@ -177,27 +177,27 @@ struct vtoc_format7_label | |||
177 | } __attribute__ ((packed)); | 177 | } __attribute__ ((packed)); |
178 | 178 | ||
179 | struct vtoc_cms_label { | 179 | struct vtoc_cms_label { |
180 | u8 label_id[4]; /* Label identifier */ | 180 | __u8 label_id[4]; /* Label identifier */ |
181 | u8 vol_id[6]; /* Volid */ | 181 | __u8 vol_id[6]; /* Volid */ |
182 | u16 version_id; /* Version identifier */ | 182 | __u16 version_id; /* Version identifier */ |
183 | u32 block_size; /* Disk block size */ | 183 | __u32 block_size; /* Disk block size */ |
184 | u32 origin_ptr; /* Disk origin pointer */ | 184 | __u32 origin_ptr; /* Disk origin pointer */ |
185 | u32 usable_count; /* Number of usable cylinders/blocks */ | 185 | __u32 usable_count; /* Number of usable cylinders/blocks */ |
186 | u32 formatted_count; /* Maximum number of formatted cylinders/ | 186 | __u32 formatted_count; /* Maximum number of formatted cylinders/ |
187 | * blocks */ | 187 | * blocks */ |
188 | u32 block_count; /* Disk size in CMS blocks */ | 188 | __u32 block_count; /* Disk size in CMS blocks */ |
189 | u32 used_count; /* Number of CMS blocks in use */ | 189 | __u32 used_count; /* Number of CMS blocks in use */ |
190 | u32 fst_size; /* File Status Table (FST) size */ | 190 | __u32 fst_size; /* File Status Table (FST) size */ |
191 | u32 fst_count; /* Number of FSTs per CMS block */ | 191 | __u32 fst_count; /* Number of FSTs per CMS block */ |
192 | u8 format_date[6]; /* Disk FORMAT date */ | 192 | __u8 format_date[6]; /* Disk FORMAT date */ |
193 | u8 reserved1[2]; | 193 | __u8 reserved1[2]; |
194 | u32 disk_offset; /* Disk offset when reserved*/ | 194 | __u32 disk_offset; /* Disk offset when reserved*/ |
195 | u32 map_block; /* Allocation Map Block with next hole */ | 195 | __u32 map_block; /* Allocation Map Block with next hole */ |
196 | u32 hblk_disp; /* Displacement into HBLK data of next hole */ | 196 | __u32 hblk_disp; /* Displacement into HBLK data of next hole */ |
197 | u32 user_disp; /* Displacement into user part of Allocation | 197 | __u32 user_disp; /* Displacement into user part of Allocation |
198 | * map */ | 198 | * map */ |
199 | u8 reserved2[4]; | 199 | __u8 reserved2[4]; |
200 | u8 segment_name[8]; /* Name of shared segment */ | 200 | __u8 segment_name[8]; /* Name of shared segment */ |
201 | } __attribute__ ((packed)); | 201 | } __attribute__ ((packed)); |
202 | 202 | ||
203 | #endif /* _ASM_S390_VTOC_H */ | 203 | #endif /* _ASM_S390_VTOC_H */ |
diff --git a/include/asm-s390/z90crypt.h b/include/asm-s390/z90crypt.h new file mode 100644 index 000000000000..31a2439b07bd --- /dev/null +++ b/include/asm-s390/z90crypt.h | |||
@@ -0,0 +1,212 @@ | |||
1 | /* | ||
2 | * include/asm-s390/z90crypt.h | ||
3 | * | ||
4 | * z90crypt 1.3.3 (user-visible header) | ||
5 | * | ||
6 | * Copyright (C) 2001, 2005 IBM Corporation | ||
7 | * Author(s): Robert Burroughs | ||
8 | * Eric Rossman (edrossma@us.ibm.com) | ||
9 | * | ||
10 | * Hotplug & misc device support: Jochen Roehrig (roehrig@de.ibm.com) | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2, or (at your option) | ||
15 | * any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | */ | ||
26 | |||
27 | #ifndef __ASM_S390_Z90CRYPT_H | ||
28 | #define __ASM_S390_Z90CRYPT_H | ||
29 | #include <linux/ioctl.h> | ||
30 | |||
31 | #define z90crypt_VERSION 1 | ||
32 | #define z90crypt_RELEASE 3 // 2 = PCIXCC, 3 = rewrite for coding standards | ||
33 | #define z90crypt_VARIANT 3 // 3 = CEX2A support | ||
34 | |||
35 | /** | ||
36 | * struct ica_rsa_modexpo | ||
37 | * | ||
38 | * Requirements: | ||
39 | * - outputdatalength is at least as large as inputdatalength. | ||
40 | * - All key parts are right justified in their fields, padded on | ||
41 | * the left with zeroes. | ||
42 | * - length(b_key) = inputdatalength | ||
43 | * - length(n_modulus) = inputdatalength | ||
44 | */ | ||
45 | struct ica_rsa_modexpo { | ||
46 | char __user * inputdata; | ||
47 | unsigned int inputdatalength; | ||
48 | char __user * outputdata; | ||
49 | unsigned int outputdatalength; | ||
50 | char __user * b_key; | ||
51 | char __user * n_modulus; | ||
52 | }; | ||
53 | |||
54 | /** | ||
55 | * struct ica_rsa_modexpo_crt | ||
56 | * | ||
57 | * Requirements: | ||
58 | * - inputdatalength is even. | ||
59 | * - outputdatalength is at least as large as inputdatalength. | ||
60 | * - All key parts are right justified in their fields, padded on | ||
61 | * the left with zeroes. | ||
62 | * - length(bp_key) = inputdatalength/2 + 8 | ||
63 | * - length(bq_key) = inputdatalength/2 | ||
64 | * - length(np_key) = inputdatalength/2 + 8 | ||
65 | * - length(nq_key) = inputdatalength/2 | ||
66 | * - length(u_mult_inv) = inputdatalength/2 + 8 | ||
67 | */ | ||
68 | struct ica_rsa_modexpo_crt { | ||
69 | char __user * inputdata; | ||
70 | unsigned int inputdatalength; | ||
71 | char __user * outputdata; | ||
72 | unsigned int outputdatalength; | ||
73 | char __user * bp_key; | ||
74 | char __user * bq_key; | ||
75 | char __user * np_prime; | ||
76 | char __user * nq_prime; | ||
77 | char __user * u_mult_inv; | ||
78 | }; | ||
79 | |||
80 | #define Z90_IOCTL_MAGIC 'z' // NOTE: Need to allocate from linux folks | ||
81 | |||
82 | /** | ||
83 | * Interface notes: | ||
84 | * | ||
85 | * The ioctl()s which are implemented (along with relevant details) | ||
86 | * are: | ||
87 | * | ||
88 | * ICARSAMODEXPO | ||
89 | * Perform an RSA operation using a Modulus-Exponent pair | ||
90 | * This takes an ica_rsa_modexpo struct as its arg. | ||
91 | * | ||
92 | * NOTE: please refer to the comments preceding this structure | ||
93 | * for the implementation details for the contents of the | ||
94 | * block | ||
95 | * | ||
96 | * ICARSACRT | ||
97 | * Perform an RSA operation using a Chinese-Remainder Theorem key | ||
98 | * This takes an ica_rsa_modexpo_crt struct as its arg. | ||
99 | * | ||
100 | * NOTE: please refer to the comments preceding this structure | ||
101 | * for the implementation details for the contents of the | ||
102 | * block | ||
103 | * | ||
104 | * Z90STAT_TOTALCOUNT | ||
105 | * Return an integer count of all device types together. | ||
106 | * | ||
107 | * Z90STAT_PCICACOUNT | ||
108 | * Return an integer count of all PCICAs. | ||
109 | * | ||
110 | * Z90STAT_PCICCCOUNT | ||
111 | * Return an integer count of all PCICCs. | ||
112 | * | ||
113 | * Z90STAT_PCIXCCMCL2COUNT | ||
114 | * Return an integer count of all MCL2 PCIXCCs. | ||
115 | * | ||
116 | * Z90STAT_PCIXCCMCL3COUNT | ||
117 | * Return an integer count of all MCL3 PCIXCCs. | ||
118 | * | ||
119 | * Z90STAT_CEX2CCOUNT | ||
120 | * Return an integer count of all CEX2Cs. | ||
121 | * | ||
122 | * Z90STAT_CEX2ACOUNT | ||
123 | * Return an integer count of all CEX2As. | ||
124 | * | ||
125 | * Z90STAT_REQUESTQ_COUNT | ||
126 | * Return an integer count of the number of entries waiting to be | ||
127 | * sent to a device. | ||
128 | * | ||
129 | * Z90STAT_PENDINGQ_COUNT | ||
130 | * Return an integer count of the number of entries sent to a | ||
131 | * device awaiting the reply. | ||
132 | * | ||
133 | * Z90STAT_TOTALOPEN_COUNT | ||
134 | * Return an integer count of the number of open file handles. | ||
135 | * | ||
136 | * Z90STAT_DOMAIN_INDEX | ||
137 | * Return the integer value of the Cryptographic Domain. | ||
138 | * | ||
139 | * Z90STAT_STATUS_MASK | ||
140 | * Return an 64 element array of unsigned chars for the status of | ||
141 | * all devices. | ||
142 | * 0x01: PCICA | ||
143 | * 0x02: PCICC | ||
144 | * 0x03: PCIXCC_MCL2 | ||
145 | * 0x04: PCIXCC_MCL3 | ||
146 | * 0x05: CEX2C | ||
147 | * 0x06: CEX2A | ||
148 | * 0x0d: device is disabled via the proc filesystem | ||
149 | * | ||
150 | * Z90STAT_QDEPTH_MASK | ||
151 | * Return an 64 element array of unsigned chars for the queue | ||
152 | * depth of all devices. | ||
153 | * | ||
154 | * Z90STAT_PERDEV_REQCNT | ||
155 | * Return an 64 element array of unsigned integers for the number | ||
156 | * of successfully completed requests per device since the device | ||
157 | * was detected and made available. | ||
158 | * | ||
159 | * ICAZ90STATUS (deprecated) | ||
160 | * Return some device driver status in a ica_z90_status struct | ||
161 | * This takes an ica_z90_status struct as its arg. | ||
162 | * | ||
163 | * NOTE: this ioctl() is deprecated, and has been replaced with | ||
164 | * single ioctl()s for each type of status being requested | ||
165 | * | ||
166 | * Z90STAT_PCIXCCCOUNT (deprecated) | ||
167 | * Return an integer count of all PCIXCCs (MCL2 + MCL3). | ||
168 | * This is DEPRECATED now that MCL3 PCIXCCs are treated differently from | ||
169 | * MCL2 PCIXCCs. | ||
170 | * | ||
171 | * Z90QUIESCE (not recommended) | ||
172 | * Quiesce the driver. This is intended to stop all new | ||
173 | * requests from being processed. Its use is NOT recommended, | ||
174 | * except in circumstances where there is no other way to stop | ||
175 | * callers from accessing the driver. Its original use was to | ||
176 | * allow the driver to be "drained" of work in preparation for | ||
177 | * a system shutdown. | ||
178 | * | ||
179 | * NOTE: once issued, this ban on new work cannot be undone | ||
180 | * except by unloading and reloading the driver. | ||
181 | */ | ||
182 | |||
183 | /** | ||
184 | * Supported ioctl calls | ||
185 | */ | ||
186 | #define ICARSAMODEXPO _IOC(_IOC_READ|_IOC_WRITE, Z90_IOCTL_MAGIC, 0x05, 0) | ||
187 | #define ICARSACRT _IOC(_IOC_READ|_IOC_WRITE, Z90_IOCTL_MAGIC, 0x06, 0) | ||
188 | |||
189 | /* DEPRECATED status calls (bound for removal at some point) */ | ||
190 | #define ICAZ90STATUS _IOR(Z90_IOCTL_MAGIC, 0x10, struct ica_z90_status) | ||
191 | #define Z90STAT_PCIXCCCOUNT _IOR(Z90_IOCTL_MAGIC, 0x43, int) | ||
192 | |||
193 | /* unrelated to ICA callers */ | ||
194 | #define Z90QUIESCE _IO(Z90_IOCTL_MAGIC, 0x11) | ||
195 | |||
196 | /* New status calls */ | ||
197 | #define Z90STAT_TOTALCOUNT _IOR(Z90_IOCTL_MAGIC, 0x40, int) | ||
198 | #define Z90STAT_PCICACOUNT _IOR(Z90_IOCTL_MAGIC, 0x41, int) | ||
199 | #define Z90STAT_PCICCCOUNT _IOR(Z90_IOCTL_MAGIC, 0x42, int) | ||
200 | #define Z90STAT_PCIXCCMCL2COUNT _IOR(Z90_IOCTL_MAGIC, 0x4b, int) | ||
201 | #define Z90STAT_PCIXCCMCL3COUNT _IOR(Z90_IOCTL_MAGIC, 0x4c, int) | ||
202 | #define Z90STAT_CEX2CCOUNT _IOR(Z90_IOCTL_MAGIC, 0x4d, int) | ||
203 | #define Z90STAT_CEX2ACOUNT _IOR(Z90_IOCTL_MAGIC, 0x4e, int) | ||
204 | #define Z90STAT_REQUESTQ_COUNT _IOR(Z90_IOCTL_MAGIC, 0x44, int) | ||
205 | #define Z90STAT_PENDINGQ_COUNT _IOR(Z90_IOCTL_MAGIC, 0x45, int) | ||
206 | #define Z90STAT_TOTALOPEN_COUNT _IOR(Z90_IOCTL_MAGIC, 0x46, int) | ||
207 | #define Z90STAT_DOMAIN_INDEX _IOR(Z90_IOCTL_MAGIC, 0x47, int) | ||
208 | #define Z90STAT_STATUS_MASK _IOR(Z90_IOCTL_MAGIC, 0x48, char[64]) | ||
209 | #define Z90STAT_QDEPTH_MASK _IOR(Z90_IOCTL_MAGIC, 0x49, char[64]) | ||
210 | #define Z90STAT_PERDEV_REQCNT _IOR(Z90_IOCTL_MAGIC, 0x4a, int[64]) | ||
211 | |||
212 | #endif /* __ASM_S390_Z90CRYPT_H */ | ||