From patchwork Thu Mar 13 18:15:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 26215 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3AF6A206A0 for ; Thu, 13 Mar 2014 18:20:55 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id n16sf5174400oag.9 for ; Thu, 13 Mar 2014 11:20:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=owyK6YfWc52c0JApW7Lp0n6TUxsc9KViODXKRxkkRX8=; b=WuqG1WXlnOw+t0Fxwm/6waaAIu0QcryO+3dyUfYwRhOzqJVH57t/yYzXL67xWUE9dr gcG2E8uMymfSppS6/p7wSdinCWPTW6n55Yst/Dma7NwZ1HTDXsZwnsCXF5Q6G0KjO6nt f/6Ve7YWBQVqWCnSykSul7Duu85YSHfEdhEwUGtuojtr+XkvyqeBe3lTros5fyryCgZI V6u2tW5s49x8AXwCHZR/HOPuXjlYos3jwrRzMYVEvH+kL3EdCutkhYXAtwJkGkXomYXR OSoQWxpIHtdHdGL9eeG7AYvfl7/SCarOpYbzB0dfCxwWSetXsz4CcpSmKn5fcDFq64a3 qp4A== X-Gm-Message-State: ALoCoQmCoyt/aC2+w1vkPnibFkw2heOvHLkkHZBI6PaeCciX25HHgEqf3zJ1aXRn0l970SbDwJBK X-Received: by 10.43.75.198 with SMTP id zb6mr1078718icb.22.1394734854692; Thu, 13 Mar 2014 11:20:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.19.136 with SMTP id 8ls405967qgh.43.gmail; Thu, 13 Mar 2014 11:20:54 -0700 (PDT) X-Received: by 10.52.243.167 with SMTP id wz7mr1205330vdc.47.1394734854593; Thu, 13 Mar 2014 11:20:54 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id x3si1109609vcn.9.2014.03.13.11.20.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 11:20:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so1522023vcb.5 for ; Thu, 13 Mar 2014 11:20:54 -0700 (PDT) X-Received: by 10.58.90.99 with SMTP id bv3mr1988354veb.34.1394734854485; Thu, 13 Mar 2014 11:20:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp397936vck; Thu, 13 Mar 2014 11:20:53 -0700 (PDT) X-Received: by 10.180.211.208 with SMTP id ne16mr2733302wic.21.1394734853404; Thu, 13 Mar 2014 11:20:53 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id ct2si1076472wib.70.2014.03.13.11.20.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Mar 2014 11:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOACl-00042r-Nn; Thu, 13 Mar 2014 18:18:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOACH-0001vA-OZ; Thu, 13 Mar 2014 18:17:37 +0000 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOABR-0001q3-4l for linux-arm-kernel@lists.infradead.org; Thu, 13 Mar 2014 18:16:47 +0000 Received: from e102109-lin.cambridge.arm.com (e102109-lin.cambridge.arm.com [10.1.203.182]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s2DIG6SF032222; Thu, 13 Mar 2014 18:16:07 GMT From: Catalin Marinas To: Russell King - ARM Linux Subject: [PATCH 4/5] arm: Disable preemption in crunch_task_enable() Date: Thu, 13 Mar 2014 18:15:51 +0000 Message-Id: <1394734552-4704-5-git-send-email-catalin.marinas@arm.com> X-Mailer: git-send-email 1.7.12.3 In-Reply-To: <1394734552-4704-1-git-send-email-catalin.marinas@arm.com> References: <1394734552-4704-1-git-send-email-catalin.marinas@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140313_141645_571224_1CC355E0 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [217.140.96.21 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Hartley Sweeten , Ryan Mallon , linux-arm-kernel@lists.infradead.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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: catalin.marinas@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This patch is in preparation for calling the crunch_task_enable() function with interrupts enabled. Signed-off-by: Catalin Marinas Cc: Hartley Sweeten Cc: Ryan Mallon --- arch/arm/mach-ep93xx/crunch-bits.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ep93xx/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S index 0ec9bb48fab9..890c5df2b4fe 100644 --- a/arch/arm/mach-ep93xx/crunch-bits.S +++ b/arch/arm/mach-ep93xx/crunch-bits.S @@ -65,11 +65,13 @@ * called from prefetch exception handler with interrupts disabled */ ENTRY(crunch_task_enable) + inc_preempt_count r10, r3 + ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr ldr r1, [r8, #0x80] tst r1, #0x00800000 @ access to crunch enabled? - movne pc, lr @ if so no business here + bne 2f @ if so no business here mov r3, #0xaa @ unlock syscon swlock str r3, [r8, #0xc0] orr r1, r1, #0x00800000 @ enable access to crunch @@ -142,7 +144,7 @@ crunch_save: teq r0, #0 @ anything to load? cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered - moveq pc, lr + beq 1f crunch_load: cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word @@ -190,6 +192,11 @@ crunch_load: cfldr64 mvdx14, [r0, #CRUNCH_MVDX14] cfldr64 mvdx15, [r0, #CRUNCH_MVDX15] +1: +#ifdef CONFIG_PREEMPT_COUNT + get_thread_info r10 +#endif +2: dec_preempt_count r10, r3 mov pc, lr /*