From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72806CDB47E for ; Wed, 18 Oct 2023 14:25:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345536AbjJROZQ (ORCPT ); Wed, 18 Oct 2023 10:25:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345537AbjJROYk (ORCPT ); Wed, 18 Oct 2023 10:24:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1FD81734; Wed, 18 Oct 2023 07:14:49 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 698DBC433A9; Wed, 18 Oct 2023 14:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697638480; bh=3y+INbhGa5Cni+YLXOgTnyLoCKLzRHFRwdkvCaQUlgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tL8hheaX8mT32aFdiMB6fdLZtznu641SvAocJ8uy9lEwwCUO4vR1a2CN828Jok5Sl +3emF0DwN3RKJEflHT7vzI5XdSo5PIAoboREk2RxN1nYWq0mDrSNfhEuLwEHSR/u1C o6ajp1Ini8UDeo0mgHZ6N8k0dmUTTnmYRWRy44dZhqFPSv3V7unMjM0C7XNsI6j4+l rdwYLBSt9/Jq6qLCirR31XoYn7hov8mJvq3bF5EH8Baq2CsccNP31qXkNCL44esuzh 8DDPuOiZxvg+lmGUckX/0EqT4kzNIb0ax+CmVJGrMeoMgHCAjXg7jogCcrgjL3OK0D BH6319JtlLTzw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe Leroy , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.15 11/14] powerpc/85xx: Fix math emulation exception Date: Wed, 18 Oct 2023 10:14:11 -0400 Message-Id: <20231018141416.1335165-11-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018141416.1335165-1-sashal@kernel.org> References: <20231018141416.1335165-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.135 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit 8e8a12ecbc86700b5e1a3596ce2b3c43dafad336 ] Booting mpc85xx_defconfig kernel on QEMU leads to: Bad trap at PC: fe9bab0, SR: 2d000, vector=800 awk[82]: unhandled trap (5) at 0 nip fe9bab0 lr fe9e01c code 5 in libc-2.27.so[fe5a000+17a000] awk[82]: code: 3aa00000 3a800010 4bffe03c 9421fff0 7ca62b78 38a00000 93c10008 83c10008 awk[82]: code: 38210010 4bffdec8 9421ffc0 7c0802a6 d8010008 4815190d 93810030 Trace/breakpoint trap WARNING: no useful console This is because allthough CONFIG_MATH_EMULATION is selected, Exception 800 calls unknown_exception(). Call emulation_assist_interrupt() instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/066caa6d9480365da9b8ed83692d7101e10ac5f8.1695657339.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin --- arch/powerpc/kernel/head_fsl_booke.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 0a9a0f301474d..40687e271c106 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -394,7 +394,7 @@ interrupt_base: #ifdef CONFIG_PPC_FPU FP_UNAVAILABLE_EXCEPTION #else - EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, unknown_exception) + EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, emulation_assist_interrupt) #endif /* System Call Interrupt */ -- 2.40.1