summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorAnup Patel2018-10-02 21:15:07 +0200
committerPalmer Dabbelt2018-10-23 02:03:37 +0200
commit8b20d2db0a6d2761e0fc156eb74f7a55b92b3147 (patch)
tree1a5a6b213805d6cec82f940351b7aed614fde409 /arch/riscv/include
parentRISC-V: Show CPU ID and Hart ID separately in /proc/cpuinfo (diff)
downloadkernel-qcow2-linux-8b20d2db0a6d2761e0fc156eb74f7a55b92b3147.tar.gz
kernel-qcow2-linux-8b20d2db0a6d2761e0fc156eb74f7a55b92b3147.tar.xz
kernel-qcow2-linux-8b20d2db0a6d2761e0fc156eb74f7a55b92b3147.zip
RISC-V: Show IPI stats
This patch provides arch_show_interrupts() implementation to show IPI stats via /proc/interrupts. Now the contents of /proc/interrupts" will look like below: CPU0 CPU1 CPU2 CPU3 8: 17 7 6 14 SiFive PLIC 8 virtio0 10: 10 10 9 11 SiFive PLIC 10 ttyS0 IPI0: 170 673 251 79 Rescheduling interrupts IPI1: 1 12 27 1 Function call interrupts Signed-off-by: Anup Patel <anup@brainfault.org> [Atish - Fixed checkpatch errors] Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Changes since v2: - Remove use of IPI_CALL_WAKEUP because it's being removed Changes since v1: - Add stub inline show_ipi_stats() function for !CONFIG_SMP - Make ipi_names[] dynamically sized at compile time - Minor beautification of ipi_names[] using tabs Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/smp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h
index 47fd61dfc897..41aa73b476f4 100644
--- a/arch/riscv/include/asm/smp.h
+++ b/arch/riscv/include/asm/smp.h
@@ -25,8 +25,13 @@
extern unsigned long __cpuid_to_hartid_map[NR_CPUS];
#define cpuid_to_hartid_map(cpu) __cpuid_to_hartid_map[cpu]
+struct seq_file;
+
#ifdef CONFIG_SMP
+/* print IPI stats */
+void show_ipi_stats(struct seq_file *p, int prec);
+
/* SMP initialization hook for setup_arch */
void __init setup_smp(void);
@@ -47,6 +52,10 @@ void riscv_cpuid_to_hartid_mask(const struct cpumask *in, struct cpumask *out);
#else
+static inline void show_ipi_stats(struct seq_file *p, int prec)
+{
+}
+
static inline int riscv_hartid_to_cpuid(int hartid)
{
return 0;