Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1707844ybb; Fri, 29 Mar 2019 09:40:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3O8HtaiLiHS4AGCbAalDxmikrH4AizSFuz39dzSdCsrUIGAFf/JnOkBrq6L7gx0xm+7W6 X-Received: by 2002:aa7:820c:: with SMTP id k12mr24057187pfi.177.1553877642723; Fri, 29 Mar 2019 09:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553877642; cv=none; d=google.com; s=arc-20160816; b=a8CbWKMSllACiWYIdcdOmW4ajC0qb77B57IEnN8++NiYeS1o0taAyQpSnWphvyNSp6 g5epJJfzISfuCi9665RX38fIvy0ZPeiTfzGsoE3ZqnadCyr2uUX0JYdJfKNzWeU9oNRj T+G1KvNvd2MJ0Yir8VBMxB/K8oFZwTKFecAi/RjSyghsAYtA6/2OVefGMHvyt3QbqFDs TPV6qy//jgsxCpeqiM1MtkcPXYEXUsEDMvgLUW8ZXUvp+iGwY68/O5Rtejr7UXr2fsPf pj4tjVOkPcar8VRyungx7xYXozG50XP2/tJ7/zQIbYYUoiVgjCijJM4Jg5i/ngByDx2Y zTpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=a109k03KMwPFAs5u10vLKdRLKmIcCJ2dwFi67fYh9/s=; b=p40LxypOnIIy1dWwTexcrC24np6SAxAr4F2Y2gCdZGWv3MCUP4UkUFEKhSWU7xCHjX 6mJxRM7JSmw7KtZ2tUMjzYUi2IKwBiXIRD9ke7owf/KWu2zK8oGWF8Qts/eUlk8dEp6k YWfBo26ZLAIi+oyKlOitmmZI6E8tbFvADTiLEXADmRnejAU3C3YY0/dC/WJv+pfz0e6s scHaeUnHXEJ3RbpClFPtdp/lv/6xu+/quGYaPUtXLKRRrEuch6dSVKk4XuhK6yhcSO0o /mWzVq9O0kF643jsHz9RYnUjTrS1AaN2Q0bRNYplps/Pn5rw+dP6P22nnHSSvGM2LW+K 6jlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=lzI7Amhs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si2165823pgi.284.2019.03.29.09.40.27; Fri, 29 Mar 2019 09:40:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=lzI7Amhs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729984AbfC2QjV (ORCPT + 99 others); Fri, 29 Mar 2019 12:39:21 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:8276 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729838AbfC2Qib (ORCPT ); Fri, 29 Mar 2019 12:38:31 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44W6qn1qx4z9tyQZ; Fri, 29 Mar 2019 17:38:29 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=lzI7Amhs; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id nHak3OelUdlX; Fri, 29 Mar 2019 17:38:29 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44W6qn0dfQz9tyQP; Fri, 29 Mar 2019 17:38:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1553877509; bh=a109k03KMwPFAs5u10vLKdRLKmIcCJ2dwFi67fYh9/s=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=lzI7AmhsSd0gZOIGS2ZGFrDlQha6wGXVP6EwVy4f95xfsFakuf9i5uCGUx2PWoTvQ 3tXL+c8GU6eoH3JdBEUtvRJ/g/NYp5bK1H9jOIMxRdS0JnDt8c9EFR5PzWVk4BfWVI 91dz+dacXu8pHd7BYeJfPGz4kKhAG92CAG95GD70= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AB90F8B93D; Fri, 29 Mar 2019 17:38:30 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id nmleAuXyxHgz; Fri, 29 Mar 2019 17:38:30 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 91A0D8B938; Fri, 29 Mar 2019 17:38:30 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 7E41B6FC56; Fri, 29 Mar 2019 16:38:30 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v2 08/17] powerpc/fsl_booke: ensure SPEFloatingPointException() reenables interrupts To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 29 Mar 2019 16:38:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SPEFloatingPointException() is the only exception handler which 'forgets' to re-enable interrupts. This patch makes sure it does. Suggested-by: Benjamin Herrenschmidt Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/traps.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 1fd45a8650e1..665f294725cb 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -2088,6 +2088,10 @@ void SPEFloatingPointException(struct pt_regs *regs) int code = FPE_FLTUNK; int err; + /* We restore the interrupt state now */ + if (!arch_irq_disabled_regs(regs)) + local_irq_enable(); + flush_spe_to_thread(current); spefscr = current->thread.spefscr; @@ -2133,6 +2137,10 @@ void SPEFloatingPointRoundException(struct pt_regs *regs) extern int speround_handler(struct pt_regs *regs); int err; + /* We restore the interrupt state now */ + if (!arch_irq_disabled_regs(regs)) + local_irq_enable(); + preempt_disable(); if (regs->msr & MSR_SPE) giveup_spe(current); -- 2.13.3