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 054F6C433EF for ; Thu, 28 Apr 2022 09:00:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344579AbiD1JDi (ORCPT ); Thu, 28 Apr 2022 05:03:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344564AbiD1JDd (ORCPT ); Thu, 28 Apr 2022 05:03:33 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 811752CC92; Thu, 28 Apr 2022 02:00:14 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 7D96092009D; Thu, 28 Apr 2022 11:00:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 76A8C92009C; Thu, 28 Apr 2022 10:00:13 +0100 (BST) Date: Thu, 28 Apr 2022 10:00:13 +0100 (BST) From: "Maciej W. Rozycki" To: Stephen Zhang , Thomas Bogendoerfer , Joshua Kinard cc: liam.howlett@oracle.com, ebiederm@xmission.com, dbueso@suse.de, alobakin@pm.me, f.fainelli@gmail.com, zhangshida , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe In-Reply-To: Message-ID: References: <20220426083259.526685-1-starzhangzsd@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Apr 2022, Stephen Zhang wrote: > > Please send me .config causing it and tell me what compiler and version > > you have seen this error with. We rely on things being optimised away > > heavily throughout the Linux kernel, so this is certainly something to > > investigate. I have built such a config just fine, but maybe there's a > > bug somewhere my setup does not trigger. > > Okay. The compiler we used is: > > Compiler gcc > Compiler version 10 > Compiler string mips-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 > Cross-compile mips-linux-gnu > > the commit id of kernel is c00c5e1d157bec0ef0b0b59aa5482eb8dc7e8e49 > > and the .config file is sent as an attachment. Thanks. The bug is in arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h, which has: #define cpu_has_fpu 1 (and similarly arch/mips/include/asm/mach-ip30/cpu-feature-overrides.h). This is not supported, as noted in arch/mips/include/asm/cpu-features.h: /* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */ Perhaps we should explicitly undefine `cpu_has_fpu' if set to 1? Maciej