From patchwork Mon Oct 13 13:49:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 38657 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0A7F2039B for ; Mon, 13 Oct 2014 13:52:14 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e51sf4279519eek.7 for ; Mon, 13 Oct 2014 06:52:13 -0700 (PDT) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=aNIW9+B70Ydd/shq+2hK12v+4UrEkZN6sWfclw9/Gx4=; b=ecVjG7/k3XriuTUzikamjrqUXsrnAku9+0g+K9iBL7/6CVN+I28ES4Dq6IN6WTZUuY 3fGl/1vfvGu2M36G0YUKF8zPiCIWP3oMJOGGJt2pO4f/GpwZsLblDYAjHz1GPmIR00k5 8oLRXgLZQs0whQt+FlfxlcPbtLPK9dyxIBMyrFGvUqSGc69OMs190at76QJjOKP2UoDZ ntu52T9H+EFjAzHd1NALW7AZOzmYdCY/ZtE79OyxnA5vXKZ/oLbglm4FDLaLQt1CqUq4 OCYJkzLKHDAlniOrJ8qbHEx6uXBZARcpifVQth8Hy6erWMEcLK5/civInsWwbQEAlGkg RUxg== X-Gm-Message-State: ALoCoQnKiTHpHyQIYWvuJFovhy7pEl2WxCaGZCQsIdn2cjUtXwLqQvlFaatFp6LZJkH/VMso2N2T X-Received: by 10.152.42.229 with SMTP id r5mr27599lal.8.1413208333884; Mon, 13 Oct 2014 06:52:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.131 with SMTP id f3ls444469lae.38.gmail; Mon, 13 Oct 2014 06:52:13 -0700 (PDT) X-Received: by 10.112.149.36 with SMTP id tx4mr3728626lbb.79.1413208333717; Mon, 13 Oct 2014 06:52:13 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by mx.google.com with ESMTPS id qj5si22278405lbb.89.2014.10.13.06.52.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 06:52:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id q1so6691325lam.4 for ; Mon, 13 Oct 2014 06:52:13 -0700 (PDT) X-Received: by 10.152.23.170 with SMTP id n10mr24323714laf.29.1413208333639; Mon, 13 Oct 2014 06:52:13 -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.112.84.229 with SMTP id c5csp217903lbz; Mon, 13 Oct 2014 06:52:12 -0700 (PDT) X-Received: by 10.68.136.98 with SMTP id pz2mr24056885pbb.43.1413208283360; Mon, 13 Oct 2014 06:51:23 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si10368565pat.185.2014.10.13.06.51.22 for ; Mon, 13 Oct 2014 06:51:23 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754721AbaJMNvO (ORCPT + 1 other); Mon, 13 Oct 2014 09:51:14 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:57253 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754723AbaJMNuH (ORCPT ); Mon, 13 Oct 2014 09:50:07 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1Xdg0g-0003u7-E2; Mon, 13 Oct 2014 15:50:02 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Mark Rutland , Russell King , Jiri Slaby Subject: [patch added to the 3.12 stable tree] ARM: 8128/1: abort: don't clear the exclusive monitors Date: Mon, 13 Oct 2014 15:49:34 +0200 Message-Id: <1413208201-14602-63-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1413208201-14602-1-git-send-email-jslaby@suse.cz> References: <1413208201-14602-1-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@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.45 as permitted sender) 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Rutland This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit 85868313177700d20644263a782351262d2aff84 upstream. The ARMv6 and ARMv7 early abort handlers clear the exclusive monitors upon entry to the kernel, but this is redundant: - We clear the monitors on every exception return since commit 200b812d0084 ("Clear the exclusive monitor when returning from an exception"), so this is not necessary to ensure the monitors are cleared before returning from a fault handler. - Any dummy STREX will target a temporary scratch area in memory, and may succeed or fail without corrupting useful data. Its status value will not be used. - Any other STREX in the kernel must be preceded by an LDREX, which will initialise the monitors consistently and will not depend on the earlier state of the monitors. Therefore we have no reason to care about the initial state of the exclusive monitors when a data abort is taken, and clearing the monitors prior to exception return (as we already do) is sufficient. This patch removes the redundant clearing of the exclusive monitors from the early abort handlers. Signed-off-by: Mark Rutland Acked-by: Will Deacon Signed-off-by: Russell King Signed-off-by: Jiri Slaby --- arch/arm/mm/abort-ev6.S | 6 ------ arch/arm/mm/abort-ev7.S | 6 ------ 2 files changed, 12 deletions(-) diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S index 80741992a9fc..5d777a567c35 100644 --- a/arch/arm/mm/abort-ev6.S +++ b/arch/arm/mm/abort-ev6.S @@ -17,12 +17,6 @@ */ .align 5 ENTRY(v6_early_abort) -#ifdef CONFIG_CPU_V6 - sub r1, sp, #4 @ Get unused stack location - strex r0, r1, [r1] @ Clear the exclusive monitor -#elif defined(CONFIG_CPU_32v6K) - clrex -#endif mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR /* diff --git a/arch/arm/mm/abort-ev7.S b/arch/arm/mm/abort-ev7.S index 703375277ba6..4812ad054214 100644 --- a/arch/arm/mm/abort-ev7.S +++ b/arch/arm/mm/abort-ev7.S @@ -13,12 +13,6 @@ */ .align 5 ENTRY(v7_early_abort) - /* - * The effect of data aborts on on the exclusive access monitor are - * UNPREDICTABLE. Do a CLREX to clear the state - */ - clrex - mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR