From patchwork Fri Oct 17 08:09:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 38841 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4C1ED20C5D for ; Fri, 17 Oct 2014 08:13:27 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id d17sf258754eek.2 for ; Fri, 17 Oct 2014 01:13:26 -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: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=wrKCPIq9+7neHjsmhHMCRKnomRfQeYNseYim20yx9xM=; b=SVlCsQJkaT7MPYqc3nQ/bD7E7dgMYx+AUBkWWQw3j2ZHjCTFTcwX8CcgnplhSvkBfD sHBu2s53ARnOTr2nvN0De2Vob5osjgsHsSEn3cOSjgPIK1AVfZ75ezB0dxpNGSSw4ouJ hUvFZ+fx11QzH/agDyMgYRd7BjoGYT8xwmFWKYd7ksMK7CTwGEx3LGk4wor3CEy1Pzt7 02MfaSaZ4KeBdelPLertTfWPU04AxHZz8/5Q67NGTuaqT431dTm8OT1s8sGrn0aSsYPw tzmPaIP8L0objDZHQhk6kjMSwRwmJ9SqaxPw3BaDWBFl3G6H0Y40pU4c9kdTlExylShD 97Hg== X-Gm-Message-State: ALoCoQnniiG/Whon87hEyuHJ9fgqumjycRN3PbRSRQxDceeoxgw9ziEvFJ5eBe/L6jW8C/COO7fX X-Received: by 10.112.217.102 with SMTP id ox6mr33465lbc.19.1413533606428; Fri, 17 Oct 2014 01:13:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.67 with SMTP id z3ls237392lag.74.gmail; Fri, 17 Oct 2014 01:13:26 -0700 (PDT) X-Received: by 10.152.179.164 with SMTP id dh4mr6939980lac.55.1413533606053; Fri, 17 Oct 2014 01:13:26 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id lc6si821577lbb.129.2014.10.17.01.13.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 01:13:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id l4so261160lbv.12 for ; Fri, 17 Oct 2014 01:13:26 -0700 (PDT) X-Received: by 10.152.5.38 with SMTP id p6mr2436997lap.44.1413533605975; Fri, 17 Oct 2014 01:13:25 -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 c5csp184186lbz; Fri, 17 Oct 2014 01:13:25 -0700 (PDT) X-Received: by 10.70.124.196 with SMTP id mk4mr7043295pdb.14.1413533582936; Fri, 17 Oct 2014 01:13:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si482018pdp.169.2014.10.17.01.13.02 for ; Fri, 17 Oct 2014 01:13:02 -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 S1753680AbaJQINA (ORCPT + 1 other); Fri, 17 Oct 2014 04:13:00 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36351 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753404AbaJQIMo (ORCPT ); Fri, 17 Oct 2014 04:12:44 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 631E9ADC5; Fri, 17 Oct 2014 08:11:56 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1Xf2df-0000D1-A9; Fri, 17 Oct 2014 10:11:55 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Mark Rutland , Russell King , Jiri Slaby Subject: [PATCH 3.12 072/197] ARM: 8128/1: abort: don't clear the exclusive monitors Date: Fri, 17 Oct 2014 10:09:48 +0200 Message-Id: X-Mailer: git-send-email 2.1.1 In-Reply-To: <7d97f39bc813aa9f11fe03d602885f81de07007c.1413533329.git.jslaby@suse.cz> References: <7d97f39bc813aa9f11fe03d602885f81de07007c.1413533329.git.jslaby@suse.cz> In-Reply-To: References: 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.217.181 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 3.12-stable review patch. If anyone has any objections, please let me 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