Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2658592pxa; Mon, 17 Aug 2020 15:45:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyY4Fiza81oW4mSNaLbamFu+/cgnAM9uQ5GLdvZleUmmsxVdujogEU6aN9G8K/NQZLRjvm X-Received: by 2002:a05:6402:3199:: with SMTP id di25mr17515302edb.315.1597704337173; Mon, 17 Aug 2020 15:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704337; cv=none; d=google.com; s=arc-20160816; b=nz9WghahlDdf/GZDuEctjbaMZgvgx3S1A9xA4sv1GjX15BKqimIZH0/J83kme+9oe8 1k1b9jWWS+y9rwifaSb184jPciB95nqb+sGF0kroKFoHDH4EelDxW814IuW3TIXFXaJ7 WWJ4Yn+GwHAqu7rMMy8RjrVXrHzSaCzq5b/IhXlwkEFJDQtVps9Bhsd9bN0k3Kzum4pt ey18ioW1GAHBQ3JbwUUJxB3hgnnRRl8WKWoPjjqP9IIWNr1oO/6zNA0ma+aNItjT4kVI 4E2sOgKJrWuC8RGyRAROihK3A1gKrb4avV7eu5/60OSov4WCwcg2sp9ASu3SSQLQ1wVJ Iemg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=43KY6gejYDaPS22UqWMrUo0HDqAlVuZp8Yj5IihQVxY=; b=CNO8gaPnbL5D5gY//cnHRD/Fvksw0aiGGQfZyCvxp1MBZEUb0Qt0zMV7wFD6Of/Hdf xMO85DBfImS9XaNVYPkxQg8m4GEz6cOQh9OeiZtCy7AOm3BwyXgpPxCtPZc8S4pdBYhX Q2BaWKEQGlgh0PxFDQdvzbc4McIQEJ34THcLRvdoTgkPkjPXghxwa/6QpcppK86ZpUzS JNz+xemL96jNioLekIlO9YSDks8q2h8HivKfXzCmkiH6LKMdAWwCfIqCeK/zwHiczRyt e2ZvpyRkqgKWZJM/HYkRvWdqPnVhXIJw2XhTuVgCnjH2Ikq4DY8176/kflMv3Jt7ncmk tVXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iFExq3XP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz6si12900812edb.188.2020.08.17.15.45.13; Mon, 17 Aug 2020 15:45:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iFExq3XP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392197AbgHQTQV (ORCPT + 99 others); Mon, 17 Aug 2020 15:16:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:47826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730639AbgHQPjU (ORCPT ); Mon, 17 Aug 2020 11:39:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 54590208E4; Mon, 17 Aug 2020 15:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678759; bh=0vzo1+dfsxzsfhFpidf+D+o54CBDt9UpG9cy1L0J2jU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iFExq3XPx+OCac7jtGttS3JCe9xOPJtkwWn+3sQMdFVhY3aRa71GdhjzeFayikFvK IeKuiEQi0yuORsuRyY25msH6Mwz/F7HOcBwmbsrPNPN0i0q/gcLmlx53UZbhX160fc ZR8Dfj9ul2EZejP0VbvJRk6KQJr366JAGlzliTk8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.8 444/464] Revert "parisc: Revert "Release spinlocks using ordered store"" Date: Mon, 17 Aug 2020 17:16:37 +0200 Message-Id: <20200817143855.046736766@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Helge Deller commit 157e9afcc4fa25068b0e8743bc254a9b56010e13 upstream. This reverts commit 86d4d068df573a8c2105554624796c086d6bec3d. Signed-off-by: Helge Deller Cc: # v5.0+ Signed-off-by: Greg Kroah-Hartman --- arch/parisc/include/asm/spinlock.h | 4 ++-- arch/parisc/kernel/syscall.S | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) --- a/arch/parisc/include/asm/spinlock.h +++ b/arch/parisc/include/asm/spinlock.h @@ -37,8 +37,8 @@ static inline void arch_spin_unlock(arch volatile unsigned int *a; a = __ldcw_align(x); - mb(); - *a = 1; + /* Release with ordered store. */ + __asm__ __volatile__("stw,ma %0,0(%1)" : : "r"(1), "r"(a) : "memory"); } static inline int arch_spin_trylock(arch_spinlock_t *x) --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -640,8 +640,7 @@ cas_action: sub,<> %r28, %r25, %r0 2: stw %r24, 0(%r26) /* Free lock */ - sync - stw %r20, 0(%sr2,%r20) + stw,ma %r20, 0(%sr2,%r20) #if ENABLE_LWS_DEBUG /* Clear thread register indicator */ stw %r0, 4(%sr2,%r20) @@ -655,8 +654,7 @@ cas_action: 3: /* Error occurred on load or store */ /* Free lock */ - sync - stw %r20, 0(%sr2,%r20) + stw,ma %r20, 0(%sr2,%r20) #if ENABLE_LWS_DEBUG stw %r0, 4(%sr2,%r20) #endif @@ -857,8 +855,7 @@ cas2_action: cas2_end: /* Free lock */ - sync - stw %r20, 0(%sr2,%r20) + stw,ma %r20, 0(%sr2,%r20) /* Enable interrupts */ ssm PSW_SM_I, %r0 /* Return to userspace, set no error */ @@ -868,8 +865,7 @@ cas2_end: 22: /* Error occurred on load or store */ /* Free lock */ - sync - stw %r20, 0(%sr2,%r20) + stw,ma %r20, 0(%sr2,%r20) ssm PSW_SM_I, %r0 ldo 1(%r0),%r28 b lws_exit