From patchwork Fri Jun 19 14:33:05 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: 224242 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 6C7B0C433DF for ; Fri, 19 Jun 2020 14:44:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4119D217A0 for ; Fri, 19 Jun 2020 14:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592577874; bh=zxO3PJAGsSjLXfupDU1pE86A7dJoZAUO53XBAIcTWFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jPtGzxcGoFlANDen2NL2RpHuzxHwltNBdWmxI/1dhMKOh50vXUHAh3pUy0NtuZMLC C7LjhRF0T30WUR2zcLeetOlTS8PUOI7Esm365F7BwItnaaqxgGC+/t7kXq5eV3Jon1 +KTXx8IKcVB3NJ4mQxvb/xxR5Dv9MflAprQeNUz0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388571AbgFSOo2 (ORCPT ); Fri, 19 Jun 2020 10:44:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388569AbgFSOo0 (ORCPT ); Fri, 19 Jun 2020 10:44:26 -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 1FB4121556; Fri, 19 Jun 2020 14:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592577866; bh=zxO3PJAGsSjLXfupDU1pE86A7dJoZAUO53XBAIcTWFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UVNsMWNxS+dDdFQJ91Gy/Wb8TWE8wkmk49SebVyHCvmraZMr6tFrQPwvfeXfGEOFE hHS0jscEzxiy/DfeDjBK26Q7kXkVxvERGHMR1g7z8sooya9v5ng9Zh92pvtFTytX4L 7o63u2cxp83yKhW7V3T7zg4+OV10xskZ+8SXCvWs= 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 4.9 091/128] MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe() Date: Fri, 19 Jun 2020 16:33:05 +0200 Message-Id: <20200619141624.951536256@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141620.148019466@linuxfoundation.org> References: <20200619141620.148019466@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 ae810da4d499..59ed811eb32a 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -429,20 +429,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