From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07170EB64D9 for ; Mon, 26 Jun 2023 21:51:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231274AbjFZVvc (ORCPT ); Mon, 26 Jun 2023 17:51:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbjFZVui (ORCPT ); Mon, 26 Jun 2023 17:50:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 578342709; Mon, 26 Jun 2023 14:50:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13F0960F7E; Mon, 26 Jun 2023 21:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FFB1C433C8; Mon, 26 Jun 2023 21:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687816222; bh=OkSO7IKhJ5FBVBTfwIS93RRlPadpC+yJMd5i0eAyalI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DQq+xz4eLDeVVvoI+qeQOsmUB7PbNCq+MCMvlBPnEqnmiDJAuHqu3SJkFbrYZLDtB 4K8lVW3pTkGIgUDr91reL5q4JIEe8Z6wp2pVc+OrndIHsD2utUqAmeRL6q85oAtnB6 y1luyuhpH3sNsnRnCKSxmBQ+BO4HEFipJmUGAA5/lvw5Ky1wyB9Ud2JU7UjqiA0ezA qcPhAW+X8U7ZrZALeTfpY5rUHsbG5vRgyHbylJiFRqk1Y1vlOF9jKctw6GShp/58J8 T4MULl69JrCzneb9VBr3ePcXxRHmgDOt7tMsJtmksya6AEwZutXGXmvQ31euaHTbag Er6CzSTD3CFnQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qi Hu , Miao HAO , Huacai Chen , Sasha Levin , chenhuacai@kernel.org, git@xen0n.name, zhangqing@loongson.cn, lienze@kylinos.cn, loongarch@lists.linux.dev Subject: [PATCH AUTOSEL 6.3 14/16] LoongArch: Fix the write_fcsr() macro Date: Mon, 26 Jun 2023 17:49:54 -0400 Message-Id: <20230626214956.178942-14-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626214956.178942-1-sashal@kernel.org> References: <20230626214956.178942-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.3.9 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qi Hu [ Upstream commit 346dc929623cef70ff7832a4fa0ffd1b696e312a ] The "write_fcsr()" macro uses wrong the positions for val and dest in asm. Fix it! Reported-by: Miao HAO Signed-off-by: Qi Hu Signed-off-by: Huacai Chen Signed-off-by: Sasha Levin --- arch/loongarch/include/asm/loongarch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/include/asm/loongarch.h b/arch/loongarch/include/asm/loongarch.h index 83da5d29e2d17..f0d32112dafd9 100644 --- a/arch/loongarch/include/asm/loongarch.h +++ b/arch/loongarch/include/asm/loongarch.h @@ -1491,7 +1491,7 @@ __BUILD_CSR_OP(tlbidx) #define write_fcsr(dest, val) \ do { \ __asm__ __volatile__( \ - " movgr2fcsr %0, "__stringify(dest)" \n" \ + " movgr2fcsr "__stringify(dest)", %0 \n" \ : : "r" (val)); \ } while (0) -- 2.39.2