[S390] irqstats: fix counting of pfault, dasd diag and virtio irqs

pfault, dasd diag and virtio all use the same external interrupt number.
The respective interrupt handlers decide by the subcode if they are
meant to handle the interrupt.
Counting is currently done before looking at the subcode which means
each handler counts an interrupt even if it is not handling it.
Fix this by moving the kstat code after the code which looks at the
subcode.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by Heiko Carstens and committed by Martin Schwidefsky a9851832 ed961581

+3 -3
+1 -1
arch/s390/mm/fault.c
··· 543 struct task_struct *tsk; 544 __u16 subcode; 545 546 - kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++; 547 /* 548 * Get the external interruption subcode & pfault 549 * initial/completion signal bit. VM stores this ··· 552 subcode = ext_int_code >> 16; 553 if ((subcode & 0xff00) != __SUBCODE_MASK) 554 return; 555 556 /* 557 * Get the token (= address of the task structure of the affected task).
··· 543 struct task_struct *tsk; 544 __u16 subcode; 545 546 /* 547 * Get the external interruption subcode & pfault 548 * initial/completion signal bit. VM stores this ··· 553 subcode = ext_int_code >> 16; 554 if ((subcode & 0xff00) != __SUBCODE_MASK) 555 return; 556 + kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++; 557 558 /* 559 * Get the token (= address of the task structure of the affected task).
+1 -1
drivers/s390/block/dasd_diag.c
··· 239 addr_t ip; 240 int rc; 241 242 - kstat_cpu(smp_processor_id()).irqs[EXTINT_DSD]++; 243 switch (ext_int_code >> 24) { 244 case DASD_DIAG_CODE_31BIT: 245 ip = (addr_t) param32; ··· 249 default: 250 return; 251 } 252 if (!ip) { /* no intparm: unsolicited interrupt */ 253 DBF_EVENT(DBF_NOTICE, "%s", "caught unsolicited " 254 "interrupt");
··· 239 addr_t ip; 240 int rc; 241 242 switch (ext_int_code >> 24) { 243 case DASD_DIAG_CODE_31BIT: 244 ip = (addr_t) param32; ··· 250 default: 251 return; 252 } 253 + kstat_cpu(smp_processor_id()).irqs[EXTINT_DSD]++; 254 if (!ip) { /* no intparm: unsolicited interrupt */ 255 DBF_EVENT(DBF_NOTICE, "%s", "caught unsolicited " 256 "interrupt");
+1 -1
drivers/s390/kvm/kvm_virtio.c
··· 381 u16 subcode; 382 u32 param; 383 384 - kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++; 385 subcode = ext_int_code >> 16; 386 if ((subcode & 0xff00) != VIRTIO_SUBCODE_64) 387 return; 388 389 /* The LSB might be overloaded, we have to mask it */ 390 vq = (struct virtqueue *)(param64 & ~1UL);
··· 381 u16 subcode; 382 u32 param; 383 384 subcode = ext_int_code >> 16; 385 if ((subcode & 0xff00) != VIRTIO_SUBCODE_64) 386 return; 387 + kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++; 388 389 /* The LSB might be overloaded, we have to mask it */ 390 vq = (struct virtqueue *)(param64 & ~1UL);