aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390')
-rw-r--r--include/asm-s390/cacheflush.h1
-rw-r--r--include/asm-s390/checksum.h45
-rw-r--r--include/asm-s390/cio.h9
-rw-r--r--include/asm-s390/cpcmd.h10
-rw-r--r--include/asm-s390/dasd.h2
-rw-r--r--include/asm-s390/device.h7
-rw-r--r--include/asm-s390/futex.h4
-rw-r--r--include/asm-s390/kexec.h2
-rw-r--r--include/asm-s390/lowcore.h8
-rw-r--r--include/asm-s390/page.h22
-rw-r--r--include/asm-s390/pgalloc.h3
-rw-r--r--include/asm-s390/pgtable.h23
-rw-r--r--include/asm-s390/posix_types.h2
-rw-r--r--include/asm-s390/qdio.h1
-rw-r--r--include/asm-s390/reset.h24
-rw-r--r--include/asm-s390/setup.h18
-rw-r--r--include/asm-s390/smp.h8
-rw-r--r--include/asm-s390/system.h10
-rw-r--r--include/asm-s390/termbits.h11
-rw-r--r--include/asm-s390/termios.h34
-rw-r--r--include/asm-s390/types.h10
-rw-r--r--include/asm-s390/uaccess.h18
-rw-r--r--include/asm-s390/unistd.h154
-rw-r--r--include/asm-s390/zcrypt.h91
24 files changed, 213 insertions, 304 deletions
diff --git a/include/asm-s390/cacheflush.h b/include/asm-s390/cacheflush.h
index e399a8ba2ed7..f7cade8083f3 100644
--- a/include/asm-s390/cacheflush.h
+++ b/include/asm-s390/cacheflush.h
@@ -7,6 +7,7 @@
7/* Caches aren't brain-dead on the s390. */ 7/* Caches aren't brain-dead on the s390. */
8#define flush_cache_all() do { } while (0) 8#define flush_cache_all() do { } while (0)
9#define flush_cache_mm(mm) do { } while (0) 9#define flush_cache_mm(mm) do { } while (0)
10#define flush_cache_dup_mm(mm) do { } while (0)
10#define flush_cache_range(vma, start, end) do { } while (0) 11#define flush_cache_range(vma, start, end) do { } while (0)
11#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) 12#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
12#define flush_dcache_page(page) do { } while (0) 13#define flush_dcache_page(page) do { } while (0)
diff --git a/include/asm-s390/checksum.h b/include/asm-s390/checksum.h
index 37c362d89fad..0a3cd7ec8451 100644
--- a/include/asm-s390/checksum.h
+++ b/include/asm-s390/checksum.h
@@ -27,8 +27,8 @@
27 * 27 *
28 * it's best to have buff aligned on a 32-bit boundary 28 * it's best to have buff aligned on a 32-bit boundary
29 */ 29 */
30static inline unsigned int 30static inline __wsum
31csum_partial(const unsigned char * buff, int len, unsigned int sum) 31csum_partial(const void *buff, int len, __wsum sum)
32{ 32{
33 register unsigned long reg2 asm("2") = (unsigned long) buff; 33 register unsigned long reg2 asm("2") = (unsigned long) buff;
34 register unsigned long reg3 asm("3") = (unsigned long) len; 34 register unsigned long reg3 asm("3") = (unsigned long) len;
@@ -49,9 +49,9 @@ csum_partial(const unsigned char * buff, int len, unsigned int sum)
49 * Copy from userspace and compute checksum. If we catch an exception 49 * Copy from userspace and compute checksum. If we catch an exception
50 * then zero the rest of the buffer. 50 * then zero the rest of the buffer.
51 */ 51 */
52static inline unsigned int 52static inline __wsum
53csum_partial_copy_from_user(const char __user *src, char *dst, 53csum_partial_copy_from_user(const void __user *src, void *dst,
54 int len, unsigned int sum, 54 int len, __wsum sum,
55 int *err_ptr) 55 int *err_ptr)
56{ 56{
57 int missing; 57 int missing;
@@ -66,8 +66,8 @@ csum_partial_copy_from_user(const char __user *src, char *dst,
66} 66}
67 67
68 68
69static inline unsigned int 69static inline __wsum
70csum_partial_copy_nocheck (const char *src, char *dst, int len, unsigned int sum) 70csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum)
71{ 71{
72 memcpy(dst,src,len); 72 memcpy(dst,src,len);
73 return csum_partial(dst, len, sum); 73 return csum_partial(dst, len, sum);
@@ -76,8 +76,7 @@ csum_partial_copy_nocheck (const char *src, char *dst, int len, unsigned int sum
76/* 76/*
77 * Fold a partial checksum without adding pseudo headers 77 * Fold a partial checksum without adding pseudo headers
78 */ 78 */
79static inline unsigned short 79static inline __sum16 csum_fold(__wsum sum)
80csum_fold(unsigned int sum)
81{ 80{
82#ifndef __s390x__ 81#ifndef __s390x__
83 register_pair rp; 82 register_pair rp;
@@ -100,7 +99,7 @@ csum_fold(unsigned int sum)
100 " srl %0,16\n" /* %0 = H+L+C */ 99 " srl %0,16\n" /* %0 = H+L+C */
101 : "+&d" (sum) : : "cc", "2", "3"); 100 : "+&d" (sum) : : "cc", "2", "3");
102#endif /* __s390x__ */ 101#endif /* __s390x__ */
103 return ((unsigned short) ~sum); 102 return (__force __sum16) ~sum;
104} 103}
105 104
106/* 105/*
@@ -108,8 +107,7 @@ csum_fold(unsigned int sum)
108 * which always checksum on 4 octet boundaries. 107 * which always checksum on 4 octet boundaries.
109 * 108 *
110 */ 109 */
111static inline unsigned short 110static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
112ip_fast_csum(unsigned char *iph, unsigned int ihl)
113{ 111{
114 return csum_fold(csum_partial(iph, ihl*4, 0)); 112 return csum_fold(csum_partial(iph, ihl*4, 0));
115} 113}
@@ -118,10 +116,10 @@ ip_fast_csum(unsigned char *iph, unsigned int ihl)
118 * computes the checksum of the TCP/UDP pseudo-header 116 * computes the checksum of the TCP/UDP pseudo-header
119 * returns a 32-bit checksum 117 * returns a 32-bit checksum
120 */ 118 */
121static inline unsigned int 119static inline __wsum
122csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, 120csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
123 unsigned short len, unsigned short proto, 121 unsigned short len, unsigned short proto,
124 unsigned int sum) 122 __wsum sum)
125{ 123{
126#ifndef __s390x__ 124#ifndef __s390x__
127 asm volatile( 125 asm volatile(
@@ -137,12 +135,12 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
137 "1:" 135 "1:"
138 : "+&d" (sum) : "d" (daddr) : "cc"); 136 : "+&d" (sum) : "d" (daddr) : "cc");
139 asm volatile( 137 asm volatile(
140 " alr %0,%1\n" /* sum += (len<<16) + (proto<<8) */ 138 " alr %0,%1\n" /* sum += len + proto */
141 " brc 12,2f\n" 139 " brc 12,2f\n"
142 " ahi %0,1\n" /* add carry */ 140 " ahi %0,1\n" /* add carry */
143 "2:" 141 "2:"
144 : "+&d" (sum) 142 : "+&d" (sum)
145 : "d" (((unsigned int) len<<16) + (unsigned int) proto) 143 : "d" (len + proto)
146 : "cc"); 144 : "cc");
147#else /* __s390x__ */ 145#else /* __s390x__ */
148 asm volatile( 146 asm volatile(
@@ -153,7 +151,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
153 "0: algr %0,%2\n" /* sum += daddr */ 151 "0: algr %0,%2\n" /* sum += daddr */
154 " brc 12,1f\n" 152 " brc 12,1f\n"
155 " aghi %0,1\n" /* add carry */ 153 " aghi %0,1\n" /* add carry */
156 "1: algfr %0,%3\n" /* sum += (len<<16) + proto */ 154 "1: algfr %0,%3\n" /* sum += len + proto */
157 " brc 12,2f\n" 155 " brc 12,2f\n"
158 " aghi %0,1\n" /* add carry */ 156 " aghi %0,1\n" /* add carry */
159 "2: srlg 0,%0,32\n" 157 "2: srlg 0,%0,32\n"
@@ -163,7 +161,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
163 "3: llgfr %0,%0" 161 "3: llgfr %0,%0"
164 : "+&d" (sum) 162 : "+&d" (sum)
165 : "d" (saddr), "d" (daddr), 163 : "d" (saddr), "d" (daddr),
166 "d" (((unsigned int) len<<16) + (unsigned int) proto) 164 "d" (len + proto)
167 : "cc", "0"); 165 : "cc", "0");
168#endif /* __s390x__ */ 166#endif /* __s390x__ */
169 return sum; 167 return sum;
@@ -174,10 +172,10 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
174 * returns a 16-bit checksum, already complemented 172 * returns a 16-bit checksum, already complemented
175 */ 173 */
176 174
177static inline unsigned short int 175static inline __sum16
178csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, 176csum_tcpudp_magic(__be32 saddr, __be32 daddr,
179 unsigned short len, unsigned short proto, 177 unsigned short len, unsigned short proto,
180 unsigned int sum) 178 __wsum sum)
181{ 179{
182 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); 180 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
183} 181}
@@ -187,8 +185,7 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr,
187 * in icmp.c 185 * in icmp.c
188 */ 186 */
189 187
190static inline unsigned short 188static inline __sum16 ip_compute_csum(const void *buff, int len)
191ip_compute_csum(unsigned char * buff, int len)
192{ 189{
193 return csum_fold(csum_partial(buff, len, 0)); 190 return csum_fold(csum_partial(buff, len, 0));
194} 191}
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h
index 81287d86329d..d92785030980 100644
--- a/include/asm-s390/cio.h
+++ b/include/asm-s390/cio.h
@@ -278,17 +278,16 @@ struct ccw_dev_id {
278static inline int ccw_dev_id_is_equal(struct ccw_dev_id *dev_id1, 278static inline int ccw_dev_id_is_equal(struct ccw_dev_id *dev_id1,
279 struct ccw_dev_id *dev_id2) 279 struct ccw_dev_id *dev_id2)
280{ 280{
281 return !memcmp(dev_id1, dev_id2, sizeof(struct ccw_dev_id)); 281 if ((dev_id1->ssid == dev_id2->ssid) &&
282 (dev_id1->devno == dev_id2->devno))
283 return 1;
284 return 0;
282} 285}
283 286
284extern int diag210(struct diag210 *addr); 287extern int diag210(struct diag210 *addr);
285 288
286extern void wait_cons_dev(void); 289extern void wait_cons_dev(void);
287 290
288extern void clear_all_subchannels(void);
289
290extern void cio_reset_channel_paths(void);
291
292extern void css_schedule_reprobe(void); 291extern void css_schedule_reprobe(void);
293 292
294extern void reipl_ccw_dev(struct ccw_dev_id *id); 293extern void reipl_ccw_dev(struct ccw_dev_id *id);
diff --git a/include/asm-s390/cpcmd.h b/include/asm-s390/cpcmd.h
index 1fcf65be7a23..48a9eab16429 100644
--- a/include/asm-s390/cpcmd.h
+++ b/include/asm-s390/cpcmd.h
@@ -7,8 +7,8 @@
7 * Christian Borntraeger (cborntra@de.ibm.com), 7 * Christian Borntraeger (cborntra@de.ibm.com),
8 */ 8 */
9 9
10#ifndef __CPCMD__ 10#ifndef _ASM_S390_CPCMD_H
11#define __CPCMD__ 11#define _ASM_S390_CPCMD_H
12 12
13/* 13/*
14 * the lowlevel function for cpcmd 14 * the lowlevel function for cpcmd
@@ -16,9 +16,6 @@
16 */ 16 */
17extern int __cpcmd(const char *cmd, char *response, int rlen, int *response_code); 17extern int __cpcmd(const char *cmd, char *response, int rlen, int *response_code);
18 18
19#ifndef __s390x__
20#define cpcmd __cpcmd
21#else
22/* 19/*
23 * cpcmd is the in-kernel interface for issuing CP commands 20 * cpcmd is the in-kernel interface for issuing CP commands
24 * 21 *
@@ -33,6 +30,5 @@ extern int __cpcmd(const char *cmd, char *response, int rlen, int *response_code
33 * NOTE: If the response buffer is not below 2 GB, cpcmd can sleep 30 * NOTE: If the response buffer is not below 2 GB, cpcmd can sleep
34 */ 31 */
35extern int cpcmd(const char *cmd, char *response, int rlen, int *response_code); 32extern int cpcmd(const char *cmd, char *response, int rlen, int *response_code);
36#endif /*__s390x__*/
37 33
38#endif 34#endif /* _ASM_S390_CPCMD_H */
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h
index c042f9578081..604f68fa6f56 100644
--- a/include/asm-s390/dasd.h
+++ b/include/asm-s390/dasd.h
@@ -69,11 +69,13 @@ typedef struct dasd_information2_t {
69 * 0x01: readonly (ro) 69 * 0x01: readonly (ro)
70 * 0x02: use diag discipline (diag) 70 * 0x02: use diag discipline (diag)
71 * 0x04: set the device initially online (internal use only) 71 * 0x04: set the device initially online (internal use only)
72 * 0x08: enable ERP related logging
72 */ 73 */
73#define DASD_FEATURE_DEFAULT 0x00 74#define DASD_FEATURE_DEFAULT 0x00
74#define DASD_FEATURE_READONLY 0x01 75#define DASD_FEATURE_READONLY 0x01
75#define DASD_FEATURE_USEDIAG 0x02 76#define DASD_FEATURE_USEDIAG 0x02
76#define DASD_FEATURE_INITIAL_ONLINE 0x04 77#define DASD_FEATURE_INITIAL_ONLINE 0x04
78#define DASD_FEATURE_ERPLOG 0x08
77 79
78#define DASD_PARTN_BITS 2 80#define DASD_PARTN_BITS 2
79 81
diff --git a/include/asm-s390/device.h b/include/asm-s390/device.h
new file mode 100644
index 000000000000..d8f9872b0e2d
--- /dev/null
+++ b/include/asm-s390/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h
index 5e261e1de671..5c5d02de49e9 100644
--- a/include/asm-s390/futex.h
+++ b/include/asm-s390/futex.h
@@ -4,8 +4,8 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/futex.h> 6#include <linux/futex.h>
7#include <linux/uaccess.h>
7#include <asm/errno.h> 8#include <asm/errno.h>
8#include <asm/uaccess.h>
9 9
10static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) 10static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
11{ 11{
@@ -21,7 +21,9 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) 21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT; 22 return -EFAULT;
23 23
24 pagefault_disable();
24 ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval); 25 ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval);
26 pagefault_enable();
25 27
26 if (!ret) { 28 if (!ret) {
27 switch (cmp) { 29 switch (cmp) {
diff --git a/include/asm-s390/kexec.h b/include/asm-s390/kexec.h
index ce28ddda0f50..9c35c8ad1afd 100644
--- a/include/asm-s390/kexec.h
+++ b/include/asm-s390/kexec.h
@@ -26,7 +26,7 @@
26 26
27/* Maximum address we can use for the control pages */ 27/* Maximum address we can use for the control pages */
28/* Not more than 2GB */ 28/* Not more than 2GB */
29#define KEXEC_CONTROL_MEMORY_LIMIT (1<<31) 29#define KEXEC_CONTROL_MEMORY_LIMIT (1UL<<31)
30 30
31/* Allocate one page for the pdp and the second for the code */ 31/* Allocate one page for the pdp and the second for the code */
32#define KEXEC_CONTROL_CODE_SIZE 4096 32#define KEXEC_CONTROL_CODE_SIZE 4096
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h
index 06583ed0bde7..74f7389bd3ee 100644
--- a/include/asm-s390/lowcore.h
+++ b/include/asm-s390/lowcore.h
@@ -362,6 +362,14 @@ static inline void set_prefix(__u32 address)
362 asm volatile("spx %0" : : "m" (address) : "memory"); 362 asm volatile("spx %0" : : "m" (address) : "memory");
363} 363}
364 364
365static inline __u32 store_prefix(void)
366{
367 __u32 address;
368
369 asm volatile("stpx %0" : "=m" (address));
370 return address;
371}
372
365#define __PANIC_MAGIC 0xDEADC0DE 373#define __PANIC_MAGIC 0xDEADC0DE
366 374
367#endif 375#endif
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h
index 363ea761d5ee..05ea6f172786 100644
--- a/include/asm-s390/page.h
+++ b/include/asm-s390/page.h
@@ -127,6 +127,26 @@ page_get_storage_key(unsigned long addr)
127 return skey; 127 return skey;
128} 128}
129 129
130extern unsigned long max_pfn;
131
132static inline int pfn_valid(unsigned long pfn)
133{
134 unsigned long dummy;
135 int ccode;
136
137 if (pfn >= max_pfn)
138 return 0;
139
140 asm volatile(
141 " lra %0,0(%2)\n"
142 " ipm %1\n"
143 " srl %1,28\n"
144 : "=d" (dummy), "=d" (ccode)
145 : "a" (pfn << PAGE_SHIFT)
146 : "cc");
147 return !ccode;
148}
149
130#endif /* !__ASSEMBLY__ */ 150#endif /* !__ASSEMBLY__ */
131 151
132/* to align the pointer to the (next) page boundary */ 152/* to align the pointer to the (next) page boundary */
@@ -138,8 +158,6 @@ page_get_storage_key(unsigned long addr)
138#define __va(x) (void *)(unsigned long)(x) 158#define __va(x) (void *)(unsigned long)(x)
139#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 159#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
140#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 160#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
141
142#define pfn_valid(pfn) ((pfn) < max_mapnr)
143#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 161#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
144 162
145#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 163#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h
index 28619de5ecae..0707a7e2fc16 100644
--- a/include/asm-s390/pgalloc.h
+++ b/include/asm-s390/pgalloc.h
@@ -25,8 +25,11 @@ extern void diag10(unsigned long addr);
25 * Page allocation orders. 25 * Page allocation orders.
26 */ 26 */
27#ifndef __s390x__ 27#ifndef __s390x__
28# define PTE_ALLOC_ORDER 0
29# define PMD_ALLOC_ORDER 0
28# define PGD_ALLOC_ORDER 1 30# define PGD_ALLOC_ORDER 1
29#else /* __s390x__ */ 31#else /* __s390x__ */
32# define PTE_ALLOC_ORDER 0
30# define PMD_ALLOC_ORDER 2 33# define PMD_ALLOC_ORDER 2
31# define PGD_ALLOC_ORDER 2 34# define PGD_ALLOC_ORDER 2
32#endif /* __s390x__ */ 35#endif /* __s390x__ */
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index 36bb6dacf008..ae61aca5d483 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -107,16 +107,27 @@ extern char empty_zero_page[PAGE_SIZE];
107 * The vmalloc() routines leaves a hole of 4kB between each vmalloced 107 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
108 * area for the same reason. ;) 108 * area for the same reason. ;)
109 */ 109 */
110extern unsigned long vmalloc_end;
110#define VMALLOC_OFFSET (8*1024*1024) 111#define VMALLOC_OFFSET (8*1024*1024)
111#define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) \ 112#define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) \
112 & ~(VMALLOC_OFFSET-1)) 113 & ~(VMALLOC_OFFSET-1))
114#define VMALLOC_END vmalloc_end
115
116/*
117 * We need some free virtual space to be able to do vmalloc.
118 * VMALLOC_MIN_SIZE defines the minimum size of the vmalloc
119 * area. On a machine with 2GB memory we make sure that we
120 * have at least 128MB free space for vmalloc. On a machine
121 * with 4TB we make sure we have at least 128GB.
122 */
113#ifndef __s390x__ 123#ifndef __s390x__
114# define VMALLOC_END (0x7fffffffL) 124#define VMALLOC_MIN_SIZE 0x8000000UL
125#define VMALLOC_END_INIT 0x80000000UL
115#else /* __s390x__ */ 126#else /* __s390x__ */
116# define VMALLOC_END (0x40000000000L) 127#define VMALLOC_MIN_SIZE 0x2000000000UL
128#define VMALLOC_END_INIT 0x40000000000UL
117#endif /* __s390x__ */ 129#endif /* __s390x__ */
118 130
119
120/* 131/*
121 * A 31 bit pagetable entry of S390 has following format: 132 * A 31 bit pagetable entry of S390 has following format:
122 * | PFRA | | OS | 133 * | PFRA | | OS |
@@ -806,11 +817,17 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
806 817
807#define kern_addr_valid(addr) (1) 818#define kern_addr_valid(addr) (1)
808 819
820extern int add_shared_memory(unsigned long start, unsigned long size);
821extern int remove_shared_memory(unsigned long start, unsigned long size);
822
809/* 823/*
810 * No page table caches to initialise 824 * No page table caches to initialise
811 */ 825 */
812#define pgtable_cache_init() do { } while (0) 826#define pgtable_cache_init() do { } while (0)
813 827
828#define __HAVE_ARCH_MEMMAP_INIT
829extern void memmap_init(unsigned long, int, unsigned long, unsigned long);
830
814#define __HAVE_ARCH_PTEP_ESTABLISH 831#define __HAVE_ARCH_PTEP_ESTABLISH
815#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 832#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
816#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG 833#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
diff --git a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h
index b94c98856e12..397d93fba3a7 100644
--- a/include/asm-s390/posix_types.h
+++ b/include/asm-s390/posix_types.h
@@ -104,7 +104,7 @@ static inline int __FD_ISSET(unsigned long fd, const __kernel_fd_set *fdsetp)
104 104
105#undef __FD_ZERO 105#undef __FD_ZERO
106#define __FD_ZERO(fdsetp) \ 106#define __FD_ZERO(fdsetp) \
107 ((void) memset ((__ptr_t) (fdsetp), 0, sizeof (__kernel_fd_set))) 107 ((void) memset ((void *) (fdsetp), 0, sizeof (__kernel_fd_set)))
108 108
109#endif /* __KERNEL__ */ 109#endif /* __KERNEL__ */
110 110
diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h
index 7189c79bc673..127f72e77419 100644
--- a/include/asm-s390/qdio.h
+++ b/include/asm-s390/qdio.h
@@ -34,6 +34,7 @@
34#define QDIO_QETH_QFMT 0 34#define QDIO_QETH_QFMT 0
35#define QDIO_ZFCP_QFMT 1 35#define QDIO_ZFCP_QFMT 1
36#define QDIO_IQDIO_QFMT 2 36#define QDIO_IQDIO_QFMT 2
37#define QDIO_IQDIO_QFMT_ASYNCH 3
37 38
38struct qdio_buffer_element{ 39struct qdio_buffer_element{
39 unsigned int flags; 40 unsigned int flags;
diff --git a/include/asm-s390/reset.h b/include/asm-s390/reset.h
new file mode 100644
index 000000000000..532e65a2aafc
--- /dev/null
+++ b/include/asm-s390/reset.h
@@ -0,0 +1,24 @@
1/*
2 * include/asm-s390/reset.h
3 *
4 * Copyright IBM Corp. 2006
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
6 */
7
8#ifndef _ASM_S390_RESET_H
9#define _ASM_S390_RESET_H
10
11#include <linux/list.h>
12
13struct reset_call {
14 struct list_head list;
15 void (*fn)(void);
16};
17
18extern void register_reset_call(struct reset_call *reset);
19extern void unregister_reset_call(struct reset_call *reset);
20extern void s390_reset_system(void);
21extern void (*s390_reset_mcck_handler)(void);
22extern void (*s390_reset_pgm_handler)(void);
23
24#endif /* _ASM_S390_RESET_H */
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h
index 5d72eda8a11b..9574fe80a046 100644
--- a/include/asm-s390/setup.h
+++ b/include/asm-s390/setup.h
@@ -2,18 +2,19 @@
2 * include/asm-s390/setup.h 2 * include/asm-s390/setup.h
3 * 3 *
4 * S390 version 4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation 5 * Copyright IBM Corp. 1999,2006
6 */ 6 */
7 7
8#ifndef _ASM_S390_SETUP_H 8#ifndef _ASM_S390_SETUP_H
9#define _ASM_S390_SETUP_H 9#define _ASM_S390_SETUP_H
10 10
11#define COMMAND_LINE_SIZE 896
12
11#ifdef __KERNEL__ 13#ifdef __KERNEL__
12 14
13#include <asm/types.h> 15#include <asm/types.h>
14 16
15#define PARMAREA 0x10400 17#define PARMAREA 0x10400
16#define COMMAND_LINE_SIZE 896
17#define MEMORY_CHUNKS 16 /* max 0x7fff */ 18#define MEMORY_CHUNKS 16 /* max 0x7fff */
18#define IPL_PARMBLOCK_ORIGIN 0x2000 19#define IPL_PARMBLOCK_ORIGIN 0x2000
19 20
@@ -30,6 +31,17 @@
30#endif /* __s390x__ */ 31#endif /* __s390x__ */
31#define COMMAND_LINE ((char *) (0x10480)) 32#define COMMAND_LINE ((char *) (0x10480))
32 33
34#define CHUNK_READ_WRITE 0
35#define CHUNK_READ_ONLY 1
36
37struct mem_chunk {
38 unsigned long addr;
39 unsigned long size;
40 unsigned long type;
41};
42
43extern struct mem_chunk memory_chunk[];
44
33/* 45/*
34 * Machine features detected in head.S 46 * Machine features detected in head.S
35 */ 47 */
@@ -53,7 +65,6 @@ extern unsigned long machine_flags;
53#define MACHINE_HAS_MVCOS (machine_flags & 512) 65#define MACHINE_HAS_MVCOS (machine_flags & 512)
54#endif /* __s390x__ */ 66#endif /* __s390x__ */
55 67
56
57#define MACHINE_HAS_SCLP (!MACHINE_IS_P390) 68#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
58 69
59/* 70/*
@@ -71,7 +82,6 @@ extern unsigned int console_irq;
71#define SET_CONSOLE_3215 do { console_mode = 2; } while (0) 82#define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
72#define SET_CONSOLE_3270 do { console_mode = 3; } while (0) 83#define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
73 84
74
75struct ipl_list_hdr { 85struct ipl_list_hdr {
76 u32 len; 86 u32 len;
77 u8 reserved1[3]; 87 u8 reserved1[3];
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index c3cf030ada4d..7097c96ed026 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -18,6 +18,7 @@
18 18
19#include <asm/lowcore.h> 19#include <asm/lowcore.h>
20#include <asm/sigp.h> 20#include <asm/sigp.h>
21#include <asm/ptrace.h>
21 22
22/* 23/*
23 s390 specific smp.c headers 24 s390 specific smp.c headers
@@ -101,6 +102,13 @@ smp_call_function_on(void (*func) (void *info), void *info,
101 func(info); 102 func(info);
102 return 0; 103 return 0;
103} 104}
105
106static inline void smp_send_stop(void)
107{
108 /* Disable all interrupts/machine checks */
109 __load_psw_mask(PSW_KERNEL_BITS & ~PSW_MASK_MCHECK);
110}
111
104#define smp_cpu_not_running(cpu) 1 112#define smp_cpu_not_running(cpu) 1
105#define smp_get_cpu(cpu) ({ 0; }) 113#define smp_get_cpu(cpu) ({ 0; })
106#define smp_put_cpu(cpu) ({ 0; }) 114#define smp_put_cpu(cpu) ({ 0; })
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index ccbafe4bf2cb..bd0b05ae87d2 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -115,6 +115,16 @@ extern void account_system_vtime(struct task_struct *);
115#define account_vtime(x) do { /* empty */ } while (0) 115#define account_vtime(x) do { /* empty */ } while (0)
116#endif 116#endif
117 117
118#ifdef CONFIG_PFAULT
119extern void pfault_irq_init(void);
120extern int pfault_init(void);
121extern void pfault_fini(void);
122#else /* CONFIG_PFAULT */
123#define pfault_irq_init() do { } while (0)
124#define pfault_init() ({-1;})
125#define pfault_fini() do { } while (0)
126#endif /* CONFIG_PFAULT */
127
118#define finish_arch_switch(prev) do { \ 128#define finish_arch_switch(prev) do { \
119 set_fs(current->thread.mm_segment); \ 129 set_fs(current->thread.mm_segment); \
120 account_vtime(prev); \ 130 account_vtime(prev); \
diff --git a/include/asm-s390/termbits.h b/include/asm-s390/termbits.h
index eb3f8bfabf61..585c78a6e407 100644
--- a/include/asm-s390/termbits.h
+++ b/include/asm-s390/termbits.h
@@ -25,6 +25,17 @@ struct termios {
25 cc_t c_cc[NCCS]; /* control characters */ 25 cc_t c_cc[NCCS]; /* control characters */
26}; 26};
27 27
28struct ktermios {
29 tcflag_t c_iflag; /* input mode flags */
30 tcflag_t c_oflag; /* output mode flags */
31 tcflag_t c_cflag; /* control mode flags */
32 tcflag_t c_lflag; /* local mode flags */
33 cc_t c_line; /* line discipline */
34 cc_t c_cc[NCCS]; /* control characters */
35 speed_t c_ispeed; /* input speed */
36 speed_t c_ospeed; /* output speed */
37};
38
28/* c_cc characters */ 39/* c_cc characters */
29#define VINTR 0 40#define VINTR 0
30#define VQUIT 1 41#define VQUIT 1
diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h
index d1e29cca54c9..62b23caf370e 100644
--- a/include/asm-s390/termios.h
+++ b/include/asm-s390/termios.h
@@ -75,39 +75,7 @@ struct termio {
75*/ 75*/
76#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 76#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
77 77
78/* 78#include <asm-generic/termios.h>
79 * Translate a "termio" structure into a "termios". Ugh.
80 */
81#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
82 unsigned short __tmp; \
83 get_user(__tmp,&(termio)->x); \
84 (termios)->x = (0xffff0000 & ((termios)->x)) | __tmp; \
85}
86
87#define user_termio_to_kernel_termios(termios, termio) \
88({ \
89 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
90 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
91 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
92 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
93 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
94})
95
96/*
97 * Translate a "termios" structure into a "termio". Ugh.
98 */
99#define kernel_termios_to_user_termio(termio, termios) \
100({ \
101 put_user((termios)->c_iflag, &(termio)->c_iflag); \
102 put_user((termios)->c_oflag, &(termio)->c_oflag); \
103 put_user((termios)->c_cflag, &(termio)->c_cflag); \
104 put_user((termios)->c_lflag, &(termio)->c_lflag); \
105 put_user((termios)->c_line, &(termio)->c_line); \
106 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
107})
108
109#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
110#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
111 79
112#endif /* __KERNEL__ */ 80#endif /* __KERNEL__ */
113 81
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h
index ae2951cc83ac..fc5d7cf19324 100644
--- a/include/asm-s390/types.h
+++ b/include/asm-s390/types.h
@@ -87,16 +87,6 @@ typedef union {
87 } subreg; 87 } subreg;
88} register_pair; 88} register_pair;
89 89
90#ifdef CONFIG_LBD
91typedef u64 sector_t;
92#define HAVE_SECTOR_T
93#endif
94
95#ifdef CONFIG_LSF
96typedef u64 blkcnt_t;
97#define HAVE_BLKCNT_T
98#endif
99
100#endif /* ! __s390x__ */ 90#endif /* ! __s390x__ */
101#endif /* __ASSEMBLY__ */ 91#endif /* __ASSEMBLY__ */
102#endif /* __KERNEL__ */ 92#endif /* __KERNEL__ */
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
index 72ae4efddb49..73ac4e82217b 100644
--- a/include/asm-s390/uaccess.h
+++ b/include/asm-s390/uaccess.h
@@ -201,7 +201,7 @@ extern int __get_user_bad(void) __attribute__((noreturn));
201 * Returns number of bytes that could not be copied. 201 * Returns number of bytes that could not be copied.
202 * On success, this will be zero. 202 * On success, this will be zero.
203 */ 203 */
204static inline unsigned long 204static inline unsigned long __must_check
205__copy_to_user(void __user *to, const void *from, unsigned long n) 205__copy_to_user(void __user *to, const void *from, unsigned long n)
206{ 206{
207 if (__builtin_constant_p(n) && (n <= 256)) 207 if (__builtin_constant_p(n) && (n <= 256))
@@ -226,7 +226,7 @@ __copy_to_user(void __user *to, const void *from, unsigned long n)
226 * Returns number of bytes that could not be copied. 226 * Returns number of bytes that could not be copied.
227 * On success, this will be zero. 227 * On success, this will be zero.
228 */ 228 */
229static inline unsigned long 229static inline unsigned long __must_check
230copy_to_user(void __user *to, const void *from, unsigned long n) 230copy_to_user(void __user *to, const void *from, unsigned long n)
231{ 231{
232 might_sleep(); 232 might_sleep();
@@ -252,7 +252,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
252 * If some data could not be copied, this function will pad the copied 252 * If some data could not be copied, this function will pad the copied
253 * data to the requested size using zero bytes. 253 * data to the requested size using zero bytes.
254 */ 254 */
255static inline unsigned long 255static inline unsigned long __must_check
256__copy_from_user(void *to, const void __user *from, unsigned long n) 256__copy_from_user(void *to, const void __user *from, unsigned long n)
257{ 257{
258 if (__builtin_constant_p(n) && (n <= 256)) 258 if (__builtin_constant_p(n) && (n <= 256))
@@ -277,7 +277,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
277 * If some data could not be copied, this function will pad the copied 277 * If some data could not be copied, this function will pad the copied
278 * data to the requested size using zero bytes. 278 * data to the requested size using zero bytes.
279 */ 279 */
280static inline unsigned long 280static inline unsigned long __must_check
281copy_from_user(void *to, const void __user *from, unsigned long n) 281copy_from_user(void *to, const void __user *from, unsigned long n)
282{ 282{
283 might_sleep(); 283 might_sleep();
@@ -288,13 +288,13 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
288 return n; 288 return n;
289} 289}
290 290
291static inline unsigned long 291static inline unsigned long __must_check
292__copy_in_user(void __user *to, const void __user *from, unsigned long n) 292__copy_in_user(void __user *to, const void __user *from, unsigned long n)
293{ 293{
294 return uaccess.copy_in_user(n, to, from); 294 return uaccess.copy_in_user(n, to, from);
295} 295}
296 296
297static inline unsigned long 297static inline unsigned long __must_check
298copy_in_user(void __user *to, const void __user *from, unsigned long n) 298copy_in_user(void __user *to, const void __user *from, unsigned long n)
299{ 299{
300 might_sleep(); 300 might_sleep();
@@ -306,7 +306,7 @@ copy_in_user(void __user *to, const void __user *from, unsigned long n)
306/* 306/*
307 * Copy a null terminated string from userspace. 307 * Copy a null terminated string from userspace.
308 */ 308 */
309static inline long 309static inline long __must_check
310strncpy_from_user(char *dst, const char __user *src, long count) 310strncpy_from_user(char *dst, const char __user *src, long count)
311{ 311{
312 long res = -EFAULT; 312 long res = -EFAULT;
@@ -343,13 +343,13 @@ strnlen_user(const char __user * src, unsigned long n)
343 * Zero Userspace 343 * Zero Userspace
344 */ 344 */
345 345
346static inline unsigned long 346static inline unsigned long __must_check
347__clear_user(void __user *to, unsigned long n) 347__clear_user(void __user *to, unsigned long n)
348{ 348{
349 return uaccess.clear_user(n, to); 349 return uaccess.clear_user(n, to);
350} 350}
351 351
352static inline unsigned long 352static inline unsigned long __must_check
353clear_user(void __user *to, unsigned long n) 353clear_user(void __user *to, unsigned long n)
354{ 354{
355 might_sleep(); 355 might_sleep();
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 71d3c21b84f0..fb6fef97d739 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -345,160 +345,6 @@
345 345
346#ifdef __KERNEL__ 346#ifdef __KERNEL__
347 347
348#include <linux/err.h>
349
350#define __syscall_return(type, res) \
351do { \
352 if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
353 errno = -(res); \
354 res = -1; \
355 } \
356 return (type) (res); \
357} while (0)
358
359#define _svc_clobber "1", "cc", "memory"
360
361#define _syscall0(type,name) \
362type name(void) { \
363 register long __svcres asm("2"); \
364 long __res; \
365 asm volatile( \
366 " .if %1 < 256\n" \
367 " svc %b1\n" \
368 " .else\n" \
369 " la %%r1,%1\n" \
370 " svc 0\n" \
371 " .endif" \
372 : "=d" (__svcres) \
373 : "i" (__NR_##name) \
374 : _svc_clobber); \
375 __res = __svcres; \
376 __syscall_return(type,__res); \
377}
378
379#define _syscall1(type,name,type1,arg1) \
380type name(type1 arg1) { \
381 register type1 __arg1 asm("2") = arg1; \
382 register long __svcres asm("2"); \
383 long __res; \
384 asm volatile( \
385 " .if %1 < 256\n" \
386 " svc %b1\n" \
387 " .else\n" \
388 " la %%r1,%1\n" \
389 " svc 0\n" \
390 " .endif" \
391 : "=d" (__svcres) \
392 : "i" (__NR_##name), \
393 "0" (__arg1) \
394 : _svc_clobber); \
395 __res = __svcres; \
396 __syscall_return(type,__res); \
397}
398
399#define _syscall2(type,name,type1,arg1,type2,arg2) \
400type name(type1 arg1, type2 arg2) { \
401 register type1 __arg1 asm("2") = arg1; \
402 register type2 __arg2 asm("3") = arg2; \
403 register long __svcres asm("2"); \
404 long __res; \
405 asm volatile( \
406 " .if %1 < 256\n" \
407 " svc %b1\n" \
408 " .else\n" \
409 " la %%r1,%1\n" \
410 " svc 0\n" \
411 " .endif" \
412 : "=d" (__svcres) \
413 : "i" (__NR_##name), \
414 "0" (__arg1), \
415 "d" (__arg2) \
416 : _svc_clobber ); \
417 __res = __svcres; \
418 __syscall_return(type,__res); \
419}
420
421#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
422type name(type1 arg1, type2 arg2, type3 arg3) { \
423 register type1 __arg1 asm("2") = arg1; \
424 register type2 __arg2 asm("3") = arg2; \
425 register type3 __arg3 asm("4") = arg3; \
426 register long __svcres asm("2"); \
427 long __res; \
428 asm volatile( \
429 " .if %1 < 256\n" \
430 " svc %b1\n" \
431 " .else\n" \
432 " la %%r1,%1\n" \
433 " svc 0\n" \
434 " .endif" \
435 : "=d" (__svcres) \
436 : "i" (__NR_##name), \
437 "0" (__arg1), \
438 "d" (__arg2), \
439 "d" (__arg3) \
440 : _svc_clobber); \
441 __res = __svcres; \
442 __syscall_return(type,__res); \
443}
444
445#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3, \
446 type4,name4) \
447type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
448 register type1 __arg1 asm("2") = arg1; \
449 register type2 __arg2 asm("3") = arg2; \
450 register type3 __arg3 asm("4") = arg3; \
451 register type4 __arg4 asm("5") = arg4; \
452 register long __svcres asm("2"); \
453 long __res; \
454 asm volatile( \
455 " .if %1 < 256\n" \
456 " svc %b1\n" \
457 " .else\n" \
458 " la %%r1,%1\n" \
459 " svc 0\n" \
460 " .endif" \
461 : "=d" (__svcres) \
462 : "i" (__NR_##name), \
463 "0" (__arg1), \
464 "d" (__arg2), \
465 "d" (__arg3), \
466 "d" (__arg4) \
467 : _svc_clobber); \
468 __res = __svcres; \
469 __syscall_return(type,__res); \
470}
471
472#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3, \
473 type4,name4,type5,name5) \
474type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
475 type5 arg5) { \
476 register type1 __arg1 asm("2") = arg1; \
477 register type2 __arg2 asm("3") = arg2; \
478 register type3 __arg3 asm("4") = arg3; \
479 register type4 __arg4 asm("5") = arg4; \
480 register type5 __arg5 asm("6") = arg5; \
481 register long __svcres asm("2"); \
482 long __res; \
483 asm volatile( \
484 " .if %1 < 256\n" \
485 " svc %b1\n" \
486 " .else\n" \
487 " la %%r1,%1\n" \
488 " svc 0\n" \
489 " .endif" \
490 : "=d" (__svcres) \
491 : "i" (__NR_##name), \
492 "0" (__arg1), \
493 "d" (__arg2), \
494 "d" (__arg3), \
495 "d" (__arg4), \
496 "d" (__arg5) \
497 : _svc_clobber); \
498 __res = __svcres; \
499 __syscall_return(type,__res); \
500}
501
502#define __ARCH_WANT_IPC_PARSE_VERSION 348#define __ARCH_WANT_IPC_PARSE_VERSION
503#define __ARCH_WANT_OLD_READDIR 349#define __ARCH_WANT_OLD_READDIR
504#define __ARCH_WANT_SYS_ALARM 350#define __ARCH_WANT_SYS_ALARM
diff --git a/include/asm-s390/zcrypt.h b/include/asm-s390/zcrypt.h
index 7244c68464f2..b90e55888a55 100644
--- a/include/asm-s390/zcrypt.h
+++ b/include/asm-s390/zcrypt.h
@@ -180,40 +180,8 @@ struct ica_xcRB {
180 * for the implementation details for the contents of the 180 * for the implementation details for the contents of the
181 * block 181 * block
182 * 182 *
183 * Z90STAT_TOTALCOUNT 183 * ZSECSENDCPRB
184 * Return an integer count of all device types together. 184 * Send an arbitrary CPRB to a crypto card.
185 *
186 * Z90STAT_PCICACOUNT
187 * Return an integer count of all PCICAs.
188 *
189 * Z90STAT_PCICCCOUNT
190 * Return an integer count of all PCICCs.
191 *
192 * Z90STAT_PCIXCCMCL2COUNT
193 * Return an integer count of all MCL2 PCIXCCs.
194 *
195 * Z90STAT_PCIXCCMCL3COUNT
196 * Return an integer count of all MCL3 PCIXCCs.
197 *
198 * Z90STAT_CEX2CCOUNT
199 * Return an integer count of all CEX2Cs.
200 *
201 * Z90STAT_CEX2ACOUNT
202 * Return an integer count of all CEX2As.
203 *
204 * Z90STAT_REQUESTQ_COUNT
205 * Return an integer count of the number of entries waiting to be
206 * sent to a device.
207 *
208 * Z90STAT_PENDINGQ_COUNT
209 * Return an integer count of the number of entries sent to a
210 * device awaiting the reply.
211 *
212 * Z90STAT_TOTALOPEN_COUNT
213 * Return an integer count of the number of open file handles.
214 *
215 * Z90STAT_DOMAIN_INDEX
216 * Return the integer value of the Cryptographic Domain.
217 * 185 *
218 * Z90STAT_STATUS_MASK 186 * Z90STAT_STATUS_MASK
219 * Return an 64 element array of unsigned chars for the status of 187 * Return an 64 element array of unsigned chars for the status of
@@ -235,28 +203,51 @@ struct ica_xcRB {
235 * of successfully completed requests per device since the device 203 * of successfully completed requests per device since the device
236 * was detected and made available. 204 * was detected and made available.
237 * 205 *
238 * ICAZ90STATUS (deprecated) 206 * Z90STAT_REQUESTQ_COUNT
207 * Return an integer count of the number of entries waiting to be
208 * sent to a device.
209 *
210 * Z90STAT_PENDINGQ_COUNT
211 * Return an integer count of the number of entries sent to all
212 * devices awaiting the reply.
213 *
214 * Z90STAT_TOTALOPEN_COUNT
215 * Return an integer count of the number of open file handles.
216 *
217 * Z90STAT_DOMAIN_INDEX
218 * Return the integer value of the Cryptographic Domain.
219 *
220 * The following ioctls are deprecated and should be no longer used:
221 *
222 * Z90STAT_TOTALCOUNT
223 * Return an integer count of all device types together.
224 *
225 * Z90STAT_PCICACOUNT
226 * Return an integer count of all PCICAs.
227 *
228 * Z90STAT_PCICCCOUNT
229 * Return an integer count of all PCICCs.
230 *
231 * Z90STAT_PCIXCCMCL2COUNT
232 * Return an integer count of all MCL2 PCIXCCs.
233 *
234 * Z90STAT_PCIXCCMCL3COUNT
235 * Return an integer count of all MCL3 PCIXCCs.
236 *
237 * Z90STAT_CEX2CCOUNT
238 * Return an integer count of all CEX2Cs.
239 *
240 * Z90STAT_CEX2ACOUNT
241 * Return an integer count of all CEX2As.
242 *
243 * ICAZ90STATUS
239 * Return some device driver status in a ica_z90_status struct 244 * Return some device driver status in a ica_z90_status struct
240 * This takes an ica_z90_status struct as its arg. 245 * This takes an ica_z90_status struct as its arg.
241 * 246 *
242 * NOTE: this ioctl() is deprecated, and has been replaced with 247 * Z90STAT_PCIXCCCOUNT
243 * single ioctl()s for each type of status being requested
244 *
245 * Z90STAT_PCIXCCCOUNT (deprecated)
246 * Return an integer count of all PCIXCCs (MCL2 + MCL3). 248 * Return an integer count of all PCIXCCs (MCL2 + MCL3).
247 * This is DEPRECATED now that MCL3 PCIXCCs are treated differently from 249 * This is DEPRECATED now that MCL3 PCIXCCs are treated differently from
248 * MCL2 PCIXCCs. 250 * MCL2 PCIXCCs.
249 *
250 * Z90QUIESCE (not recommended)
251 * Quiesce the driver. This is intended to stop all new
252 * requests from being processed. Its use is NOT recommended,
253 * except in circumstances where there is no other way to stop
254 * callers from accessing the driver. Its original use was to
255 * allow the driver to be "drained" of work in preparation for
256 * a system shutdown.
257 *
258 * NOTE: once issued, this ban on new work cannot be undone
259 * except by unloading and reloading the driver.
260 */ 251 */
261 252
262/** 253/**