From 6cf7291ff1c72f47a8b2d628d7cf47a7d2813564 Mon Sep 17 00:00:00 2001
From: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Date: Sat, 23 Aug 2014 15:22:51 +0800
Subject: [PATCH 11/23] x86_64: modify irq -s only to display online cpus' data

irq -s will display kernel irq stats. This patch will skip offline cpus

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
---
 kernel.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel.c b/kernel.c
index ff1f2e1..329c786 100755
--- a/kernel.c
+++ b/kernel.c
@@ -5612,6 +5612,9 @@ cmd_irq(void)
 		fprintf(fp, "     ");
 		BZERO(buf, 10);
 		for (i = 0; i < kt->cpus; i++) {
+			if (check_offline_cpu(i))
+				continue;
+
 			if (NUM_IN_BITMAP(cpus, i)) {
 				sprintf(buf, "CPU%d", i);
 				fprintf(fp, "%10s ", buf);
@@ -6409,6 +6412,9 @@ generic_show_interrupts(int irq, ulong *cpus)
 	fprintf(fp, "%3d: ", irq);
 
 	for (i = 0; i < kt->cpus; i++) {
+		if (check_offline_cpu(i))
+			continue;
+
 		if (NUM_IN_BITMAP(cpus, i))
 			fprintf(fp, "%10u ", kstat_irqs[i]);
 	}
-- 
1.8.5.3

