aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-03-11 11:59:31 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-03-11 11:59:29 -0400
commitfde15c3a3adc7b65cd0610dd6bca4804ee7ffd38 (patch)
tree62c1f93d33a7449fb07250993e4cf4086d5aa273 /drivers/s390
parent2215011dd9c1b01f1fc430620ed31f2baad267c3 (diff)
[S390] irq: external interrupt code passing
The external interrupt handlers have a parameter called ext_int_code. Besides the name this paramter does not only contain the ext_int_code but in addition also the "cpu address" (POP) which caused the external interrupt. To make the code a bit more obvious pass a struct instead so the called function can easily distinguish between external interrupt code and cpu address. The cpu address field however is named "subcode" since some external interrupt sources do not pass a cpu address but a different parameter (or none at all). Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_diag.c8
-rw-r--r--drivers/s390/char/sclp.c4
-rw-r--r--drivers/s390/kvm/kvm_virtio.c6
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index 46784b83c5c4..0cea7e98f464 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -229,7 +229,7 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr)
229} 229}
230 230
231/* Handle external interruption. */ 231/* Handle external interruption. */
232static void dasd_ext_handler(unsigned int ext_int_code, 232static void dasd_ext_handler(struct ext_code ext_code,
233 unsigned int param32, unsigned long param64) 233 unsigned int param32, unsigned long param64)
234{ 234{
235 struct dasd_ccw_req *cqr, *next; 235 struct dasd_ccw_req *cqr, *next;
@@ -239,7 +239,7 @@ static void dasd_ext_handler(unsigned int ext_int_code,
239 addr_t ip; 239 addr_t ip;
240 int rc; 240 int rc;
241 241
242 switch (ext_int_code >> 24) { 242 switch (ext_code.subcode >> 8) {
243 case DASD_DIAG_CODE_31BIT: 243 case DASD_DIAG_CODE_31BIT:
244 ip = (addr_t) param32; 244 ip = (addr_t) param32;
245 break; 245 break;
@@ -280,7 +280,7 @@ static void dasd_ext_handler(unsigned int ext_int_code,
280 cqr->stopclk = get_clock(); 280 cqr->stopclk = get_clock();
281 281
282 expires = 0; 282 expires = 0;
283 if ((ext_int_code & 0xff0000) == 0) { 283 if ((ext_code.subcode & 0xff) == 0) {
284 cqr->status = DASD_CQR_SUCCESS; 284 cqr->status = DASD_CQR_SUCCESS;
285 /* Start first request on queue if possible -> fast_io. */ 285 /* Start first request on queue if possible -> fast_io. */
286 if (!list_empty(&device->ccw_queue)) { 286 if (!list_empty(&device->ccw_queue)) {
@@ -296,7 +296,7 @@ static void dasd_ext_handler(unsigned int ext_int_code,
296 cqr->status = DASD_CQR_QUEUED; 296 cqr->status = DASD_CQR_QUEUED;
297 DBF_DEV_EVENT(DBF_DEBUG, device, "interrupt status for " 297 DBF_DEV_EVENT(DBF_DEBUG, device, "interrupt status for "
298 "request %p was %d (%d retries left)", cqr, 298 "request %p was %d (%d retries left)", cqr,
299 (ext_int_code >> 16) & 0xff, cqr->retries); 299 ext_code.subcode & 0xff, cqr->retries);
300 dasd_diag_erp(device); 300 dasd_diag_erp(device);
301 } 301 }
302 302
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index eaa7e78186f9..30f29a0020a1 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -393,7 +393,7 @@ __sclp_find_req(u32 sccb)
393/* Handler for external interruption. Perform request post-processing. 393/* Handler for external interruption. Perform request post-processing.
394 * Prepare read event data request if necessary. Start processing of next 394 * Prepare read event data request if necessary. Start processing of next
395 * request on queue. */ 395 * request on queue. */
396static void sclp_interrupt_handler(unsigned int ext_int_code, 396static void sclp_interrupt_handler(struct ext_code ext_code,
397 unsigned int param32, unsigned long param64) 397 unsigned int param32, unsigned long param64)
398{ 398{
399 struct sclp_req *req; 399 struct sclp_req *req;
@@ -818,7 +818,7 @@ EXPORT_SYMBOL(sclp_reactivate);
818 818
819/* Handler for external interruption used during initialization. Modify 819/* Handler for external interruption used during initialization. Modify
820 * request state to done. */ 820 * request state to done. */
821static void sclp_check_handler(unsigned int ext_int_code, 821static void sclp_check_handler(struct ext_code ext_code,
822 unsigned int param32, unsigned long param64) 822 unsigned int param32, unsigned long param64)
823{ 823{
824 u32 finished_sccb; 824 u32 finished_sccb;
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index 7bc1955337ea..d74e9ae6dfb3 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -380,15 +380,13 @@ static void hotplug_devices(struct work_struct *dummy)
380/* 380/*
381 * we emulate the request_irq behaviour on top of s390 extints 381 * we emulate the request_irq behaviour on top of s390 extints
382 */ 382 */
383static void kvm_extint_handler(unsigned int ext_int_code, 383static void kvm_extint_handler(struct ext_code ext_code,
384 unsigned int param32, unsigned long param64) 384 unsigned int param32, unsigned long param64)
385{ 385{
386 struct virtqueue *vq; 386 struct virtqueue *vq;
387 u16 subcode;
388 u32 param; 387 u32 param;
389 388
390 subcode = ext_int_code >> 16; 389 if ((ext_code.subcode & 0xff00) != VIRTIO_SUBCODE_64)
391 if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
392 return; 390 return;
393 kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++; 391 kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++;
394 392