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