Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp702881pxb; Tue, 5 Apr 2022 19:27:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ0sKt9hjzMLZ3n2EcnrfLRZ/PFoVPb3s1eCyDSJ1J3dbozqO81PYM8p8vu18vxvgAApbl X-Received: by 2002:a17:907:7d8d:b0:6df:f3a6:b0d9 with SMTP id oz13-20020a1709077d8d00b006dff3a6b0d9mr6396750ejc.13.1649212061959; Tue, 05 Apr 2022 19:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212061; cv=none; d=google.com; s=arc-20160816; b=bL4GuXLmra5HwFykojXe61D52ggHzisyvnl6hoQGV0tHLbD7/eLd+MCq/pxN6Pyvoj a+EX0eYzKmYDbMLA7AD0OThDC1DKZMu/OhQaSktpjxjfsOwoiljk+C64AtOzws3/Xs71 2P1CmjF2WhpHXyKQtDZkSwsQmD+zReoqcKecmCj5NSQ4/iC4Hr4rYNUQmSXIbiCFNl1w QDHSzxvaA/UoxzDLZQmRMllSwhSvyc58F6eB80BdkVPz2782AjOYLcIBkefFfgYw3tmB sNW/QGyvrg2zbmdWWhla2CcTXuQrVu4FFCmVoc9Efj8DiIScHsThT4yNRbBleD67ZPvM 81hw== 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=YX5Ae0NFr6O5w4+t9TttdOOF85ExE/3leDSNXNUlOg4=; b=ggTpc1ProAyfK4BGMEy7iD6uwkpOOzQjb5Lvqi3VPAKrqwEgvDc0tOy9VSVWbiOy4Q EjNcdsKOtaTwolLGOGYBEFSUTujAKFnKIcjoE8e2eWgnKxjIncsHzFodDVc869GPtwcm Fb0cJ/uPhgpfnge6mCkVHRoFItKBUeh6RYsFpSw9TDlTFFZQXU+cGVSgLEsKNSPTL0wk wfH5M/nB1+/q2siLJfWAnh+rG3RmG2v6Jkk3FWqEj6fD/rJjfBoW5uerhKOyIw0+v+VW eygo6u64oYzo+PMc8Nw3NAll1b+g3fQwEgpenun62EhgdX1QjopAc7kmnxHKcn6Sy4R6 iFYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B5Aj4slC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz27-20020a170907a05b00b006e82169527csi205885ejc.135.2022.04.05.19.27.16; Tue, 05 Apr 2022 19:27:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B5Aj4slC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1344898AbiDEMHN (ORCPT + 99 others); Tue, 5 Apr 2022 08:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244264AbiDEIvx (ORCPT ); Tue, 5 Apr 2022 04:51:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924EAD373A; Tue, 5 Apr 2022 01:40:40 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 365A6B81A32; Tue, 5 Apr 2022 08:40:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B006C385A0; Tue, 5 Apr 2022 08:40:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148039; bh=7wCX3eOKIpkxHj64CzX6+7Q6t9WICOqWbk2IYw7KeWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5Aj4slC65qcrfukHgnXoQy3Q2xO/OxP8ExQRugTZucQt3kpuGZKCzRk3pG26xXKF CujEeadlMgqfCTV+6HLxtAUTUwcw++MRLgDwTKyFPw0Opb9pTzHUGwSgFfz2UVUKU7 u0rIZgZlumYdVC4oqBzIu95Xnhw7ChBUbkIMhTuM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 5.16 0185/1017] xtensa: fix xtensa_wsr always writing 0 Date: Tue, 5 Apr 2022 09:18:18 +0200 Message-Id: <20220405070359.731782203@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Max Filippov commit a3d0245c58f962ee99d4440ea0eaf45fb7f5a5cc upstream. The commit cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr") replaced 'WSR' macro in the function xtensa_wsr with 'xtensa_set_sr', but variable 'v' in the xtensa_set_sr body shadowed the argument 'v' passed to it, resulting in wrong value written to debug registers. Fix that by removing intermediate variable from the xtensa_set_sr macro body. Cc: stable@vger.kernel.org Fixes: cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr") Signed-off-by: Max Filippov Signed-off-by: Greg Kroah-Hartman --- arch/xtensa/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/xtensa/include/asm/processor.h +++ b/arch/xtensa/include/asm/processor.h @@ -246,8 +246,8 @@ extern unsigned long __get_wchan(struct #define xtensa_set_sr(x, sr) \ ({ \ - unsigned int v = (unsigned int)(x); \ - __asm__ __volatile__ ("wsr %0, "__stringify(sr) :: "a"(v)); \ + __asm__ __volatile__ ("wsr %0, "__stringify(sr) :: \ + "a"((unsigned int)(x))); \ }) #define xtensa_get_sr(sr) \