From patchwork Mon Mar 4 22:43:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 2215161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id BE4033FCF2 for ; Mon, 4 Mar 2013 22:46:21 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCe6N-0000m1-0x; Mon, 04 Mar 2013 22:43:23 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCe6A-0000kW-05 for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2013 22:43:10 +0000 X-IronPort-AV: E=Sophos;i="4.84,783,1355126400"; d="scan'208";a="27654215" Received: from pdmz-ns-snip_114_130.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.114.130]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Mar 2013 14:43:05 -0800 Received: from sboyd-linux.qualcomm.com (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id A91CF10004B6; Mon, 4 Mar 2013 14:43:05 -0800 (PST) From: Stephen Boyd To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: Enable tracing around vfp preemption enable/disable Date: Mon, 4 Mar 2013 14:43:03 -0800 Message-Id: <1362436983-28988-3-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 1.7.9.7.1.ge545 In-Reply-To: <1362436983-28988-1-git-send-email-sboyd@codeaurora.org> References: <1362436983-28988-1-git-send-email-sboyd@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130304_174310_207516_F2B36AD7 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.251 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org 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 The VFP code enables and disables preemption but doesn't call into the tracer except for in the VFP bounce code to say that preemption has been enabled again. Trace the preemption disable and enable calls made in assembly so that we can accurately measure how long preemption is disabled while handling VFP exceptions. Signed-off-by: Stephen Boyd --- arch/arm/kernel/entry-header.S | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 130e6a6..75bcb18 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -165,19 +165,33 @@ .macro preempt_enable_no_resched, tsk, cnt #ifdef CONFIG_PREEMPT_COUNT +#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER) + stmdb sp!, {r0-r3, ip, lr} + mov r0, #1 + bl sub_preempt_count + ldmia sp!, {r0-r3, ip, lr} +#else get_thread_info \tsk ldr \cnt, [\tsk, #TI_PREEMPT] @ get preempt count sub \cnt, \cnt, #1 @ decrement it str \cnt, [\tsk, #TI_PREEMPT] #endif +#endif .endm .macro preempt_disable, tsk, cnt #ifdef CONFIG_PREEMPT_COUNT +#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER) + stmdb sp!, {r0-r3, ip, lr} + mov r0, #1 + bl add_preempt_count + ldmia sp!, {r0-r3, ip, lr} +#else ldr \cnt, [\tsk, #TI_PREEMPT] @ get preempt count add \cnt, \cnt, #1 @ increment it str \cnt, [\tsk, #TI_PREEMPT] #endif +#endif .endm /*