Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2639396pxa; Mon, 17 Aug 2020 15:10:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrIL657nGxJWPc+GCgqyaPxWcHpboQ68T5rgW4v3ccibkeUE0kuLqtVZw/fmwvy9RVTzXt X-Received: by 2002:a05:6402:8cb:: with SMTP id d11mr17507937edz.100.1597702251935; Mon, 17 Aug 2020 15:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702251; cv=none; d=google.com; s=arc-20160816; b=liD++wH4rtEWnB2GscQFcGQAq3wY/g+xIMMXSku7/mW11BKBHH/pwCBscro4MFBioc pZumOkEH4Podi3UEC4J2DjXLZvReCuyOD4sJ3xj2x3Wy8ux3JCUu4zF258RpZXNS5iAh Bh/cPVLoju/rUV9b7cNGOtRmkij8sQI1kKgWDj7AQsP4dgiYvJ8rsf/KMlSgZ7dDfCfl WTzsUo4KVuj95ZiNRAE/mbKWgen7A/291g1d0wExdlcQh7+u887o0IxI4kztJtCgN9Zu e7o9cvtE01O6xKuSchgr0dOKeHZuoIlL43iK+ap8NPRkk7nIK+drbHrsq+OZO3dyuEkr 6OCw== 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=r3vVLJCfTrR9X2N2l05SyFtdgPE7y2m2yG3Hy955W0Y=; b=CbYdc+jL8nMQ1+QcXNlGc1CVvjqE5GHAzuVCCJimWuqfgFcG+nLquj1OmP7j8itPJA pE1KC7KEXls6R+qMyjTTvZwGuZarmQsK1aUD+6qIRGZ1fq84ZqDKS+0hfZKQ91rnSWkI WwSykA/MAqTkJhAspImcQAqNoYQk0w3CbWcPBAo7qu7EpeTKIUjiTyuQC6gxpe2Dddx+ 0BNZoFO+VC+WCdixTmISmY+m9yWhGzBWJEI4vm4R2LIP0O1N5aH8muqPLRVQ9kZgMA0y o+BmpYtTJJne6dBXr7pTkeoAo+9o8gUFG+qhILb/LhTIqokRvK7wADQXGDAM5zOgai5q Ns3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TnTigaen; 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 o9si11692299edq.412.2020.08.17.15.10.28; Mon, 17 Aug 2020 15:10:51 -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=TnTigaen; 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 S2388907AbgHQQkW (ORCPT + 99 others); Mon, 17 Aug 2020 12:40:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:45594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388112AbgHQP6J (ORCPT ); Mon, 17 Aug 2020 11:58:09 -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 D424320729; Mon, 17 Aug 2020 15:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679888; bh=adrKwjKBYwAGO2tCI25+wx390wp6p3FolWXMxPZgFos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TnTigaenz1Sq/Edqu8xSRp7CP7Q4C1EUVesOtcQJhokcvrwa/jZ0BpC072QmSbzw+ HkUsF5fQIaiAGBWnwx+Uo0OgOTbrV0+b9LGtbkW0dHg/Ub88qKdoOEyBXb8H/8Eg97 RD9tXpmfLPrCIcVgoGQ0/5PTrP1wj5jow1QrzWBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.7 369/393] Revert "parisc: Improve interrupt handling in arch_spin_lock_flags()" Date: Mon, 17 Aug 2020 17:16:59 +0200 Message-Id: <20200817143837.504116036@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: Helge Deller commit 3d05b8aebc5f10ee3ab129b61100196855dd7249 upstream. This reverts commit 2772f0efd5bbd5413db3d22e363b779ca0fa5310. It turns out that we want to implement the spinlock code differently. Signed-off-by: Helge Deller Cc: # v5.7+ Signed-off-by: Greg Kroah-Hartman --- arch/parisc/include/asm/spinlock.h | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) --- a/arch/parisc/include/asm/spinlock.h +++ b/arch/parisc/include/asm/spinlock.h @@ -10,34 +10,25 @@ static inline int arch_spin_is_locked(arch_spinlock_t *x) { volatile unsigned int *a = __ldcw_align(x); - smp_mb(); return *a == 0; } -static inline void arch_spin_lock(arch_spinlock_t *x) -{ - volatile unsigned int *a; - - a = __ldcw_align(x); - while (__ldcw(a) == 0) - while (*a == 0) - cpu_relax(); -} +#define arch_spin_lock(lock) arch_spin_lock_flags(lock, 0) static inline void arch_spin_lock_flags(arch_spinlock_t *x, unsigned long flags) { volatile unsigned int *a; - unsigned long flags_dis; a = __ldcw_align(x); - while (__ldcw(a) == 0) { - local_save_flags(flags_dis); - local_irq_restore(flags); + while (__ldcw(a) == 0) while (*a == 0) - cpu_relax(); - local_irq_restore(flags_dis); - } + if (flags & PSW_SM_I) { + local_irq_enable(); + cpu_relax(); + local_irq_disable(); + } else + cpu_relax(); } #define arch_spin_lock_flags arch_spin_lock_flags