From patchwork Thu Mar 13 18:15:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 26214 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 050EB206A0 for ; Thu, 13 Mar 2014 18:20:51 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf3230450pbc.0 for ; Thu, 13 Mar 2014 11:20:51 -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=MtnaOEsxsMSSRd1uYKUFPIY0WF9Sw1jnpFMRQBmIZGg=; b=bx2kDnV6nCVoCB1SMR4nGtKrGzIW9g++VzqzRz5SaL+pXeRfcNpUafyArzEsCdBnnf y13HXBERH0U6pzFeG6IJpIqDwrSX+a62e7/APsCFs74urWTSMxvUDelEpQg5d+ddhbOD f1lRddelm0YQ4vNt8fseGxnWDXhzq9DQVunnntvX5tTHbE/YQGB3FbyC9lSo6MHcaCNk EOda870/718Ja9AVsa4Z25tDpXq7+/OJKNwaZaj7S0bq2P0Wdiao1XTJLIj71XXMweeh 2fUnAHhZ9HLMTPvXK7parlIdwwtY586tzquR3JvuvyzDWbJMEtx7Uv1Nu2DBFmM+MOmw iDRg== X-Gm-Message-State: ALoCoQnfLqv5YPK5Xdn+4NCfs4HaWYIPYsAGhcnfbtGvWrqDFmQJexSMj+gIkn6/J9cfWXINMtwT X-Received: by 10.69.29.33 with SMTP id jt1mr1054394pbd.7.1394734851258; Thu, 13 Mar 2014 11:20:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.226 with SMTP id 89ls362125qgr.14.gmail; Thu, 13 Mar 2014 11:20:51 -0700 (PDT) X-Received: by 10.58.57.67 with SMTP id g3mr2562435veq.3.1394734851130; Thu, 13 Mar 2014 11:20:51 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id uw4si1132130vdc.40.2014.03.13.11.20.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 11:20:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id jw12so1528508veb.37 for ; Thu, 13 Mar 2014 11:20:51 -0700 (PDT) X-Received: by 10.220.103.141 with SMTP id k13mr2560630vco.25.1394734851035; Thu, 13 Mar 2014 11:20:51 -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 i9csp397928vck; Thu, 13 Mar 2014 11:20:50 -0700 (PDT) X-Received: by 10.180.221.68 with SMTP id qc4mr2749856wic.30.1394734849849; Thu, 13 Mar 2014 11:20:49 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id a3si2411297wie.22.2014.03.13.11.20.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Mar 2014 11:20:49 -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 1WOACY-0003vq-Eu; Thu, 13 Mar 2014 18:17:55 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOAC8-0001uL-6K; Thu, 13 Mar 2014 18:17:28 +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-0001q2-1Y 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 s2DIG6SE032222; Thu, 13 Mar 2014 18:16:06 GMT From: Catalin Marinas To: Russell King - ARM Linux Subject: [PATCH 3/5] arm: Disable preemption in iwmmxt_task_enable() Date: Thu, 13 Mar 2014 18:15:50 +0000 Message-Id: <1394734552-4704-4-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_339450_E8B4D382 X-CRM114-Status: UNSURE ( 8.22 ) 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: 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.128.178 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 iwmmxt_task_enable() function with interrupts enabled. Signed-off-by: Catalin Marinas --- arch/arm/kernel/iwmmxt.S | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index a08783823b32..c52f3e225aeb 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S @@ -65,13 +65,14 @@ */ ENTRY(iwmmxt_task_enable) + inc_preempt_count r10, r3 XSC(mrc p15, 0, r2, c15, c1, 0) PJ4(mrc p15, 0, r2, c1, c0, 2) @ CP0 and CP1 accessible? XSC(tst r2, #0x3) PJ4(tst r2, #0xf) - movne pc, lr @ if so no business here + bne 4f @ if so no business here @ enable access to CP0 and CP1 XSC(orr r2, r2, #0x3) XSC(mcr p15, 0, r2, c15, c1, 0) @@ -132,7 +133,7 @@ concan_dump: wstrd wR15, [r1, #MMX_WR15] 2: teq r0, #0 @ anything to load? - moveq pc, lr + beq 3f concan_load: @@ -165,8 +166,14 @@ concan_load: @ clear CUP/MUP (only if r1 != 0) teq r1, #0 mov r2, #0 - moveq pc, lr + beq 3f tmcr wCon, r2 + +3: +#ifdef CONFIG_PREEMPT_COUNT + get_thread_info r10 +#endif +4: dec_preempt_count r10, r3 mov pc, lr /*