From patchwork Mon Feb 10 12:29:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11373213 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11505924 for ; Mon, 10 Feb 2020 13:06:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC63520863 for ; Mon, 10 Feb 2020 13:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581340012; bh=aiNr3OYhLrbNTi7lnXmgk4AC0sPo007jR98wm2Qgfw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=niberxyxwv7eAzSgr8Ii3HEkuGh9zPt9Qi1qsLC+GXVFMTijiJw3ftACU9E+rgCAS +P0YRvg+IvZ8rczcm/fFt+bWy/ygLY7UYXkQLVqiDbQVtSClAjpZiGjJjpIg0sHn5F WRzX/WzpRcbQP1hUdSqdyqWGKRQb2ibWwxCRBUYQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730392AbgBJNGp (ORCPT ); Mon, 10 Feb 2020 08:06:45 -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 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@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"