From patchwork Sun May 25 19:15:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 4239021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EDE299F333 for ; Sun, 25 May 2014 19:17:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3195A201DD for ; Sun, 25 May 2014 19:17:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7717A201D3 for ; Sun, 25 May 2014 19:17:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wodti-0004S8-G3; Sun, 25 May 2014 19:15:54 +0000 Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wodtf-0004OB-WD for linux-arm-kernel@lists.infradead.org; Sun, 25 May 2014 19:15:52 +0000 Received: by mail-oa0-f54.google.com with SMTP id j17so7502405oag.13 for ; Sun, 25 May 2014 12:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=gBbBasY2UUeaEXmanpUyQdmV09bEMcHaRJPgfJoHfos=; b=bEPL3VdqoxHKcEt6q+sOSr5wZfcH7xNYNxLRzGJMmIxPTlllI/ymCtOujTvdanc+b/ ntLp/TQ93L2ym1/D6izxQgQWlqM0V1ofr/ywehh5jOxrXFpyeEiiEeHPAqPm+Tuvdzkn x54hefGehYp8Hs+xGqii4FFWFs/dmJ2IjvYA5ZljUCLlIn+8w9JpJwZsjTvsRCC/84By LBQYuXAQo9MO6lv7PyNEkhnW/UH8HkuYvMKUHpmqBtOAeGADi79pGXuOAYxpqlAcqdlI AariB6oVhcQ6x7A4oaXTmZApUPriBOy/dTU8s/mwyzsUt/sJ7B9paqPlW12dLbiMYDSq LvGw== X-Received: by 10.182.29.166 with SMTP id l6mr20484779obh.2.1401045329673; Sun, 25 May 2014 12:15:29 -0700 (PDT) Received: from t430.minyard.home (pool-173-57-152-84.dllstx.fios.verizon.net. [173.57.152.84]) by mx.google.com with ESMTPSA id js4sm35125815oeb.3.2014.05.25.12.15.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 May 2014 12:15:28 -0700 (PDT) Received: from t430.minyard.home (t430.minyard.home [127.0.0.1]) by t430.minyard.home (8.14.7/8.14.7) with ESMTP id s4PJFQTG007239; Sun, 25 May 2014 14:15:26 -0500 Received: (from cminyard@localhost) by t430.minyard.home (8.14.7/8.14.7/Submit) id s4PJFPtl007237; Sun, 25 May 2014 14:15:25 -0500 From: minyard@acm.org To: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm: Set hardirq tracing to on when idling Date: Sun, 25 May 2014 14:15:23 -0500 Message-Id: <1401045323-7116-1-git-send-email-minyard@acm.org> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140525_121552_110199_16EBC286 X-CRM114-Status: GOOD ( 11.30 ) X-Spam-Score: 0.0 (/) Cc: Corey Minyard X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Corey Minyard The CPU will go to idle with interrupts off, but the interrupts will wake up the idle. This was causing very long irqsoff trace values because, basically, the whole idle time was traces with irqs off, even though they weren't really off. Rework the idle code to turn hardirq tracing to on befor calling idle. Signed-off-by: Corey Minyard --- arch/arm/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I'm not sure this is correct for all ARM boards, but it fixes the issue for the Vexpress board I have. No more 4 second irqsoff times. diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 1ca6cf1..92413af 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -133,11 +133,12 @@ void (*arm_pm_idle)(void); static void default_idle(void) { + trace_hardirqs_on(); if (arm_pm_idle) arm_pm_idle(); else cpu_do_idle(); - local_irq_enable(); + raw_local_irq_enable(); } void arch_cpu_idle_prepare(void)