Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2496849pxb; Tue, 9 Mar 2021 04:11:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFtAgnGq6fJUWKJli4CvJmPzfIKCGI0f46D8fFMdMzzkhPmlJ+gynqCnRCOTzxB5d52DtU X-Received: by 2002:a17:907:2bdd:: with SMTP id gv29mr19336706ejc.259.1615291861739; Tue, 09 Mar 2021 04:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615291861; cv=none; d=google.com; s=arc-20160816; b=tAYyi4M53FYoEl6SUuLgB9OA6smoVqyCLo1wbalLO8LKyN7noV2WniP3p57Nh6n6n4 SgVY9z1jCvbsFBU3I9J9/Aj3ZvAxKoi6KAMs8wChEwS2P6FKqQeMXy6H9QndWdjA0O+y 1HEpUuqtc6DPeee4M2Catbrg3OutMM+uGvz7s47VM5/r4hwfaiAx33rDTWHfgXas7dHa ETGpouj5D8Mra4nl5XoDsvqkdrqokPYrYuC1I9ZiXLw2FTNQFal6hFiOv3ExeGLGT43+ eLhV/4rBfGqz9Fnj+XOGYdVd0je0CQtxtcfXmPL3KUX5B6vB4m7pJYEIX9/Zer8pJyGG 0sTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:references:in-reply-to :message-id; bh=XquMXtwEhGmBELYKB1Na96wvqp9+T3djHoiO4QXSeYI=; b=xA63R25PEs20NDSA0EgtCEPlG0N6Kk0hril3XaEwrCblw5jqSClMuAAxS1Ntfa2awu C0aS9qgbWeThArgye4oqHH8L2t51WTs+s9yGnPJBQvvVVQPB/NtltPxXOIcJTiXXDheJ 6MSn1QxxBASTQJf5Nbx+ifFTSpkPD9jo7JMPqvkkkmejQh6UDLrA1fggIDVJ8qTEyleP vMxrjSakuB4KsOY39bBNojG1gZ0kIXzPuqSiOTsEQrS1Lk42lyTZFms0ullNMlcpKEou mk5qsgkM4/JVnxSSeEDUib6XwVQdOPdBcuVMU1b7ynVdxHWPjK7ok6SfSdJtZWsrfALn mhag== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bk20si9027599ejb.203.2021.03.09.04.10.37; Tue, 09 Mar 2021 04:11:01 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbhCIMJn (ORCPT + 99 others); Tue, 9 Mar 2021 07:09:43 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:53057 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbhCIMJc (ORCPT ); Tue, 9 Mar 2021 07:09:32 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4DvvC96L15z9tyjF; Tue, 9 Mar 2021 13:09:25 +0100 (CET) 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 wQHYjtF11liV; Tue, 9 Mar 2021 13:09:25 +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 4DvvC95RwWz9tyjG; Tue, 9 Mar 2021 13:09:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 278208B802; Tue, 9 Mar 2021 13:09:27 +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 YAi1Sz2wvQKq; Tue, 9 Mar 2021 13:09:27 +0100 (CET) Received: from po16121vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CF5988B801; Tue, 9 Mar 2021 13:09:26 +0100 (CET) Received: by po16121vm.idsi0.si.c-s.fr (Postfix, from userid 0) id A8C3067555; Tue, 9 Mar 2021 12:09:26 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v2 01/43] powerpc/traps: unrecoverable_exception() is not an interrupt handler To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 9 Mar 2021 12:09:26 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org unrecoverable_exception() is called from interrupt handlers or after an interrupt handler has failed. Make it a standard function to avoid doubling the actions performed on interrupt entry (e.g.: user time accounting). Fixes: 3a96570ffceb ("powerpc: convert interrupt handlers to use wrappers") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 3 ++- arch/powerpc/kernel/interrupt.c | 1 - arch/powerpc/kernel/traps.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h index aedfba29e43a..e8d09a841373 100644 --- a/arch/powerpc/include/asm/interrupt.h +++ b/arch/powerpc/include/asm/interrupt.h @@ -410,7 +410,6 @@ DECLARE_INTERRUPT_HANDLER(altivec_assist_exception); DECLARE_INTERRUPT_HANDLER(CacheLockingException); DECLARE_INTERRUPT_HANDLER(SPEFloatingPointException); DECLARE_INTERRUPT_HANDLER(SPEFloatingPointRoundException); -DECLARE_INTERRUPT_HANDLER(unrecoverable_exception); DECLARE_INTERRUPT_HANDLER(WatchdogException); DECLARE_INTERRUPT_HANDLER(kernel_bad_stack); @@ -437,6 +436,8 @@ DECLARE_INTERRUPT_HANDLER_NMI(hmi_exception_realmode); DECLARE_INTERRUPT_HANDLER_ASYNC(TAUException); +void unrecoverable_exception(struct pt_regs *regs); + void replay_system_reset(void); void replay_soft_interrupts(void); diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index 398cd86b6ada..b8e7d25be31b 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -436,7 +436,6 @@ notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs, unsigned return ret; } -void unrecoverable_exception(struct pt_regs *regs); void preempt_schedule_irq(void); notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs, unsigned long msr) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 1583fd1c6010..a44a30b0688c 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -2170,7 +2170,7 @@ DEFINE_INTERRUPT_HANDLER(SPEFloatingPointRoundException) * in the MSR is 0. This indicates that SRR0/1 are live, and that * we therefore lost state by taking this exception. */ -DEFINE_INTERRUPT_HANDLER(unrecoverable_exception) +void unrecoverable_exception(struct pt_regs *regs) { pr_emerg("Unrecoverable exception %lx at %lx (msr=%lx)\n", regs->trap, regs->nip, regs->msr); -- 2.25.0