aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/ap_bus.h
diff options
context:
space:
mode:
authorHolger Dengler <hd@linux.vnet.ibm.com>2011-07-24 04:48:25 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-07-24 04:48:22 -0400
commit6bed05bcbc8e5932e06059f0c3be1acdf30a39d4 (patch)
tree57b2c17507127586cf8cfd46244be548c261d5d2 /drivers/s390/crypto/ap_bus.h
parentfdb204d1a7746a90b0d8a8665bf59af98c8c366a (diff)
[S390] ap: toleration support for ap device type 10
Add toleration support for ap devices with device type 10. Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.h')
-rw-r--r--drivers/s390/crypto/ap_bus.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h
index 08b9738285b4..d960a6309eec 100644
--- a/drivers/s390/crypto/ap_bus.h
+++ b/drivers/s390/crypto/ap_bus.h
@@ -6,6 +6,7 @@
6 * Martin Schwidefsky <schwidefsky@de.ibm.com> 6 * Martin Schwidefsky <schwidefsky@de.ibm.com>
7 * Ralph Wuerthner <rwuerthn@de.ibm.com> 7 * Ralph Wuerthner <rwuerthn@de.ibm.com>
8 * Felix Beck <felix.beck@de.ibm.com> 8 * Felix Beck <felix.beck@de.ibm.com>
9 * Holger Dengler <hd@linux.vnet.ibm.com>
9 * 10 *
10 * Adjunct processor bus header file. 11 * Adjunct processor bus header file.
11 * 12 *
@@ -72,7 +73,26 @@ struct ap_queue_status {
72 unsigned int int_enabled : 1; 73 unsigned int int_enabled : 1;
73 unsigned int response_code : 8; 74 unsigned int response_code : 8;
74 unsigned int pad2 : 16; 75 unsigned int pad2 : 16;
75}; 76} __packed;
77
78#define AP_QUEUE_STATUS_INVALID \
79 { 1, 1, 1, 0xF, 1, 0xFF, 0xFFFF }
80
81static inline
82int ap_queue_status_invalid_test(struct ap_queue_status *status)
83{
84 struct ap_queue_status invalid = AP_QUEUE_STATUS_INVALID;
85 return !(memcmp(status, &invalid, sizeof(struct ap_queue_status)));
86}
87
88#define MAX_AP_FACILITY 31
89
90static inline int test_ap_facility(unsigned int function, unsigned int nr)
91{
92 if (nr > MAX_AP_FACILITY)
93 return 0;
94 return function & (unsigned int)(0x80000000 >> nr);
95}
76 96
77#define AP_RESPONSE_NORMAL 0x00 97#define AP_RESPONSE_NORMAL 0x00
78#define AP_RESPONSE_Q_NOT_AVAIL 0x01 98#define AP_RESPONSE_Q_NOT_AVAIL 0x01