Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3775761iob; Mon, 2 May 2022 05:32:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye6L3ba812ZkRozKEJIa3VDLENVdQqXBekMxEcr59mh9MghuIXejEr6ugEbF2vD1nsJq6Y X-Received: by 2002:a17:90b:384b:b0:1d2:df41:3213 with SMTP id nl11-20020a17090b384b00b001d2df413213mr17927431pjb.164.1651494734842; Mon, 02 May 2022 05:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651494734; cv=none; d=google.com; s=arc-20160816; b=RA48CcFi2nd3iBeFHkrIs1kUAjIBcowHxAxfMfPj14qHRF5jAjFAU7p/Ci0P1H4C5a gSLsHqUdW/vN3vZ/4wE7lz3oguQCHr7AJHjJEejZf7PZZKZNe9/SYlwCBhdY3IO+OSnx QlFamJr4Le/AIIS40C+jDboIWwTGI9FPs8lI5Zzaa6lguAl6kqDDlMBR2yDfqvIfnU8U WBZaWHJJ0i8ukY/tywmI0Am3zVJhEgj6f3xNFyp7wXpeNMcnQITX2S6xbZ3Ln7ceoyYM /1UQR9gmsZPUEwENZxTHZwH+bBw3D1Z34z3BmiflW1W8Dmo+KhXva7CDhsfG6Ohu9jGT SGhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jTBf3JnlEGv6Rwgiqqp1qo3XczPMi7+G8xEhV9gaE9M=; b=z+jGJQ1refVkQrbC3XNQowkjtObNySNYKwyFYCV3ou6bGTo7/qDpw1xh6iI4/Zu8n6 mpYbOC21PorRxtiHyngStpsGvl4sFCnsh0PFc4uEPcEqlvUvlawbq6HpRm2/YIdc8hAU NAU2rxT8V9qBfIWcD+E5b6nassYZXBBGTrsQfzKglIhZN6SrhfNBUE0D0Tjpccjv0BEJ KBl5uYmbw3WaAygaaiuuao8eCNEHOkKDmaaQi3EuJ2fOdNNB0gaxujA0u19FMsEjzjuY QXCrI0qOQAwmooCDjo6Di5hjK0vy22NP9XFc+1quWuLhXPYxxKpeUggAo0M25aqFd1sk EK7A== 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 w8-20020a17090a028800b001cb63b8d659si16649977pja.60.2022.05.02.05.32.00; Mon, 02 May 2022 05:32:14 -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 S1357203AbiD2KFL (ORCPT + 99 others); Fri, 29 Apr 2022 06:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234948AbiD2KFH (ORCPT ); Fri, 29 Apr 2022 06:05:07 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E66F7A9B1; Fri, 29 Apr 2022 03:01:50 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1nkNRW-0002HQ-00; Fri, 29 Apr 2022 12:01:42 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id E124FC01C9; Fri, 29 Apr 2022 11:51:04 +0200 (CEST) Date: Fri, 29 Apr 2022 11:51:04 +0200 From: Thomas Bogendoerfer To: Stephen Zhang Cc: liam.howlett@oracle.com, ebiederm@xmission.com, dbueso@suse.de, alobakin@pm.me, f.fainelli@gmail.com, paul@crapouillou.net, linux@roeck-us.net, anemo@mba.ocn.ne.jp, zhangshida@kylinos.cn, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, "Maciej W . Rozycki" Subject: Re: [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is overrided Message-ID: <20220429095104.GA11365@alpha.franken.de> References: <20220429032621.674865-1-starzhangzsd@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220429032621.674865-1-starzhangzsd@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,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 Fri, Apr 29, 2022 at 11:26:21AM +0800, Stephen Zhang wrote: > From: Shida Zhang > > Undefine and redefine cpu_has_fpu to 0 when it is overridden with > the "nofpu" option. > > Suggested-by: Maciej W. Rozycki > Signed-off-by: Shida Zhang > --- > Changelog in v1 -> v2: > - Choose to redefine cpu_has_fpu to solve the problem. > > arch/mips/include/asm/cpu-features.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h > index de8cb2ccb781..38eb469008b6 100644 > --- a/arch/mips/include/asm/cpu-features.h > +++ b/arch/mips/include/asm/cpu-features.h > @@ -134,6 +134,10 @@ > # endif > #else > # define raw_cpu_has_fpu cpu_has_fpu > +# ifndef CONFIG_MIPS_FP_SUPPORT > +# undef cpu_has_fpu > +# define cpu_has_fpu 0 > +# endif > #endif > #ifndef cpu_has_32fpr > #define cpu_has_32fpr __isa_ge_or_opt(1, MIPS_CPU_32FPR) > -- > 2.30.2 I prefer just removing the #defines from ip27/ip30 cpu-feasture-overrides.h. Or isn't that enough for fixing the problem ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]