Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1011090iob; Fri, 13 May 2022 19:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6Y3jGAkNyYafHdCQIX66aa86PcvDGmZMU85Ax6dxJW5TGToHOSeNSeEEk1y1ujXPUTxhZ X-Received: by 2002:adf:d213:0:b0:20a:d703:154f with SMTP id j19-20020adfd213000000b0020ad703154fmr6350641wrh.604.1652495536372; Fri, 13 May 2022 19:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652495536; cv=none; d=google.com; s=arc-20160816; b=I7w/ZA1rbCV8eeCOYmvsjCY2HSLVVAQTF+LybSgRt8Th9plZWM2ANTM4yEp6iRIZuK Tnny31ZzeDULbYzzTBZn2zttjGlxeInJ8bl9imzeU9pGGz7/i0wZDk0E1ajLjo59sy9g 8wQSmqf0GtDWN+i5rZoWc5YKwJwdeAvii0J9uPgFxsVB9qsEqukeC7Q0cubumBaEx6cP lkjZlnjT6syTnQZMzwoFw1C2Xsn4dMilL0WHXs1cnLw6bVLAVi13w5vWBAmQ6X31fMt9 0PL+o2/HMbowbqGKYwksslQeYwqUlXgLQClaPeO6NtWjiZesdzOZFQle/8nxVcej30v+ cnmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:ironport-hdrordr:ironport-data:ironport-sdr; bh=0wpFFCg0FC3w/WXXenxBTPjWmxM6GVOdYVVd0b6bnaQ=; b=sE2tc0iAEvC9yMAFbOxI2JhMh+p9J/rVDj3CeLPtSzcCO8+GUnSMwN+7dNbyZMKxm5 G9Dm+DQdkqhtguS3ObsC2/eFKg1+ofZrC0b56A28NddMGxatkoCaVCWxWb2uOb52KiQK VTJEWeTUYBae13Ph+17BYVJQ4ao7zv7nfkXH21y8rJA8z8g/iLdzzkO595lZ+Krs4v1a UJ9PPk3Iyx67zu0RbjVh7vfBrjrLZpcxPzYcKPKX7N85lMo4AoAJnuaqQQMOVECSzv1s yjh7vSNDMCJrI2TxUNvGXfTZjyrKz0W46Qta0kRtEfYeUUmdOXunNg2dOpM37tEf55h9 eToQ== 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 h17-20020a5d6e11000000b0020ae06ebabasi3302190wrz.142.2022.05.13.19.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 19:32: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 C5EBB4E30F5; Fri, 13 May 2022 17:45:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354665AbiEMIGt (ORCPT + 99 others); Fri, 13 May 2022 04:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378046AbiEMIGh (ORCPT ); Fri, 13 May 2022 04:06:37 -0400 Received: from hfcrelay.icp-osb-irony-out7.external.iinet.net.au (hfcrelay.icp-osb-irony-out7.external.iinet.net.au [203.59.1.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 450644ECF9 for ; Fri, 13 May 2022 01:06:28 -0700 (PDT)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= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="5.91,221,1647273600"; d="scan'208";a="393644717" Received: from 60-241-47-72.tpgi.com.au (HELO [192.168.0.22]) ([60.241.47.72]) by icp-osb-irony-out7.iinet.net.au with ESMTP; 13 May 2022 16:06:23 +0800 Message-ID: <042eaca3-5007-d1cf-4fc4-ef02d1ecb255@uclinux.org> Date: Fri, 13 May 2022 18:06:21 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] m68k: math-emu: Fix dependencies of math emulation support Content-Language: en-US To: Geert Uytterhoeven Cc: linux-m68k , Linux Kernel Mailing List , kernel test robot References: From: Greg Ungerer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Geert, On 13/5/22 16:56, Geert Uytterhoeven wrote: > Hi Greg, > > On Fri, May 13, 2022 at 1:23 AM Greg Ungerer wrote: >> On 11/5/22 22:54, Geert Uytterhoeven wrote: >>> On Wed, May 11, 2022 at 11:48 AM Geert Uytterhoeven >>> wrote: >>>> If CONFIG_M54xx=y, CONFIG_MMU=y, and CONFIG_M68KFPU_EMU=y: >>>> >>>> {standard input}:272: Error: invalid instruction for this architecture; needs 68000 or higher (68000 [68ec000, 68hc000, 68hc001, 68008, 68302, 68306, 68307, 68322, 68356], 68010, 68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060], cpu32 [68330, 68331, 68332, 68333, 68334, 68336, 68340, 68341, 68349, 68360], fidoa [fido]) -- statement `sub.b %d1,%d3' ignored >>>> {standard input}:609: Error: invalid instruction for this architecture; needs 68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060 [68ec060]) -- statement `bfextu 4(%a1){%d0,#8},%d0' ignored >>>> {standard input}:752: Error: operands mismatch -- statement `mulu.l 4(%a0),%d3:%d0' ignored >>>> {standard input}:1155: Error: operands mismatch -- statement `divu.l %d0,%d3:%d7' ignored >>>> >>>> The math emulation support code is intended for 68020 and higher, and >>>> uses several instructions or instruction modes not available on coldfire >>>> or 68000. >>>> >>>> Originally, the dependency of M68KFPU_EMU on MMU was fine, as MMU >>>> support was only available on 68020 or higher. But this assumption >>>> was broken by the introduction of MMU support for M547x and M548x. >>>> >>>> Drop the dependency on MMU, as the code should work fine on 68020 and up >>>> without MMU (which are not yet supported by Linux, though). >>>> Add dependencies on M68K_CLASSIC (to rule out Coldfire) and FPU (to rule >>>> out 68xxx below 68020). >>>> >>>> Fixes: 1f7034b9616e6f14 ("m68k: allow ColdFire 547x and 548x CPUs to be built with MMU enabled") >>>> Reported-by: kernel test robot >>>> Signed-off-by: Geert Uytterhoeven >>>> --- >>>> To be queued in the m68k for-v5.19 branch. >>>> >>>> arch/m68k/Kconfig.cpu | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu >>>> index 16ea9a67723c09dc..9abddbbee819f1d3 100644 >>>> --- a/arch/m68k/Kconfig.cpu >>>> +++ b/arch/m68k/Kconfig.cpu >>>> @@ -327,7 +327,7 @@ comment "Processor Specific Options" >>>> >>>> config M68KFPU_EMU >>>> bool "Math emulation support" >>>> - depends on MMU >>>> + depends on M68K_CLASSIC && FPU >>> ^^^^^^^^^^^^ >>> Whoops, that's a silly typo... >> >> Are you going to resend, or are you thinking of changing the way this is done? > > I was going to resend, with the above fixed, and an improved patch > description w.r.t. the dependency on FPU. > >> I had thought that CONFIG_FPU enabled meant you had some type of >> floating point support in the kernel - be it hardware or software emulated. >> So I don't have a problem with this "as is". > > That matches my understanding, too. > > BTW, I'm not familiar with Coldfire FPU support. Does it rely on any > emulation (e.g. for transcendental functions, like '040/'060)? > Would there be any point in making the math emulation code > Coldfire-proof? I have never really looked closely at it either. The FPU is optionally present only in the v4 cores. But the operations looks like just the basic set to me, so I expect it will need emulations for transcendentals. Section 4.4.3 of the CF4e Core User Manual gives some guidance on the differences between the traditional m68k FPU and the ColdFire FPU. It would be nice if the code could deal with ColdFire FPU as well. For the most part it looks possible, but might end up a little ugly. Regards Greg > Thanks! > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds