Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp576104iob; Thu, 28 Apr 2022 08:09:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrlxeECbTBf/bR9IQJYb5WeU5WlvqBYEJOTRpJ5KITShInnCCy61JOoG7DOLwTPkh6NXl1 X-Received: by 2002:a17:902:8ec8:b0:154:5ecb:eb05 with SMTP id x8-20020a1709028ec800b001545ecbeb05mr34140963plo.56.1651158556750; Thu, 28 Apr 2022 08:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651158556; cv=none; d=google.com; s=arc-20160816; b=VjbWCl2JyDHXZrYEAapJhYXvmJiKOrW9q6bcivC63jq8+K2IQL8YtJ3XfVr315R+/s GQjAQwNfSiVaDUaKbNXgySzw8GXwBS9UjZlDC74rQfVe358eWJHvF3RlgmKIyStoW+CL Z1xdtNMYCj8mtkwPdgwk2+qm6f/DeDLS3NyyWokeTaFahdapbq+V8ZyzRW8vu6KOhLFV //9/Q4kuceUkkq7CwI6GJATZlGc6RjLDWUrPyPtVGDg/mmTGjZE7gxHwBJrpuhhgfd6S bKg5K86H6YgM914ZxLJ6GVTiSwEHQGkEZhgaFX+BtIhqcvCufyqNzo1HFkjyXPgyjKDp Z0jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=15uuhGv/OPXB6bT0a611P5P+RDtDVOr+ZkXn572bDjM=; b=wg4QQNint6SSaHMUZVUYpl2mLBETuv1gzBL20K/dRFApNwD2UqK7NvcNC3jL2Rm/+P 23I8VKbO14E2DfVDgfT3f0ZnM+nPpPWdTgrz3u9xukscD2WEHhHpUZIvIw4Eg7cr0isu 8TyURbI9VswJhzlWaSfW23DuYe4XJB9vvXr0qTcA6I6++KZIAcZv65F1/64Ij4cxbQmI Wfgr7cUlJumXU1Lq2Xlt2uRlw9u9U3NoUADMLnsn5cfgE6DjUXjg6Qib51B1XHky0OH2 jBOlacxsq5AqXzifUlDVIIro8xoSZ7ou/TWFaBhNqlrNgQCD6G8fJ+bgMBmlp5jwh5xY jUNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a65494b000000b0039905cd1790si4931530pgs.579.2022.04.28.08.08.59; Thu, 28 Apr 2022 08:09:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344869AbiD1JDf (ORCPT + 99 others); Thu, 28 Apr 2022 05:03:35 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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