diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-08-20 11:28:44 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-10-14 08:32:06 -0400 |
commit | 1ec2772e0c3ca3159035c03165355e355efc326b (patch) | |
tree | 469be3ba9032d367e4a796d6a31b25ccaab0d06a /arch/s390/kernel/processor.c | |
parent | acdc9fc9a8121ce2ebcd7533bd72852c20b353f3 (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/kernel/processor.c')
-rw-r--r-- | arch/s390/kernel/processor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index e6e077ae3990..7ce00e7a709a 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/seq_file.h> | 11 | #include <linux/seq_file.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
14 | #include <asm/diag.h> | ||
14 | #include <asm/elf.h> | 15 | #include <asm/elf.h> |
15 | #include <asm/lowcore.h> | 16 | #include <asm/lowcore.h> |
16 | #include <asm/param.h> | 17 | #include <asm/param.h> |
@@ -20,8 +21,10 @@ static DEFINE_PER_CPU(struct cpuid, cpu_id); | |||
20 | 21 | ||
21 | void notrace cpu_relax(void) | 22 | void notrace cpu_relax(void) |
22 | { | 23 | { |
23 | if (!smp_cpu_mtid && MACHINE_HAS_DIAG44) | 24 | if (!smp_cpu_mtid && MACHINE_HAS_DIAG44) { |
25 | diag_stat_inc(DIAG_STAT_X044); | ||
24 | asm volatile("diag 0,0,0x44"); | 26 | asm volatile("diag 0,0,0x44"); |
27 | } | ||
25 | barrier(); | 28 | barrier(); |
26 | } | 29 | } |
27 | EXPORT_SYMBOL(cpu_relax); | 30 | EXPORT_SYMBOL(cpu_relax); |