From patchwork Fri Jun 19 14:32:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223878 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11BD6C433E1 for ; Fri, 19 Jun 2020 16:04:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCFFC207FC for ; Fri, 19 Jun 2020 16:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592582680; bh=O6auuTkwi7vwrtwutuGHafNgr5U2Ux5oBVPZFBpv+P8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1qAK8suz77vdttmUUCDgsQqMdM3ScwikdAIL/nbhsIblAQ+kgnYUXIsTh7QENqf3H jg3WeU5CW9/lqXrFGhh/Qb3S6Yk9udbRRW6m2APrg4RIrjmlPaPAQQ8kV5YHyaHnqT oYRnSijHKTj9F34xAEOnbMWmQUKhVBJKzlR9hHc8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403794AbgFSQEi (ORCPT ); Fri, 19 Jun 2020 12:04:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:40862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392044AbgFSPKp (ORCPT ); Fri, 19 Jun 2020 11:10:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 BBE9E206FA; Fri, 19 Jun 2020 15:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592579444; bh=O6auuTkwi7vwrtwutuGHafNgr5U2Ux5oBVPZFBpv+P8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ozejsJtSmHvvgTYfrCARKS+zaueH5udRARFFar9M4b/SmESkYL5Ewml2QAyzr7FCz Ux+u9+nqQzrlWwGKggVcncaevIb71w8gq/P7AMdcAMagwlyfr2BAE1f7ISDsYVIshB PfWgVY15duJmxylWI7L1JTUQMp4bOkiQQVfEVZ+g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YuanJunQing , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.4 138/261] MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe() Date: Fri, 19 Jun 2020 16:32:29 +0200 Message-Id: <20200619141656.470536557@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141649.878808811@linuxfoundation.org> References: <20200619141649.878808811@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: YuanJunQing [ Upstream commit 31e1b3efa802f97a17628dde280006c4cee4ce5e ] Register "a1" is unsaved in this function, when CONFIG_TRACE_IRQFLAGS is enabled, the TRACE_IRQS_OFF macro will call trace_hardirqs_off(), and this may change register "a1". The changed register "a1" as argument will be send to do_fpe() and do_msa_fpe(). Signed-off-by: YuanJunQing Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/kernel/genex.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index efde27c99414..9c5f8a5d097f 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -474,20 +474,20 @@ NESTED(nmi_handler, PT_SIZE, sp) .endm .macro __build_clear_fpe + CLI + TRACE_IRQS_OFF .set push /* gas fails to assemble cfc1 for some archs (octeon).*/ \ .set mips1 SET_HARDFLOAT cfc1 a1, fcr31 .set pop - CLI - TRACE_IRQS_OFF .endm .macro __build_clear_msa_fpe - _cfcmsa a1, MSA_CSR CLI TRACE_IRQS_OFF + _cfcmsa a1, MSA_CSR .endm .macro __build_clear_ade