aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-19 23:04:26 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-19 23:04:26 -0400
commit511b00a3194167bad447d4c81027d6a44920dfd2 (patch)
tree080c076f994f701e40c03e7d5f7ce7f50115d2dc
parentfbeb1f19229baa9ee80f315e9d24635045455082 (diff)
parent43a867a2d2a119c744bab6dc8d3e1da6809d7141 (diff)
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] zcrypt: fix possible race when unloading zcrypt driver modules [S390] zcrypt: fix possible dead lock in AP bus module [S390] Wire up sys_utimes. [S390] reboot from and dump to SCSI under z/VM fails. [S390] Wire up compat_sys_epoll_pwait. [S390] strlcpy is smart enough [S390] memory detection: fix off by one bug. [S390] cio: qdio slsb setup
-rw-r--r--arch/s390/kernel/compat_wrapper.S17
-rw-r--r--arch/s390/kernel/debug.c2
-rw-r--r--arch/s390/kernel/early.c10
-rw-r--r--arch/s390/kernel/ipl.c9
-rw-r--r--arch/s390/kernel/syscalls.S3
-rw-r--r--drivers/s390/cio/qdio.c26
-rw-r--r--drivers/s390/crypto/ap_bus.c30
-rw-r--r--drivers/s390/crypto/ap_bus.h1
-rw-r--r--drivers/s390/crypto/zcrypt_api.c12
-rw-r--r--include/asm-s390/ipl.h5
-rw-r--r--include/asm-s390/unistd.h3
11 files changed, 87 insertions, 31 deletions
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 97901296894e..32a69a18a796 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1665,3 +1665,20 @@ sys_getcpu_wrapper:
1665 llgtr %r3,%r3 # unsigned * 1665 llgtr %r3,%r3 # unsigned *
1666 llgtr %r4,%r4 # struct getcpu_cache * 1666 llgtr %r4,%r4 # struct getcpu_cache *
1667 jg sys_getcpu 1667 jg sys_getcpu
1668
1669 .globl compat_sys_epoll_pwait_wrapper
1670compat_sys_epoll_pwait_wrapper:
1671 lgfr %r2,%r2 # int
1672 llgtr %r3,%r3 # struct compat_epoll_event *
1673 lgfr %r4,%r4 # int
1674 lgfr %r5,%r5 # int
1675 llgtr %r6,%r6 # compat_sigset_t *
1676 llgf %r0,164(%r15) # compat_size_t
1677 stg %r0,160(%r15)
1678 jg compat_sys_epoll_pwait
1679
1680 .globl compat_sys_utimes_wrapper
1681compat_sys_utimes_wrapper:
1682 llgtr %r2,%r2 # char *
1683 llgtr %r3,%r3 # struct compat_timeval *
1684 jg compat_sys_utimes
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index eca3fe595ff4..dca6eaf82c80 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -268,7 +268,7 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
268 rc->level = level; 268 rc->level = level;
269 rc->buf_size = buf_size; 269 rc->buf_size = buf_size;
270 rc->entry_size = sizeof(debug_entry_t) + buf_size; 270 rc->entry_size = sizeof(debug_entry_t) + buf_size;
271 strlcpy(rc->name, name, sizeof(rc->name)-1); 271 strlcpy(rc->name, name, sizeof(rc->name));
272 memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *)); 272 memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *));
273 memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS * 273 memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS *
274 sizeof(struct dentry*)); 274 sizeof(struct dentry*));
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index afca1c6f4d21..5e47936573f2 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -141,9 +141,9 @@ static noinline __init void detect_machine_type(void)
141 machine_flags |= 4; 141 machine_flags |= 4;
142} 142}
143 143
144#ifdef CONFIG_64BIT
144static noinline __init int memory_fast_detect(void) 145static noinline __init int memory_fast_detect(void)
145{ 146{
146
147 unsigned long val0 = 0; 147 unsigned long val0 = 0;
148 unsigned long val1 = 0xc; 148 unsigned long val1 = 0xc;
149 int ret = -ENOSYS; 149 int ret = -ENOSYS;
@@ -161,9 +161,15 @@ static noinline __init int memory_fast_detect(void)
161 if (ret || val0 != val1) 161 if (ret || val0 != val1)
162 return -ENOSYS; 162 return -ENOSYS;
163 163
164 memory_chunk[0].size = val0; 164 memory_chunk[0].size = val0 + 1;
165 return 0; 165 return 0;
166} 166}
167#else
168static inline int memory_fast_detect(void)
169{
170 return -ENOSYS;
171}
172#endif
167 173
168#define ADDR2G (1UL << 31) 174#define ADDR2G (1UL << 31)
169 175
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index d125a4ead08d..f731185bf2bd 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -839,7 +839,7 @@ static int __init reipl_ccw_init(void)
839 } 839 }
840 reipl_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN; 840 reipl_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN;
841 reipl_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION; 841 reipl_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION;
842 reipl_block_ccw->hdr.blk0_len = sizeof(reipl_block_ccw->ipl_info.ccw); 842 reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
843 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW; 843 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
844 /* check if read scp info worked and set loadparm */ 844 /* check if read scp info worked and set loadparm */
845 if (SCCB_VALID) 845 if (SCCB_VALID)
@@ -880,8 +880,7 @@ static int __init reipl_fcp_init(void)
880 } else { 880 } else {
881 reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN; 881 reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN;
882 reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION; 882 reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION;
883 reipl_block_fcp->hdr.blk0_len = 883 reipl_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN;
884 sizeof(reipl_block_fcp->ipl_info.fcp);
885 reipl_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP; 884 reipl_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP;
886 reipl_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_IPL; 885 reipl_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_IPL;
887 } 886 }
@@ -930,7 +929,7 @@ static int __init dump_ccw_init(void)
930 } 929 }
931 dump_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN; 930 dump_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN;
932 dump_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION; 931 dump_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION;
933 dump_block_ccw->hdr.blk0_len = sizeof(reipl_block_ccw->ipl_info.ccw); 932 dump_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
934 dump_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW; 933 dump_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
935 dump_capabilities |= IPL_TYPE_CCW; 934 dump_capabilities |= IPL_TYPE_CCW;
936 return 0; 935 return 0;
@@ -954,7 +953,7 @@ static int __init dump_fcp_init(void)
954 } 953 }
955 dump_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN; 954 dump_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN;
956 dump_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION; 955 dump_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION;
957 dump_block_fcp->hdr.blk0_len = sizeof(dump_block_fcp->ipl_info.fcp); 956 dump_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN;
958 dump_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP; 957 dump_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP;
959 dump_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_DUMP; 958 dump_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_DUMP;
960 dump_capabilities |= IPL_TYPE_FCP; 959 dump_capabilities |= IPL_TYPE_FCP;
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index a52c44455bf0..c774f1069e10 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -320,4 +320,5 @@ SYSCALL(sys_tee,sys_tee,sys_tee_wrapper)
320SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper) 320SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper)
321NI_SYSCALL /* 310 sys_move_pages */ 321NI_SYSCALL /* 310 sys_move_pages */
322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) 322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,sys_ni_syscall) 323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
324SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index 5b1e3ff26c0b..05fac0733f3d 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -210,9 +210,11 @@ again:
210 goto again; 210 goto again;
211 } 211 }
212 if (rc < 0) { 212 if (rc < 0) {
213 QDIO_DBF_TEXT3(1,trace,"sqberr"); 213 QDIO_DBF_TEXT3(1,trace,"sqberr");
214 sprintf(dbf_text,"%2x,%2x,%d,%d",tmp_cnt,*cnt,ccq,q_no); 214 sprintf(dbf_text,"%2x,%2x",tmp_cnt,*cnt);
215 QDIO_DBF_TEXT3(1,trace,dbf_text); 215 QDIO_DBF_TEXT3(1,trace,dbf_text);
216 sprintf(dbf_text,"%d,%d",ccq,q_no);
217 QDIO_DBF_TEXT3(1,trace,dbf_text);
216 q->handler(q->cdev,QDIO_STATUS_ACTIVATE_CHECK_CONDITION| 218 q->handler(q->cdev,QDIO_STATUS_ACTIVATE_CHECK_CONDITION|
217 QDIO_STATUS_LOOK_FOR_ERROR, 219 QDIO_STATUS_LOOK_FOR_ERROR,
218 0, 0, 0, -1, -1, q->int_parm); 220 0, 0, 0, -1, -1, q->int_parm);
@@ -1250,7 +1252,6 @@ qdio_is_inbound_q_done(struct qdio_q *q)
1250 if (!no_used) { 1252 if (!no_used) {
1251 QDIO_DBF_TEXT4(0,trace,"inqisdnA"); 1253 QDIO_DBF_TEXT4(0,trace,"inqisdnA");
1252 QDIO_DBF_HEX4(0,trace,&q,sizeof(void*)); 1254 QDIO_DBF_HEX4(0,trace,&q,sizeof(void*));
1253 QDIO_DBF_TEXT4(0,trace,dbf_text);
1254 return 1; 1255 return 1;
1255 } 1256 }
1256 if (irq->is_qebsm) { 1257 if (irq->is_qebsm) {
@@ -3371,10 +3372,15 @@ qdio_do_qdio_fill_input(struct qdio_q *q, unsigned int qidx,
3371 unsigned int count, struct qdio_buffer *buffers) 3372 unsigned int count, struct qdio_buffer *buffers)
3372{ 3373{
3373 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr; 3374 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr;
3375 int tmp = 0;
3376
3374 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1); 3377 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1);
3375 if (irq->is_qebsm) { 3378 if (irq->is_qebsm) {
3376 while (count) 3379 while (count) {
3377 set_slsb(q, &qidx, SLSB_CU_INPUT_EMPTY, &count); 3380 tmp = set_slsb(q, &qidx, SLSB_CU_INPUT_EMPTY, &count);
3381 if (!tmp)
3382 return;
3383 }
3378 return; 3384 return;
3379 } 3385 }
3380 for (;;) { 3386 for (;;) {
@@ -3390,11 +3396,15 @@ qdio_do_qdio_fill_output(struct qdio_q *q, unsigned int qidx,
3390 unsigned int count, struct qdio_buffer *buffers) 3396 unsigned int count, struct qdio_buffer *buffers)
3391{ 3397{
3392 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr; 3398 struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr;
3399 int tmp = 0;
3393 3400
3394 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1); 3401 qidx &= (QDIO_MAX_BUFFERS_PER_Q - 1);
3395 if (irq->is_qebsm) { 3402 if (irq->is_qebsm) {
3396 while (count) 3403 while (count) {
3397 set_slsb(q, &qidx, SLSB_CU_OUTPUT_PRIMED, &count); 3404 tmp = set_slsb(q, &qidx, SLSB_CU_OUTPUT_PRIMED, &count);
3405 if (!tmp)
3406 return;
3407 }
3398 return; 3408 return;
3399 } 3409 }
3400 3410
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index c7d1355237b6..181b51772b1b 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -65,6 +65,8 @@ module_param_named(poll_thread, ap_thread_flag, int, 0000);
65MODULE_PARM_DESC(poll_thread, "Turn on/off poll thread, default is 1 (on)."); 65MODULE_PARM_DESC(poll_thread, "Turn on/off poll thread, default is 1 (on).");
66 66
67static struct device *ap_root_device = NULL; 67static struct device *ap_root_device = NULL;
68static DEFINE_SPINLOCK(ap_device_lock);
69static LIST_HEAD(ap_device_list);
68 70
69/** 71/**
70 * Workqueue & timer for bus rescan. 72 * Workqueue & timer for bus rescan.
@@ -457,6 +459,9 @@ static int ap_device_probe(struct device *dev)
457 int rc; 459 int rc;
458 460
459 ap_dev->drv = ap_drv; 461 ap_dev->drv = ap_drv;
462 spin_lock_bh(&ap_device_lock);
463 list_add(&ap_dev->list, &ap_device_list);
464 spin_unlock_bh(&ap_device_lock);
460 rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV; 465 rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV;
461 return rc; 466 return rc;
462} 467}
@@ -497,6 +502,9 @@ static int ap_device_remove(struct device *dev)
497 ap_flush_queue(ap_dev); 502 ap_flush_queue(ap_dev);
498 if (ap_drv->remove) 503 if (ap_drv->remove)
499 ap_drv->remove(ap_dev); 504 ap_drv->remove(ap_dev);
505 spin_lock_bh(&ap_device_lock);
506 list_del_init(&ap_dev->list);
507 spin_unlock_bh(&ap_device_lock);
500 return 0; 508 return 0;
501} 509}
502 510
@@ -772,6 +780,7 @@ static void ap_scan_bus(struct work_struct *unused)
772 spin_lock_init(&ap_dev->lock); 780 spin_lock_init(&ap_dev->lock);
773 INIT_LIST_HEAD(&ap_dev->pendingq); 781 INIT_LIST_HEAD(&ap_dev->pendingq);
774 INIT_LIST_HEAD(&ap_dev->requestq); 782 INIT_LIST_HEAD(&ap_dev->requestq);
783 INIT_LIST_HEAD(&ap_dev->list);
775 if (device_type == 0) 784 if (device_type == 0)
776 ap_probe_device_type(ap_dev); 785 ap_probe_device_type(ap_dev);
777 else 786 else
@@ -1033,14 +1042,13 @@ static void ap_poll_timeout(unsigned long unused)
1033 * polling until bit 2^0 of the control flags is not set. If bit 2^1 1042 * polling until bit 2^0 of the control flags is not set. If bit 2^1
1034 * of the control flags has been set arm the poll timer. 1043 * of the control flags has been set arm the poll timer.
1035 */ 1044 */
1036static int __ap_poll_all(struct device *dev, void *data) 1045static int __ap_poll_all(struct ap_device *ap_dev, unsigned long *flags)
1037{ 1046{
1038 struct ap_device *ap_dev = to_ap_dev(dev);
1039 int rc; 1047 int rc;
1040 1048
1041 spin_lock(&ap_dev->lock); 1049 spin_lock(&ap_dev->lock);
1042 if (!ap_dev->unregistered) { 1050 if (!ap_dev->unregistered) {
1043 rc = ap_poll_queue(to_ap_dev(dev), (unsigned long *) data); 1051 rc = ap_poll_queue(ap_dev, flags);
1044 if (rc) 1052 if (rc)
1045 ap_dev->unregistered = 1; 1053 ap_dev->unregistered = 1;
1046 } else 1054 } else
@@ -1054,10 +1062,15 @@ static int __ap_poll_all(struct device *dev, void *data)
1054static void ap_poll_all(unsigned long dummy) 1062static void ap_poll_all(unsigned long dummy)
1055{ 1063{
1056 unsigned long flags; 1064 unsigned long flags;
1065 struct ap_device *ap_dev;
1057 1066
1058 do { 1067 do {
1059 flags = 0; 1068 flags = 0;
1060 bus_for_each_dev(&ap_bus_type, NULL, &flags, __ap_poll_all); 1069 spin_lock(&ap_device_lock);
1070 list_for_each_entry(ap_dev, &ap_device_list, list) {
1071 __ap_poll_all(ap_dev, &flags);
1072 }
1073 spin_unlock(&ap_device_lock);
1061 } while (flags & 1); 1074 } while (flags & 1);
1062 if (flags & 2) 1075 if (flags & 2)
1063 ap_schedule_poll_timer(); 1076 ap_schedule_poll_timer();
@@ -1075,6 +1088,7 @@ static int ap_poll_thread(void *data)
1075 DECLARE_WAITQUEUE(wait, current); 1088 DECLARE_WAITQUEUE(wait, current);
1076 unsigned long flags; 1089 unsigned long flags;
1077 int requests; 1090 int requests;
1091 struct ap_device *ap_dev;
1078 1092
1079 set_user_nice(current, 19); 1093 set_user_nice(current, 19);
1080 while (1) { 1094 while (1) {
@@ -1092,10 +1106,12 @@ static int ap_poll_thread(void *data)
1092 set_current_state(TASK_RUNNING); 1106 set_current_state(TASK_RUNNING);
1093 remove_wait_queue(&ap_poll_wait, &wait); 1107 remove_wait_queue(&ap_poll_wait, &wait);
1094 1108
1095 local_bh_disable();
1096 flags = 0; 1109 flags = 0;
1097 bus_for_each_dev(&ap_bus_type, NULL, &flags, __ap_poll_all); 1110 spin_lock_bh(&ap_device_lock);
1098 local_bh_enable(); 1111 list_for_each_entry(ap_dev, &ap_device_list, list) {
1112 __ap_poll_all(ap_dev, &flags);
1113 }
1114 spin_unlock_bh(&ap_device_lock);
1099 } 1115 }
1100 set_current_state(TASK_RUNNING); 1116 set_current_state(TASK_RUNNING);
1101 remove_wait_queue(&ap_poll_wait, &wait); 1117 remove_wait_queue(&ap_poll_wait, &wait);
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h
index 83b69c01cd6e..008559ea742b 100644
--- a/drivers/s390/crypto/ap_bus.h
+++ b/drivers/s390/crypto/ap_bus.h
@@ -106,6 +106,7 @@ struct ap_device {
106 struct device device; 106 struct device device;
107 struct ap_driver *drv; /* Pointer to AP device driver. */ 107 struct ap_driver *drv; /* Pointer to AP device driver. */
108 spinlock_t lock; /* Per device lock. */ 108 spinlock_t lock; /* Per device lock. */
109 struct list_head list; /* private list of all AP devices. */
109 110
110 ap_qid_t qid; /* AP queue id. */ 111 ap_qid_t qid; /* AP queue id. */
111 int queue_depth; /* AP queue depth.*/ 112 int queue_depth; /* AP queue depth.*/
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c
index 99761391f340..e3625a47a596 100644
--- a/drivers/s390/crypto/zcrypt_api.c
+++ b/drivers/s390/crypto/zcrypt_api.c
@@ -298,14 +298,14 @@ static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex)
298 get_device(&zdev->ap_dev->device); 298 get_device(&zdev->ap_dev->device);
299 zdev->request_count++; 299 zdev->request_count++;
300 __zcrypt_decrease_preference(zdev); 300 __zcrypt_decrease_preference(zdev);
301 spin_unlock_bh(&zcrypt_device_lock);
302 if (try_module_get(zdev->ap_dev->drv->driver.owner)) { 301 if (try_module_get(zdev->ap_dev->drv->driver.owner)) {
302 spin_unlock_bh(&zcrypt_device_lock);
303 rc = zdev->ops->rsa_modexpo(zdev, mex); 303 rc = zdev->ops->rsa_modexpo(zdev, mex);
304 spin_lock_bh(&zcrypt_device_lock);
304 module_put(zdev->ap_dev->drv->driver.owner); 305 module_put(zdev->ap_dev->drv->driver.owner);
305 } 306 }
306 else 307 else
307 rc = -EAGAIN; 308 rc = -EAGAIN;
308 spin_lock_bh(&zcrypt_device_lock);
309 zdev->request_count--; 309 zdev->request_count--;
310 __zcrypt_increase_preference(zdev); 310 __zcrypt_increase_preference(zdev);
311 put_device(&zdev->ap_dev->device); 311 put_device(&zdev->ap_dev->device);
@@ -373,14 +373,14 @@ static long zcrypt_rsa_crt(struct ica_rsa_modexpo_crt *crt)
373 get_device(&zdev->ap_dev->device); 373 get_device(&zdev->ap_dev->device);
374 zdev->request_count++; 374 zdev->request_count++;
375 __zcrypt_decrease_preference(zdev); 375 __zcrypt_decrease_preference(zdev);
376 spin_unlock_bh(&zcrypt_device_lock);
377 if (try_module_get(zdev->ap_dev->drv->driver.owner)) { 376 if (try_module_get(zdev->ap_dev->drv->driver.owner)) {
377 spin_unlock_bh(&zcrypt_device_lock);
378 rc = zdev->ops->rsa_modexpo_crt(zdev, crt); 378 rc = zdev->ops->rsa_modexpo_crt(zdev, crt);
379 spin_lock_bh(&zcrypt_device_lock);
379 module_put(zdev->ap_dev->drv->driver.owner); 380 module_put(zdev->ap_dev->drv->driver.owner);
380 } 381 }
381 else 382 else
382 rc = -EAGAIN; 383 rc = -EAGAIN;
383 spin_lock_bh(&zcrypt_device_lock);
384 zdev->request_count--; 384 zdev->request_count--;
385 __zcrypt_increase_preference(zdev); 385 __zcrypt_increase_preference(zdev);
386 put_device(&zdev->ap_dev->device); 386 put_device(&zdev->ap_dev->device);
@@ -408,14 +408,14 @@ static long zcrypt_send_cprb(struct ica_xcRB *xcRB)
408 get_device(&zdev->ap_dev->device); 408 get_device(&zdev->ap_dev->device);
409 zdev->request_count++; 409 zdev->request_count++;
410 __zcrypt_decrease_preference(zdev); 410 __zcrypt_decrease_preference(zdev);
411 spin_unlock_bh(&zcrypt_device_lock);
412 if (try_module_get(zdev->ap_dev->drv->driver.owner)) { 411 if (try_module_get(zdev->ap_dev->drv->driver.owner)) {
412 spin_unlock_bh(&zcrypt_device_lock);
413 rc = zdev->ops->send_cprb(zdev, xcRB); 413 rc = zdev->ops->send_cprb(zdev, xcRB);
414 spin_lock_bh(&zcrypt_device_lock);
414 module_put(zdev->ap_dev->drv->driver.owner); 415 module_put(zdev->ap_dev->drv->driver.owner);
415 } 416 }
416 else 417 else
417 rc = -EAGAIN; 418 rc = -EAGAIN;
418 spin_lock_bh(&zcrypt_device_lock);
419 zdev->request_count--; 419 zdev->request_count--;
420 __zcrypt_increase_preference(zdev); 420 __zcrypt_increase_preference(zdev);
421 put_device(&zdev->ap_dev->device); 421 put_device(&zdev->ap_dev->device);
diff --git a/include/asm-s390/ipl.h b/include/asm-s390/ipl.h
index 660f78271a93..0eb64083480a 100644
--- a/include/asm-s390/ipl.h
+++ b/include/asm-s390/ipl.h
@@ -14,9 +14,13 @@
14#define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ 14#define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
15 sizeof(struct ipl_block_fcp)) 15 sizeof(struct ipl_block_fcp))
16 16
17#define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 8)
18
17#define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ 19#define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
18 sizeof(struct ipl_block_ccw)) 20 sizeof(struct ipl_block_ccw))
19 21
22#define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 8)
23
20#define IPL_MAX_SUPPORTED_VERSION (0) 24#define IPL_MAX_SUPPORTED_VERSION (0)
21 25
22#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ 26#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
@@ -58,6 +62,7 @@ struct ipl_block_ccw {
58 u8 vm_flags; 62 u8 vm_flags;
59 u8 reserved3[3]; 63 u8 reserved3[3];
60 u32 vm_parm_len; 64 u32 vm_parm_len;
65 u8 reserved4[80];
61} __attribute__((packed)); 66} __attribute__((packed));
62 67
63struct ipl_parameter_block { 68struct ipl_parameter_block {
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index fb6fef97d739..5c6f00d62df8 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -250,8 +250,9 @@
250/* Number 310 is reserved for new sys_move_pages */ 250/* Number 310 is reserved for new sys_move_pages */
251#define __NR_getcpu 311 251#define __NR_getcpu 311
252#define __NR_epoll_pwait 312 252#define __NR_epoll_pwait 312
253#define __NR_utimes 313
253 254
254#define NR_syscalls 313 255#define NR_syscalls 314
255 256
256/* 257/*
257 * There are some system calls that are not present on 64 bit, some 258 * There are some system calls that are not present on 64 bit, some