Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp750214pxb; Tue, 5 Apr 2022 21:41:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJVBtbfEB9Zjs5dKBjPkJZGQMyUg1ccf7elM5FWRxlGFY0+kIZJ+YTyNID/EZBTMtzbKZP X-Received: by 2002:a17:902:da91:b0:153:cc84:f13f with SMTP id j17-20020a170902da9100b00153cc84f13fmr6804637plx.38.1649220099493; Tue, 05 Apr 2022 21:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649220099; cv=none; d=google.com; s=arc-20160816; b=dLwzvEOaLhz2O8sdFe0DAYAxEjKgeobybJEe3+QYNJg5QVDz0yeDo8ZTf7uhi5Irur 13lAzYHrtGQc//DFG1DYV6OcVu9eNdibLcMDwQUoYGJ1bnyKfSDJFbI/vqv9qnMmdGvx klGo3/JavALp1hbwTA8OVAplT+jnaP5+frNw/13hsBWTDPv6j1HY6cbXTjPHe4ffw8Fb aB4KYTf3bPvkPbTaY8NHgCDQBD4Z6T91iTUkwYhI8e27a90hoDRC2RTPMe6HBMPA0Zyv vo4fiPgq4R8wj6JmlT1fVKCwMi6YDU2qQkP/1U5GaXZd1Dfu2DFB08IeF+9hVHHtt/Bj DQ/Q== 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=rcojf+ZyqBg+2KtZF8TD5v0PZH22i5ahFs/gL+xGHoRoyy8y+o/mtjc38gIYEgI4xj dvu+orwl+RIFy35GJYpfokv8rzg8M6qsDrm+Q/XldUYxfNHXU9d7B9XWoTIahA9BXV8C M/7dclzATLExGQ6SilstZS6zskj2UjbMW5T0RB3Cu7oaBBcBrZ86xkf9yY0OCPy90S62 799YhLV8/1VpWWbYHDLE6Kaut9LSWqymce6DlYvwE4NCSOmLNr6959ntLo/9V4ciMBWa aZt3CueAM5ZrJd2xxJ5rKC4lflPZb7GoPRfFMvp5Thp/VD1GTxBHiYuu6MhA83YO8g24 X60Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="GGo/3apM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y13-20020a17090ad70d00b001ca7bb4dc7bsi3795386pju.79.2022.04.05.21.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 21:41:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="GGo/3apM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 04ACEEEA4E; Tue, 5 Apr 2022 20:01:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236464AbiDEICX (ORCPT + 99 others); Tue, 5 Apr 2022 04:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233032AbiDEHwD (ORCPT ); Tue, 5 Apr 2022 03:52:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E97A99EF8; Tue, 5 Apr 2022 00:48:12 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9EB9E61714; Tue, 5 Apr 2022 07:48:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E223C3410F; Tue, 5 Apr 2022 07:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649144891; bh=7wCX3eOKIpkxHj64CzX6+7Q6t9WICOqWbk2IYw7KeWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GGo/3apMjiixvcKpEDBw1wZ4wZawrrMUPqKgpMnMvP2il6FCT2+YgaERkhnHlflL1 SIGLmR2AR+K3sf63M8rSxJX3BPRMcwDe946UsQsu6Olexq2qFA6lXkpLps4FEKoZf6 vh+nCt/hQs+cdI+ZA2fVnwNtLCtPUOxYWmhSiv6I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 5.17 0181/1126] xtensa: fix xtensa_wsr always writing 0 Date: Tue, 5 Apr 2022 09:15:28 +0200 Message-Id: <20220405070412.918334146@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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) \