aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2010-10-25 10:10:38 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-10-25 10:10:19 -0400
commitf6649a7e5a9ee99e9623878f4a5579cc2f6cdd51 (patch)
tree183438313c7593565980a1445f208e0ba30162cd /drivers/s390
parent1e54622e0403891b10f2105663e0f9dd595a1f17 (diff)
[S390] cleanup lowcore access from external interrupts
Read external interrupts parameters from the lowcore in the first level interrupt handler in entry[64].S. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_diag.c19
-rw-r--r--drivers/s390/block/dasd_diag.h4
-rw-r--r--drivers/s390/char/sclp.c14
-rw-r--r--drivers/s390/kvm/kvm_virtio.c9
4 files changed, 20 insertions, 26 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index 2b3bc3ec0541..266b34b55403 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -228,25 +228,22 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr)
228} 228}
229 229
230/* Handle external interruption. */ 230/* Handle external interruption. */
231static void 231static void dasd_ext_handler(unsigned int ext_int_code,
232dasd_ext_handler(__u16 code) 232 unsigned int param32, unsigned long param64)
233{ 233{
234 struct dasd_ccw_req *cqr, *next; 234 struct dasd_ccw_req *cqr, *next;
235 struct dasd_device *device; 235 struct dasd_device *device;
236 unsigned long long expires; 236 unsigned long long expires;
237 unsigned long flags; 237 unsigned long flags;
238 u8 int_code, status;
239 addr_t ip; 238 addr_t ip;
240 int rc; 239 int rc;
241 240
242 int_code = *((u8 *) DASD_DIAG_LC_INT_CODE); 241 switch (ext_int_code >> 24) {
243 status = *((u8 *) DASD_DIAG_LC_INT_STATUS);
244 switch (int_code) {
245 case DASD_DIAG_CODE_31BIT: 242 case DASD_DIAG_CODE_31BIT:
246 ip = (addr_t) *((u32 *) DASD_DIAG_LC_INT_PARM_31BIT); 243 ip = (addr_t) param32;
247 break; 244 break;
248 case DASD_DIAG_CODE_64BIT: 245 case DASD_DIAG_CODE_64BIT:
249 ip = (addr_t) *((u64 *) DASD_DIAG_LC_INT_PARM_64BIT); 246 ip = (addr_t) param64;
250 break; 247 break;
251 default: 248 default:
252 return; 249 return;
@@ -281,7 +278,7 @@ dasd_ext_handler(__u16 code)
281 cqr->stopclk = get_clock(); 278 cqr->stopclk = get_clock();
282 279
283 expires = 0; 280 expires = 0;
284 if (status == 0) { 281 if ((ext_int_code & 0xff0000) == 0) {
285 cqr->status = DASD_CQR_SUCCESS; 282 cqr->status = DASD_CQR_SUCCESS;
286 /* Start first request on queue if possible -> fast_io. */ 283 /* Start first request on queue if possible -> fast_io. */
287 if (!list_empty(&device->ccw_queue)) { 284 if (!list_empty(&device->ccw_queue)) {
@@ -296,8 +293,8 @@ dasd_ext_handler(__u16 code)
296 } else { 293 } else {
297 cqr->status = DASD_CQR_QUEUED; 294 cqr->status = DASD_CQR_QUEUED;
298 DBF_DEV_EVENT(DBF_DEBUG, device, "interrupt status for " 295 DBF_DEV_EVENT(DBF_DEBUG, device, "interrupt status for "
299 "request %p was %d (%d retries left)", cqr, status, 296 "request %p was %d (%d retries left)", cqr,
300 cqr->retries); 297 (ext_int_code >> 16) & 0xff, cqr->retries);
301 dasd_diag_erp(device); 298 dasd_diag_erp(device);
302 } 299 }
303 300
diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h
index b8c78267ff3e..4f71fbe60c82 100644
--- a/drivers/s390/block/dasd_diag.h
+++ b/drivers/s390/block/dasd_diag.h
@@ -18,10 +18,6 @@
18#define DEV_CLASS_FBA 0x01 18#define DEV_CLASS_FBA 0x01
19#define DEV_CLASS_ECKD 0x04 19#define DEV_CLASS_ECKD 0x04
20 20
21#define DASD_DIAG_LC_INT_CODE 132
22#define DASD_DIAG_LC_INT_STATUS 133
23#define DASD_DIAG_LC_INT_PARM_31BIT 128
24#define DASD_DIAG_LC_INT_PARM_64BIT 4536
25#define DASD_DIAG_CODE_31BIT 0x03 21#define DASD_DIAG_CODE_31BIT 0x03
26#define DASD_DIAG_CODE_64BIT 0x07 22#define DASD_DIAG_CODE_64BIT 0x07
27 23
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index 5707a80b96b6..35cc4686b99b 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -395,16 +395,16 @@ __sclp_find_req(u32 sccb)
395/* Handler for external interruption. Perform request post-processing. 395/* Handler for external interruption. Perform request post-processing.
396 * Prepare read event data request if necessary. Start processing of next 396 * Prepare read event data request if necessary. Start processing of next
397 * request on queue. */ 397 * request on queue. */
398static void 398static void sclp_interrupt_handler(unsigned int ext_int_code,
399sclp_interrupt_handler(__u16 code) 399 unsigned int param32, unsigned long param64)
400{ 400{
401 struct sclp_req *req; 401 struct sclp_req *req;
402 u32 finished_sccb; 402 u32 finished_sccb;
403 u32 evbuf_pending; 403 u32 evbuf_pending;
404 404
405 spin_lock(&sclp_lock); 405 spin_lock(&sclp_lock);
406 finished_sccb = S390_lowcore.ext_params & 0xfffffff8; 406 finished_sccb = param32 & 0xfffffff8;
407 evbuf_pending = S390_lowcore.ext_params & 0x3; 407 evbuf_pending = param32 & 0x3;
408 if (finished_sccb) { 408 if (finished_sccb) {
409 del_timer(&sclp_request_timer); 409 del_timer(&sclp_request_timer);
410 sclp_running_state = sclp_running_state_reset_pending; 410 sclp_running_state = sclp_running_state_reset_pending;
@@ -819,12 +819,12 @@ EXPORT_SYMBOL(sclp_reactivate);
819 819
820/* Handler for external interruption used during initialization. Modify 820/* Handler for external interruption used during initialization. Modify
821 * request state to done. */ 821 * request state to done. */
822static void 822static void sclp_check_handler(unsigned int ext_int_code,
823sclp_check_handler(__u16 code) 823 unsigned int param32, unsigned long param64)
824{ 824{
825 u32 finished_sccb; 825 u32 finished_sccb;
826 826
827 finished_sccb = S390_lowcore.ext_params & 0xfffffff8; 827 finished_sccb = param32 & 0xfffffff8;
828 /* Is this the interrupt we are waiting for? */ 828 /* Is this the interrupt we are waiting for? */
829 if (finished_sccb == 0) 829 if (finished_sccb == 0)
830 return; 830 return;
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index 5a46b8c5d68a..375aeeaf9ea5 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -372,21 +372,22 @@ static void hotplug_devices(struct work_struct *dummy)
372/* 372/*
373 * we emulate the request_irq behaviour on top of s390 extints 373 * we emulate the request_irq behaviour on top of s390 extints
374 */ 374 */
375static void kvm_extint_handler(u16 code) 375static void kvm_extint_handler(unsigned int ext_int_code,
376 unsigned int param32, unsigned long param64)
376{ 377{
377 struct virtqueue *vq; 378 struct virtqueue *vq;
378 u16 subcode; 379 u16 subcode;
379 u32 param; 380 u32 param;
380 381
381 subcode = S390_lowcore.cpu_addr; 382 subcode = ext_int_code >> 16;
382 if ((subcode & 0xff00) != VIRTIO_SUBCODE_64) 383 if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
383 return; 384 return;
384 385
385 /* The LSB might be overloaded, we have to mask it */ 386 /* The LSB might be overloaded, we have to mask it */
386 vq = (struct virtqueue *)(S390_lowcore.ext_params2 & ~1UL); 387 vq = (struct virtqueue *)(param64 & ~1UL);
387 388
388 /* We use ext_params to decide what this interrupt means */ 389 /* We use ext_params to decide what this interrupt means */
389 param = S390_lowcore.ext_params & VIRTIO_PARAM_MASK; 390 param = param32 & VIRTIO_PARAM_MASK;
390 391
391 switch (param) { 392 switch (param) {
392 case VIRTIO_PARAM_CONFIG_CHANGED: 393 case VIRTIO_PARAM_CONFIG_CHANGED: