Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3635494pxb; Mon, 24 Jan 2022 14:04:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJztQGLPcehrUiynlLwsxzWbwp5+igyWVSUPcTHiMJIfOvJvkWpVHtt0jkQqNdi3F4/zeRyn X-Received: by 2002:a63:3dcb:: with SMTP id k194mr13105841pga.619.1643061863447; Mon, 24 Jan 2022 14:04:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061863; cv=none; d=google.com; s=arc-20160816; b=wB05gNgAJBTcKvq4K8qQ4kgYoZ+NRx07TThXOw7s1+s5GmCcIuovqg5OLrFYhWKw06 BcXTuKCzCn6dmEavbOh+wSQExZqLVvz0F+rqhaxMZgoyAN9BzIqxw5VGtwomX+PGMons crEl1PABsosZFNpLwxKmUNR8262Ox8b1w3e4C5UBeEjHcjsVo7yjLM0LEia6XNKzbjum pS7a1jT55OGpqLyPdw2IM/WAxwhHO7XtGJA3AgXHgTKKGCCV2te0qIXKgvrmLEblshqy Q0QzjZUKWnGyi50SfxkvFDSBhunVsJzDzpalkpLei2jitrX6bu18+njvoiK1PGJGxwOz eH8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3tPK3U7Rq6gFuhhEGpKJ5wVZBn8wvcaQdedPJWLyMxk=; b=RlTzikbTeAV9mE+pLvn5/0O8VCNd9xJW1z41vTaQzz7xpkIgKAB/l93yOwA0E9pWNr 9ChIOAiB7x7pqYvkuXZbin15VvVA6OrDbZD4Hy8nxIhf54WQiLZV7Q7oOhA2MXhB3MHr bmWIX9YtYN/CwqiIr4znzw9qOBJYzeLnlN/gvj9SyiwGq80H+/QQbxWpvBjGfZlgqFTE JXt+l4dHDxFutnbCUIg1efR/HGiOaXHLBqSbpr2j/x6FSXCljnKLLtmvH7Aa2sBBBik9 84iC2fHEGeTILaa/DQF25/tME7hELnU+4tydlqzYnjCZdfuY4Re1/sWemNtW/75Ex9E2 dhwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRfVKPb5; 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=pass (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 lj7si476157pjb.104.2022.01.24.14.04.09; Mon, 24 Jan 2022 14:04:23 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=jRfVKPb5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1575666AbiAXVwN (ORCPT + 99 others); Mon, 24 Jan 2022 16:52:13 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:40302 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449483AbiAXVTP (ORCPT ); Mon, 24 Jan 2022 16:19:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C569A61490; Mon, 24 Jan 2022 21:19:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B7E0C340E4; Mon, 24 Jan 2022 21:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059154; bh=dLkJHSehkvwf6TVlYKXzLag1jRfBp/iDlklf0WRr+0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jRfVKPb5BiIsurK9bawi5FD5VeAaLgzli4oR5M7qJUhyVEU0VF6AG5WDbLlyPyYGw vTqQh8LDvN5xbANxCKwEwB1VkTy1efim29Wewx9zoEggBHz2RF0W7RN3rsrmfq2KSw MVI3xYHeJCzgRSYaEksPifae7j9GN3MDcqf0G+Oc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huang Pei , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.16 0522/1039] MIPS: fix local_{add,sub}_return on MIPS64 Date: Mon, 24 Jan 2022 19:38:31 +0100 Message-Id: <20220124184142.841372597@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huang Pei [ Upstream commit 277c8cb3e8ac199f075bf9576ad286687ed17173 ] Use "daddu/dsubu" for long int on MIPS64 instead of "addu/subu" Fixes: 7232311ef14c ("local_t: mips extension") Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/include/asm/local.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h index ecda7295ddcd1..3fa6340903882 100644 --- a/arch/mips/include/asm/local.h +++ b/arch/mips/include/asm/local.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,7 @@ static __inline__ long local_add_return(long i, local_t * l) " .set arch=r4000 \n" __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_add_return \n" - " addu %0, %1, %3 \n" + __stringify(LONG_ADDU) " %0, %1, %3 \n" __SC "%0, %2 \n" " beqzl %0, 1b \n" " addu %0, %1, %3 \n" @@ -55,7 +56,7 @@ static __inline__ long local_add_return(long i, local_t * l) " .set "MIPS_ISA_ARCH_LEVEL" \n" __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_add_return \n" - " addu %0, %1, %3 \n" + __stringify(LONG_ADDU) " %0, %1, %3 \n" __SC "%0, %2 \n" " beqz %0, 1b \n" " addu %0, %1, %3 \n" @@ -88,7 +89,7 @@ static __inline__ long local_sub_return(long i, local_t * l) " .set arch=r4000 \n" __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_sub_return \n" - " subu %0, %1, %3 \n" + __stringify(LONG_SUBU) " %0, %1, %3 \n" __SC "%0, %2 \n" " beqzl %0, 1b \n" " subu %0, %1, %3 \n" @@ -104,7 +105,7 @@ static __inline__ long local_sub_return(long i, local_t * l) " .set "MIPS_ISA_ARCH_LEVEL" \n" __SYNC(full, loongson3_war) " \n" "1:" __LL "%1, %2 # local_sub_return \n" - " subu %0, %1, %3 \n" + __stringify(LONG_SUBU) " %0, %1, %3 \n" __SC "%0, %2 \n" " beqz %0, 1b \n" " subu %0, %1, %3 \n" -- 2.34.1