Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2655634pxa; Mon, 17 Aug 2020 15:40:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq0Bco9jlqH+sdFm7ghLmvIeK8tRMm4FlPrIQJSWTyKbSAgicpJ5X2H4myo5TAF0EYLrvx X-Received: by 2002:a17:906:7e4e:: with SMTP id z14mr16915948ejr.87.1597704003722; Mon, 17 Aug 2020 15:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704003; cv=none; d=google.com; s=arc-20160816; b=I+fN/X/91ijcsAbw4QUxkCoqBS3hGCQOJOtO+U4rUXL+W7dCM+CrGZcJ/Xy5dzsg8N N9rRCGwu4z9NB4mbuInzud1wkjSp9zkngdrTYP8M8JtMCgmMuXgzUHw/6L3M2fVdG4Mk 250R9RhzAZ4Txp/Bo7PjvvCdVScijoTwqOPCChTPbP7SZtGgLrLak57GjEFGKKdXNB6u b6gss/vbZACKhfclbVvfyI/+j4rGYrnkF3Fdnto7OtWrC8x8H9zDYphrqfN0sAGWe51x 1t/PTvXuRwQn8hoHWBE0O4Flb0Y8msmmp3rDy/5e9qjcvq01Fy4ir//iz5f4y3x1i5yA +HTg== 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=Yviy0FuvHTl8DKulV7iM+fSfVqUzUb5UkuACLq7sYNE2bbSoIkx9iD53G7YqXoDm7B 9l2NJWahb0QDg0tAcHkfREK37gtSs0bCK4HP2/r1zFPWKic2ZUNBfg5tUaXIQfgPPRRt YWzhUlRLTnQakhxT1pzcMj8GGOgK+XuzLDy/a+DaZjELmTC1CB7RWhBW1oK4bEfBAOrA FngFqY/pSq3RZ/ZMpiitChGZdA5y2l+K9BO8w5HVuZNxNhTdhnQ0ER5S7dUR8/aFU1AX 9NYcpmEFaJsgXe4eeLjDsDU3hU+rpkm/qYnMF0/oPR5YuF4dLLLtjDnDqroL0T/lDCtI XErA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a7S6sHel; 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 k22si11732970edx.491.2020.08.17.15.39.40; Mon, 17 Aug 2020 15:40:03 -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=a7S6sHel; 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 S2388686AbgHQR6d (ORCPT + 99 others); Mon, 17 Aug 2020 13:58:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:35746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388541AbgHQQKO (ORCPT ); Mon, 17 Aug 2020 12:10:14 -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 D731A20760; Mon, 17 Aug 2020 16:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680592; bh=0vzo1+dfsxzsfhFpidf+D+o54CBDt9UpG9cy1L0J2jU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a7S6sHeludi7srU4D3lEZl6UupwUz40oAinfj7aaFeTuBTu7xSgLkni4N6ll4R9oV KqbiHMmUnOZl6FPsQeVXWJd6Zae0MhToYEXBE3PmZ4Fk9HDpqHMm3/AG+d2+YO4hYg U60bLPPZvd8LhgKaQBN3gDs7fQv2ZL6ZPg1aXwCA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.4 248/270] Revert "parisc: Revert "Release spinlocks using ordered store"" Date: Mon, 17 Aug 2020 17:17:29 +0200 Message-Id: <20200817143808.169137147@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@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