aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-20 11:28:44 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-14 08:32:06 -0400
commit1ec2772e0c3ca3159035c03165355e355efc326b (patch)
tree469be3ba9032d367e4a796d6a31b25ccaab0d06a /arch/s390/mm
parentacdc9fc9a8121ce2ebcd7533bd72852c20b353f3 (diff)
s390/diag: add a statistic for diagnose calls
Introduce /sys/debug/kernel/diag_stat with a statistic how many diagnose calls have been done by each CPU in the system. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/extmem.c3
-rw-r--r--arch/s390/mm/fault.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index 23c496957c22..18fccc303db7 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -18,6 +18,7 @@
18#include <linux/bootmem.h> 18#include <linux/bootmem.h>
19#include <linux/ctype.h> 19#include <linux/ctype.h>
20#include <linux/ioport.h> 20#include <linux/ioport.h>
21#include <asm/diag.h>
21#include <asm/page.h> 22#include <asm/page.h>
22#include <asm/pgtable.h> 23#include <asm/pgtable.h>
23#include <asm/ebcdic.h> 24#include <asm/ebcdic.h>
@@ -112,6 +113,7 @@ dcss_set_subcodes(void)
112 ry = DCSS_FINDSEGX; 113 ry = DCSS_FINDSEGX;
113 114
114 strcpy(name, "dummy"); 115 strcpy(name, "dummy");
116 diag_stat_inc(DIAG_STAT_X064);
115 asm volatile( 117 asm volatile(
116 " diag %0,%1,0x64\n" 118 " diag %0,%1,0x64\n"
117 "0: ipm %2\n" 119 "0: ipm %2\n"
@@ -205,6 +207,7 @@ dcss_diag(int *func, void *parameter,
205 ry = (unsigned long) *func; 207 ry = (unsigned long) *func;
206 208
207 /* 64-bit Diag x'64' new subcode, keep in 64-bit addressing mode */ 209 /* 64-bit Diag x'64' new subcode, keep in 64-bit addressing mode */
210 diag_stat_inc(DIAG_STAT_X064);
208 if (*func > DCSS_SEGEXT) 211 if (*func > DCSS_SEGEXT)
209 asm volatile( 212 asm volatile(
210 " diag %0,%1,0x64\n" 213 " diag %0,%1,0x64\n"
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index f985856a538b..77b3938d6bfa 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -30,6 +30,7 @@
30#include <linux/uaccess.h> 30#include <linux/uaccess.h>
31#include <linux/hugetlb.h> 31#include <linux/hugetlb.h>
32#include <asm/asm-offsets.h> 32#include <asm/asm-offsets.h>
33#include <asm/diag.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34#include <asm/irq.h> 35#include <asm/irq.h>
35#include <asm/mmu_context.h> 36#include <asm/mmu_context.h>
@@ -597,6 +598,7 @@ int pfault_init(void)
597 598
598 if (pfault_disable) 599 if (pfault_disable)
599 return -1; 600 return -1;
601 diag_stat_inc(DIAG_STAT_X258);
600 asm volatile( 602 asm volatile(
601 " diag %1,%0,0x258\n" 603 " diag %1,%0,0x258\n"
602 "0: j 2f\n" 604 "0: j 2f\n"
@@ -618,6 +620,7 @@ void pfault_fini(void)
618 620
619 if (pfault_disable) 621 if (pfault_disable)
620 return; 622 return;
623 diag_stat_inc(DIAG_STAT_X258);
621 asm volatile( 624 asm volatile(
622 " diag %0,0,0x258\n" 625 " diag %0,0,0x258\n"
623 "0:\n" 626 "0:\n"