diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 15:02:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 15:02:28 -0400 |
commit | d586c86d50cefa0897a51a2dbc714060ccedae76 (patch) | |
tree | 76a7f454637badb74390047aebca5c071c0988fe /drivers/s390/char/sclp_cmd.c | |
parent | e9f37d3a8d126e73f5737ef548cdf6f618e295e4 (diff) | |
parent | 457f2180951cdcbfb4657ddcc83b486e93497f56 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull second set of s390 patches from Martin Schwidefsky:
"The second part of Heikos uaccess rework, the page table walker for
uaccess is now a thing of the past (yay!)
The code change to fix the theoretical TLB flush problem allows us to
add a TLB flush optimization for zEC12, this machine has new
instructions that allow to do CPU local TLB flushes for single pages
and for all pages of a specific address space.
Plus the usual bug fixing and some more cleanup"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/uaccess: rework uaccess code - fix locking issues
s390/mm,tlb: optimize TLB flushing for zEC12
s390/mm,tlb: safeguard against speculative TLB creation
s390/irq: Use defines for external interruption codes
s390/irq: Add defines for external interruption codes
s390/sclp: add timeout for queued requests
kvm/s390: also set guest pages back to stable on kexec/kdump
lcs: Add missing destroy_timer_on_stack()
s390/tape: Add missing destroy_timer_on_stack()
s390/tape: Use del_timer_sync()
s390/3270: fix crash with multiple reset device requests
s390/bitops,atomic: add missing memory barriers
s390/zcrypt: add length check for aligned data to avoid overflow in msg-type 6
Diffstat (limited to 'drivers/s390/char/sclp_cmd.c')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 49af8eeb90ea..6e8f90f84e49 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -37,6 +37,11 @@ static void sclp_sync_callback(struct sclp_req *req, void *data) | |||
37 | 37 | ||
38 | int sclp_sync_request(sclp_cmdw_t cmd, void *sccb) | 38 | int sclp_sync_request(sclp_cmdw_t cmd, void *sccb) |
39 | { | 39 | { |
40 | return sclp_sync_request_timeout(cmd, sccb, 0); | ||
41 | } | ||
42 | |||
43 | int sclp_sync_request_timeout(sclp_cmdw_t cmd, void *sccb, int timeout) | ||
44 | { | ||
40 | struct completion completion; | 45 | struct completion completion; |
41 | struct sclp_req *request; | 46 | struct sclp_req *request; |
42 | int rc; | 47 | int rc; |
@@ -44,6 +49,8 @@ int sclp_sync_request(sclp_cmdw_t cmd, void *sccb) | |||
44 | request = kzalloc(sizeof(*request), GFP_KERNEL); | 49 | request = kzalloc(sizeof(*request), GFP_KERNEL); |
45 | if (!request) | 50 | if (!request) |
46 | return -ENOMEM; | 51 | return -ENOMEM; |
52 | if (timeout) | ||
53 | request->queue_timeout = timeout; | ||
47 | request->command = cmd; | 54 | request->command = cmd; |
48 | request->sccb = sccb; | 55 | request->sccb = sccb; |
49 | request->status = SCLP_REQ_FILLED; | 56 | request->status = SCLP_REQ_FILLED; |
@@ -110,7 +117,8 @@ int sclp_get_cpu_info(struct sclp_cpu_info *info) | |||
110 | if (!sccb) | 117 | if (!sccb) |
111 | return -ENOMEM; | 118 | return -ENOMEM; |
112 | sccb->header.length = sizeof(*sccb); | 119 | sccb->header.length = sizeof(*sccb); |
113 | rc = sclp_sync_request(SCLP_CMDW_READ_CPU_INFO, sccb); | 120 | rc = sclp_sync_request_timeout(SCLP_CMDW_READ_CPU_INFO, sccb, |
121 | SCLP_QUEUE_INTERVAL); | ||
114 | if (rc) | 122 | if (rc) |
115 | goto out; | 123 | goto out; |
116 | if (sccb->header.response_code != 0x0010) { | 124 | if (sccb->header.response_code != 0x0010) { |
@@ -144,7 +152,7 @@ static int do_cpu_configure(sclp_cmdw_t cmd) | |||
144 | if (!sccb) | 152 | if (!sccb) |
145 | return -ENOMEM; | 153 | return -ENOMEM; |
146 | sccb->header.length = sizeof(*sccb); | 154 | sccb->header.length = sizeof(*sccb); |
147 | rc = sclp_sync_request(cmd, sccb); | 155 | rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); |
148 | if (rc) | 156 | if (rc) |
149 | goto out; | 157 | goto out; |
150 | switch (sccb->header.response_code) { | 158 | switch (sccb->header.response_code) { |
@@ -214,7 +222,7 @@ static int do_assign_storage(sclp_cmdw_t cmd, u16 rn) | |||
214 | return -ENOMEM; | 222 | return -ENOMEM; |
215 | sccb->header.length = PAGE_SIZE; | 223 | sccb->header.length = PAGE_SIZE; |
216 | sccb->rn = rn; | 224 | sccb->rn = rn; |
217 | rc = sclp_sync_request(cmd, sccb); | 225 | rc = sclp_sync_request_timeout(cmd, sccb, SCLP_QUEUE_INTERVAL); |
218 | if (rc) | 226 | if (rc) |
219 | goto out; | 227 | goto out; |
220 | switch (sccb->header.response_code) { | 228 | switch (sccb->header.response_code) { |
@@ -269,7 +277,8 @@ static int sclp_attach_storage(u8 id) | |||
269 | if (!sccb) | 277 | if (!sccb) |
270 | return -ENOMEM; | 278 | return -ENOMEM; |
271 | sccb->header.length = PAGE_SIZE; | 279 | sccb->header.length = PAGE_SIZE; |
272 | rc = sclp_sync_request(0x00080001 | id << 8, sccb); | 280 | rc = sclp_sync_request_timeout(0x00080001 | id << 8, sccb, |
281 | SCLP_QUEUE_INTERVAL); | ||
273 | if (rc) | 282 | if (rc) |
274 | goto out; | 283 | goto out; |
275 | switch (sccb->header.response_code) { | 284 | switch (sccb->header.response_code) { |