Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4472444ioa; Wed, 27 Apr 2022 04:45:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2zJEACj+/ul3q6AkJZfWTKv6LvXOUHx2lT8qBwZy+HEj330qTlCMRHMMow7X8/ksI7Qkn X-Received: by 2002:a63:8c1a:0:b0:3ab:35b8:bb02 with SMTP id m26-20020a638c1a000000b003ab35b8bb02mr13159350pgd.546.1651059916260; Wed, 27 Apr 2022 04:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651059916; cv=none; d=google.com; s=arc-20160816; b=qsqjwIwnZnwOQZ9cuX9mxY8PAtIW8oPUB9WLm5KA6apwTLEWZgZ/C+cnqZtTVJMaF9 gfHSE5FDaXqBtFGyKYTq2OUUqus8IBmcZJqV2FNR3HdBEqokLi64JqIKzt+P8yqZlISd LXNWVON4wRCoBvO5I0A9Pruw3jePvgIgINQxzh5MdHCKSwAv6fvWNqzNhvOmXy2V6//6 bvuM6MzNfwaQBtIixPFiTawn675p2VD2f2FK+jnCk0AzLzgJMqD1B5XeraU+c4uiq/38 VLlktwXqE8oPyiu4EQ/5APt61Rr5bYcNQVTL5H/E5LrOJWJLJgY5SOea80eYywm1VwsS j/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=6+OL1bFgSt0cYdKBqH2y3nNAt6KZ0XoKK88a03YTTp4=; b=DDy/FGcRaIuBM4+9tXR66q/QCg8eKry1L2iOSrY0vNGib10J21GZrdsqz3ScKm6pXH s4ZQc14uK6HcX/V6/2c0dyt3OBPfswNxjEuSPFesocpDdQ2EhRufzPQsGKvS2NwgQHpR HPSc4P7+N68VJgV8pExHUe02SlsrYUgQwuef5bLhtml/q3ROYH0NbxLxj3cAFFQ2SOuY aN16AmB8Gh3j6LAQkdRYHudPyjc484S/TQpCo3FHYm08VPDYXJbNkM7h+eJkiSFush53 gnO4FmVR4SNEKNGQDzvg3SKnRq/Xw377AiR1AwyBjzAjzqeYE/wbscQ05hws3TwHpNPT coaw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e5-20020a63db05000000b003aad07ba380si1336781pgg.150.2022.04.27.04.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:45:16 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E1B6265465; Wed, 27 Apr 2022 04:03:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231364AbiD0LGR (ORCPT + 99 others); Wed, 27 Apr 2022 07:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231948AbiD0LFw (ORCPT ); Wed, 27 Apr 2022 07:05:52 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EEE08D17EB; Wed, 27 Apr 2022 03:57:36 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id E291E92009C; Wed, 27 Apr 2022 12:57:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id DE67292009B; Wed, 27 Apr 2022 11:57:35 +0100 (BST) Date: Wed, 27 Apr 2022 11:57:35 +0100 (BST) From: "Maciej W. Rozycki" To: Stephen Zhang cc: Thomas Bogendoerfer , 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=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 Wed, 27 Apr 2022, Stephen Zhang wrote: > Thanks for your comment. Do you mean the following code: > > if (0 && !0) > set_except_vector(15, handle_fpe); > > will be optimised away if !CONFIG_MIPS_FP_SUPPORT? Yes. Or more specifically the LHS of the conditional expression will be 0 then, as shown above, and the whole statement will be gone. > But we did get “undefined reference to `handle_fpe” error when compiled with > !CONFIG_MIPS_FP_SUPPORT. 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. Maciej