From patchwork Wed Jan 21 17:03:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 43472 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D4A2D240F1 for ; Wed, 21 Jan 2015 17:03:53 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf2141114wgg.0 for ; Wed, 21 Jan 2015 09:03:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Ajuc2Vh4gQrfMTDP0TVJiOjS8mYw/r16f3b2dkDkv60=; b=W/hVX6A3eE4RPL/Wj961QIoJPhYH/qmefq/fCUTud119fAb4hvam5Ah3BFGjkNlNdX QJQ4MTB9LZzQi/cTWDc2ocu9UU4009AVnuOdLOnhGau3VCsT6pH/9L5NhztYXItDRMZX 62BvMyVy5ECPQKAiYPGL2V+NiiaLQNyXNJ+ZYBcF8qPkJADn4JGDKOj405OVw/1I4SHZ FSQqNb8JQtG2YU8r3Xqf+qefoFX6l1RHAzDjBgZPi7DajEAiCsY8Ffnk52CmxK6zCr+g 1ph9hEGDGCw7dy3Le17VxJO72bFma4YgTcYx39vVv2VC8JUnGKdwExh/+ZY+wgQu+38u RO3Q== X-Gm-Message-State: ALoCoQnTuZ1FP76z9/tzkDLWHCgxwOmQ+jL6KNGKxHwBI0P1svNCuQ8ieElT0L8taVBGKpC+rjpn X-Received: by 10.180.105.129 with SMTP id gm1mr199439wib.3.1421859833173; Wed, 21 Jan 2015 09:03:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.112 with SMTP id jv16ls66770lab.101.gmail; Wed, 21 Jan 2015 09:03:53 -0800 (PST) X-Received: by 10.152.19.129 with SMTP id f1mr10979590lae.40.1421859833020; Wed, 21 Jan 2015 09:03:53 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id o5si19811925lae.100.2015.01.21.09.03.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 09:03:52 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so8086036lab.6 for ; Wed, 21 Jan 2015 09:03:52 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr16264077laa.80.1421859832758; Wed, 21 Jan 2015 09:03:52 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1844602lbb; Wed, 21 Jan 2015 09:03:52 -0800 (PST) X-Received: by 10.112.188.201 with SMTP id gc9mr39979032lbc.6.1421859832280; Wed, 21 Jan 2015 09:03:52 -0800 (PST) Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com. [74.125.82.41]) by mx.google.com with ESMTPS id jz7si822339wjc.61.2015.01.21.09.03.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 09:03:52 -0800 (PST) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.41 as permitted sender) client-ip=74.125.82.41; Received: by mail-wg0-f41.google.com with SMTP id a1so18903994wgh.0 for ; Wed, 21 Jan 2015 09:03:52 -0800 (PST) X-Received: by 10.180.95.9 with SMTP id dg9mr28996548wib.1.1421859831936; Wed, 21 Jan 2015 09:03:51 -0800 (PST) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id w16sm8021260wia.15.2015.01.21.09.03.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jan 2015 09:03:51 -0800 (PST) From: Daniel Thompson To: Thomas Gleixner , Jason Cooper , Russell King Cc: Daniel Thompson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org, linaro-kernel@lists.linaro.org, John Stultz , Sumit Semwal , Dirk Behme , Daniel Drake , Dmitry Pervushin , Tim Sander , Stephen Boyd , Will Deacon Subject: [RFC PATCH v2 1/5] arm: irq: Add a __nmi_count stat Date: Wed, 21 Jan 2015 17:03:38 +0000 Message-Id: <1421859822-3621-2-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1421859822-3621-1-git-send-email-daniel.thompson@linaro.org> References: <1421166931-14134-1-git-send-email-daniel.thompson@linaro.org> <1421859822-3621-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Extends the irq statistics for ARM, making it possible to quickly observe how many times the default FIQ handler has executed. In /proc/interrupts we use the NMI terminology (rather than FIQ) because the statistic is only likely to be updated when we run the default FIQ handler (handle_fiq_as_nmi). Signed-off-by: Daniel Thompson --- arch/arm/include/asm/hardirq.h | 1 + arch/arm/kernel/irq.c | 7 ++++++- arch/arm/kernel/traps.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 5df33e30ae1b..27ab43b5d7e2 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -9,6 +9,7 @@ typedef struct { unsigned int __softirq_pending; + unsigned int __nmi_count; #ifdef CONFIG_SMP unsigned int ipi_irqs[NR_IPI]; #endif diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index ad857bada96c..6dd1619e0700 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -48,13 +48,18 @@ unsigned long irq_err_count; int arch_show_interrupts(struct seq_file *p, int prec) { + int i; + #ifdef CONFIG_FIQ show_fiq_list(p, prec); #endif #ifdef CONFIG_SMP show_ipi_list(p, prec); #endif - seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); + seq_printf(p, "%*s: ", prec, "NMI"); + for_each_online_cpu(i) + seq_printf(p, "%10u ", __get_irq_stat(i, __nmi_count)); + seq_printf(p, "\n%*s: %10lu\n", prec, "Err", irq_err_count); return 0; } diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 1836415b8a5c..5645f81ac4cc 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -476,8 +476,10 @@ die_sig: */ asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs) { + unsigned int cpu = smp_processor_id(); struct pt_regs *old_regs = set_irq_regs(regs); + __inc_irq_stat(cpu, __nmi_count); nmi_enter(); #ifdef CONFIG_ARM_GIC