Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3709603ybv; Mon, 10 Feb 2020 05:07:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyE9k/MhDNI84pcAJmQVOiXOBn1YFEuO4LaA+TdkdV70kBw7RUJGg9xFAShkz3CFw4vN8YK X-Received: by 2002:a9d:7590:: with SMTP id s16mr913867otk.89.1581340020368; Mon, 10 Feb 2020 05:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581340020; cv=none; d=google.com; s=arc-20160816; b=GulAgtBVM8IZW06rdoH1ATLMKXmEj5vyoao6sgiT3QRL2GWRdnMf/0sfloi8fcN1Lz /jpNVcGQoVPzPaf94t+KWxvJiDc632XAUWZDDZgLBkCJT2nIXRm0dNIEWaUe0RgqT9Vl XiEMEHkPI2mAzYv19oRjZwVfSb23Gfl3RSeqSl/w8oPXU4M8OP97mLdbBDUANePpWwzU RRgq9pKZs2NcWXXJeNZF/8An30ymPnMRKMDk1W0UCyGF8Jb18KlsH0LuZkEHUEy4ZZzU XGwVWBEr+fWwECL4xat9DuRvZ7AENpZoVqk4Pc34tybnxZ03HX7I3RhvSm3v8Nr8aICm Z31A== 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=Fj6p7/HUgP5PffCZe1jpx8nHFoT7GgMmSNQXpa6dZ3E=; b=fH0sVVWs6HK6zLvLBS9rCUnXZ3/jiSHCWJMfPcD8/TRmmRUSQNc9QX45Q8OD3J4MVi jghMPU5CIpQeDEY+I/LOIf8w/NhLSQeTtMz1RIIconeCui9e1DxDlljIOrqhcDk/CGxP uZSJN8eCb3C2aCENRPuDZn/QbpQq0ha7NLA3yMZbJQqXVcTzRLZLFC+wQU++4emha6Lt SU5ZhAGm0ckQTPfzKkr3HXSroql3fCB6R7Cx8K6rmzTmjpzkBCdL5caKfI5T2Cp4m87K QY2WvN7F3JWET9XWFiFwdjDUmRNkTRyXpqyuQTOPZ7kJWROWPJaU0lHheP+fTyIbNBhW +w0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bm7ZRJQc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 200si139699oii.156.2020.02.10.05.06.48; Mon, 10 Feb 2020 05:07:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bm7ZRJQc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729543AbgBJNGq (ORCPT + 99 others); Mon, 10 Feb 2020 08:06:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:38622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729541AbgBJMjw (ORCPT ); Mon, 10 Feb 2020 07:39:52 -0500 Received: from localhost (unknown [209.37.97.194]) (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 8FE8624677; Mon, 10 Feb 2020 12:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338390; bh=aiNr3OYhLrbNTi7lnXmgk4AC0sPo007jR98wm2Qgfw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bm7ZRJQcNLEThm2b2PHaJ+6qljW9c4yf6YGZZKkjzqGLdkhJYBm/KMlT+uzxjNS5U GM4+yIvDNPNOCTA94dPD2uiTZQ1N/9KHSN85xnrtNx+q7U0t8RQvsTNV7LuPa6YTdl JRPWH+Usje4Y1eUrNu5/zt0SevxQPC3v3ImGj0KU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wang Xuerui , Paul Burton , linux-mips@vger.kernel.org, Huacai Chen , Jiaxun Yang Subject: [PATCH 5.5 081/367] MIPS: asm: local: add barriers for Loongson Date: Mon, 10 Feb 2020 04:29:54 -0800 Message-Id: <20200210122431.790813750@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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: Wang Xuerui commit 3e86460ebe2340df6a33b35a55312cc369bdcbd0 upstream. Somehow these LL/SC usages are not taken care of, breaking Loongson builds. Add the SYNCs appropriately. Signed-off-by: Wang Xuerui Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: # v5.5+ Signed-off-by: Greg Kroah-Hartman --- arch/mips/include/asm/local.h | 4 ++++ 1 file changed, 4 insertions(+) --- a/arch/mips/include/asm/local.h +++ b/arch/mips/include/asm/local.h @@ -37,6 +37,7 @@ static __inline__ long local_add_return( __asm__ __volatile__( " .set push \n" " .set arch=r4000 \n" + __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_add_return \n" " addu %0, %1, %3 \n" __SC "%0, %2 \n" @@ -52,6 +53,7 @@ static __inline__ long local_add_return( __asm__ __volatile__( " .set push \n" " .set "MIPS_ISA_ARCH_LEVEL" \n" + __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_add_return \n" " addu %0, %1, %3 \n" __SC "%0, %2 \n" @@ -84,6 +86,7 @@ static __inline__ long local_sub_return( __asm__ __volatile__( " .set push \n" " .set arch=r4000 \n" + __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_sub_return \n" " subu %0, %1, %3 \n" __SC "%0, %2 \n" @@ -99,6 +102,7 @@ static __inline__ long local_sub_return( __asm__ __volatile__( " .set push \n" " .set "MIPS_ISA_ARCH_LEVEL" \n" + __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_sub_return \n" " subu %0, %1, %3 \n" __SC "%0, %2 \n"