Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2639409pxa; Mon, 17 Aug 2020 15:10:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBGcc8nwPVihGXbPuRyFyfZo+RZaQz2ds9UtB+sbq5OZxuf/wuqfwE01CmtLTQ/AMIUvqz X-Received: by 2002:a05:6402:3193:: with SMTP id di19mr17355520edb.224.1597702252703; Mon, 17 Aug 2020 15:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702252; cv=none; d=google.com; s=arc-20160816; b=hOjQNgICOVc3vkrgCcv49mjX0Jo2lQ1BN2fzXCDkj4CcLWhidfPNZcy87OmMaNjNBc 8XnGL22XK73hNwuNhtMCJSCxEc0PV6YGACmnRVfWTJLmA53fGyrIY44huSDdDlEL3nM3 joq0fln3zzF1lXO45xcpoP2ARaHGDhNmD0TG6/g3qfc/kI+IWhbcxd1NfVWAkpa1gNWr TxGJLgLx843JL+O8JZyf2Cjxk6e5aKvNbpiD+zF9nz2ARNgIQkFCx57w8xFven2vVgEv nKFYTb5xgNZsO78KLMqFTPXVsGORc2NQp+s0qZIj842AdmwJQoGRk7xy9sEoidpmATVv Oiew== 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=q/BeTXUy75SMOtY4a+i/Eq30fkagnGphHDrdt0TDJBI=; b=uIYzzV63+SPH9V17Ma8sduRraRtvZ+w7PgcXfVpKfp+eHT49G1gC8NvTkW+YcbpJl2 /V8rbij9LmF5nxLdP4GOSFxJphNZSj1CBiY9wCRfMotTb8Ubn8rvRP+BWyzL/P9L3BVq x0qB0dfaoawR6S/lZqymac8efbteeUXup9H+ICiOil12mhK391fdGT+4Lc/GuDuU1pwS 5auE15vJ62WSS/1AelDGDBe34hxaOVc1kfVrY9UOcPPynqzrlLEtwi7LuRgKZZ/kCmnN r0WH3Xz/jIgvrByIUGKMwZI70E09n0TC35K/LAYhwUr9A/jqC+JmrTTElFcGuixI84ws 2w9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KjJuLSB8; 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 cw13si11741278edb.170.2020.08.17.15.10.29; Mon, 17 Aug 2020 15:10:52 -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=KjJuLSB8; 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 S2388831AbgHQQl1 (ORCPT + 99 others); Mon, 17 Aug 2020 12:41:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:45126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387809AbgHQP6X (ORCPT ); Mon, 17 Aug 2020 11:58:23 -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 525A820885; Mon, 17 Aug 2020 15:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679902; bh=7gyPJKW97AuJsGRcf2153Bp6vcw0jR86aMwsAmCpXpg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KjJuLSB85s9vM+8gfCnGmRqHB8tfWNoZIDJcQ9nz1Xf9Aky6kTjvvMsWeFRWM6lDS o/ADQBrtFk8BzouJ3YbdRLptL2J4CBP5oY0G5AneYNEEdlTw4I843US+E23zTnu837 lKNUYYmlTapalqZEDNvRQmqPHJBXom/CsqdPpCLg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John David Anglin , Helge Deller Subject: [PATCH 5.7 373/393] parisc: Do not use an ordered store in pa_tlb_lock() Date: Mon, 17 Aug 2020 17:17:03 +0200 Message-Id: <20200817143837.701651611@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@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: John David Anglin commit e72b23dec1da5e62a0090c5da1d926778284e230 upstream. No need to use an ordered store in pa_tlb_lock() and update the comment regarng usage of the sid register to unlocak a spinlock in tlb_unlock0(). Signed-off-by: John David Anglin Signed-off-by: Helge Deller Cc: # v5.0+ Signed-off-by: Greg Kroah-Hartman --- arch/parisc/kernel/entry.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -455,7 +455,7 @@ LDREG 0(\ptp),\pte bb,<,n \pte,_PAGE_PRESENT_BIT,3f b \fault - stw,ma \spc,0(\tmp) + stw \spc,0(\tmp) 99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP) #endif 2: LDREG 0(\ptp),\pte @@ -463,7 +463,12 @@ 3: .endm - /* Release pa_tlb_lock lock without reloading lock address. */ + /* Release pa_tlb_lock lock without reloading lock address. + Note that the values in the register spc are limited to + NR_SPACE_IDS (262144). Thus, the stw instruction always + stores a nonzero value even when register spc is 64 bits. + We use an ordered store to ensure all prior accesses are + performed prior to releasing the lock. */ .macro tlb_unlock0 spc,tmp #ifdef CONFIG_SMP 98: or,COND(=) %r0,\spc,%r0