Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp402779ybm; Thu, 28 May 2020 05:54:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIqHqqZL+YwF1zUcZUAuBEmZDs5MLbS3/1KYAiy7LPD9KB7GwPXuJ4PpOOFIZZsjm1LqzC X-Received: by 2002:a17:906:144e:: with SMTP id q14mr2888494ejc.450.1590670486954; Thu, 28 May 2020 05:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590670486; cv=none; d=google.com; s=arc-20160816; b=xE00TYrAQZmmXatFT4mWdWf/bOfa/+i95ZbVhIGIXdSfKwM/e5QinnRl+gWnbgN+Zr YD7RF3Mbq2tfVkJc5qbNJFbLKJd+MC7kPogQoad55gTb/jME46Lq+mblbWOla4H5WQNP 5EF+xN4w0RX8X+FFEm8qYHGkz4g3edPrL4uiF4OSkNJJyVn0YESQP8bl36iiDAuB2hwR IU2ne79tmpZpr61DxqJINm0pelZ4oRCvhQnkr8H6V/NXCNawx25OZUAOQ3+nVCpGlnJT 9uzmQO7HZruJNw8brd4GQSRTUHI/rZ47sLUcYlMC4XSdFt6x+tno9qybzj8a8jlWhRqE 8IHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=tqB8gk4cBM9ljJdG5yYuMl1Lq4aOSsx4vGFhMHDPSCM=; b=ylxD0EIT5d3xsdG2Wkd+HC14aq6f14TMi5YxS+MkbyEVEONgbVu7nKNY/7zdM8BYq5 0L9vFe9qx8y6u6TjeVR6JWT12FslWJLqccCJSUNw2lqtNwWONpP2z0kbP+G6qAYf5aet Ke5USgb+2UjuN6I8Jtz8n6q3rYaaSU/xqb84+T1ZvrTEDsZLIaO0esMCXh2OC9MnwKy6 Br8EKX54FTTJBIfIhmDwzSGlF/d9w4ZF7b+prh4rAct8JctN97If8cDO0yY9+6B+baFN IkhfgKj3e1jQzr9md9CATVeHGAUmA63+o/n8EqFAM/B3WudjIyPISqN+c3ZVGmtlQ0np aRjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=N76C7rWq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id no5si3898197ejb.204.2020.05.28.05.54.23; Thu, 28 May 2020 05:54:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=N76C7rWq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390055AbgE1Mul (ORCPT + 99 others); Thu, 28 May 2020 08:50:41 -0400 Received: from mail-m974.mail.163.com ([123.126.97.4]:42324 "EHLO mail-m974.mail.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389871AbgE1Muk (ORCPT ); Thu, 28 May 2020 08:50:40 -0400 X-Greylist: delayed 911 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 May 2020 08:50:38 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=tqB8gk4cBM9ljJdG5y YuMl1Lq4aOSsx4vGFhMHDPSCM=; b=N76C7rWqeSGnMroCARmECLiTW8NNwvYqCh Ip1lki2CadzBviG5ECsSPG/mb64rZyn3h3RZoU0LGuW3+dHIak3CWfvXU5FnFSMX MTNQYCuyzrewpedCQkBd9QJ5UCz0jN2JdpN1c0QcEGYT01N9yH9OREpXsvFhSXQQ PT1veE+nQ= Received: from localhost.localdomain (unknown [124.64.18.22]) by smtp4 (Coremail) with SMTP id HNxpCgC3Qs37r89emFSaBA--.109S4; Thu, 28 May 2020 20:35:13 +0800 (CST) From: YuanJunQing To: tsbogend@alpha.franken.de Cc: paulburton@kernel.org, chenhc@lemote.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, liulichao@loongson.cn, YuanJunQing Subject: [PATCH] MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe() Date: Thu, 28 May 2020 20:35:05 +0800 Message-Id: <20200528123505.4219-1-yuanjunqing66@163.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: HNxpCgC3Qs37r89emFSaBA--.109S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7XrWUurykKF4kZryxur4xXrb_yoWDWrc_Kr 42v3yUKr15CwnxWr17tw4rW34Ivw4SgF9IyFyvvw1ayr45Wrs0krWvg3WkXwn3Wr4SkFWI y398G3Z2kF1xtjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjT5l5UUUUU== X-Originating-IP: [124.64.18.22] X-CM-SenderInfo: h1xd0ypxqtx0rjwwqiywtou0bp/xtbBUQEyXFaD7QftBgAAsq Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 8236fb291e3f..a1b966f3578e 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -476,20 +476,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 -- 2.17.1