Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp978739iob; Fri, 13 May 2022 18:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyijKGVDDA1v7vOnLbF354DNBaq4wUzhYE/gAYYFkawAEMBlgPk9HEVOaKHCsmuA+c2mPvM X-Received: by 2002:a1c:5459:0:b0:394:1191:a1ff with SMTP id p25-20020a1c5459000000b003941191a1ffmr17180839wmi.96.1652491423062; Fri, 13 May 2022 18:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652491423; cv=none; d=google.com; s=arc-20160816; b=kTRMuyW5U30iUqOv3p0C6VEKVdT0VSjceZQWaPCRETBpfZPgcnH1NUeT4qYdaPHmwu qX1F2EERS6HAW4MowhE4GYmtaHr/3WlDGZaOKYUYXXs7cSCrpsKXrLXRJNjFW6uswiUb oGLEU5m5dGM45nEzAKvZzvxlfj0gDSykFsD2mMDy6eqZ/ODhvNQVlpODrkISWjhCOVHp yq0YG7hHKGTCM24lw0tj7X+WG/5MXQdoEEdDrboXQuhvm6Ik3gAN92E+bTS2z6ek9duT LggmSPm7WPp1Z8B+u/TLqlRSiBTVb6uJHHMcE/lgU4us4phe+6JkxLSMndffF3rD7nlQ 5toQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=z/e6f0Mt2DbPOZqV7TAZ2gEtUo09O6Lm8pggIEaLHOg=; b=mi0pk6pYp7Lu3TQNz8D/BIyoikly+xEE7HUp8USHWl0EL4aLY7LpUCSrIf8rGjdB5b NoWA7XWO8x45ovWD7jFcHh7TD/n+x9RPzW7CNj/coBE3oXETZJWAGO/yrXefC9P0/C+F D6dN8NHuzlF45m2u6U5yWvlzR417ZcP14Kd6pN+wtlO/Qv/dsf/vA7xYQmEWrEDvcNg5 b2O6Sff6F/srCxzC990UH17lgg7/HMZKccN0+ObXsOEB0smIlx3EQ4VNum8v9u5QRy5B 4Qqaz5uo+J6cG7oAhtPbnxqQydllfHpNu+ByE+PHSnGGnmbJJb2iPmBmazSoDAdTe7+Y G3gw== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h10-20020a7bc92a000000b00391d0fe63b5si6522807wml.133.2022.05.13.18.23.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 DFABC3D54A2; Fri, 13 May 2022 16:53:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377554AbiEMG4w convert rfc822-to-8bit (ORCPT + 99 others); Fri, 13 May 2022 02:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377551AbiEMG4s (ORCPT ); Fri, 13 May 2022 02:56:48 -0400 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DF3F4D278 for ; Thu, 12 May 2022 23:56:47 -0700 (PDT) Received: by mail-qk1-f182.google.com with SMTP id z126so6471501qkb.2 for ; Thu, 12 May 2022 23:56:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=A3H48Bilaow1oSqwuU8KPx26Mv8fSUb+Kt8mYEoS3qk=; b=MCop/csKcJHnOtYdrU7ZqDmq0z8SILRa0+XTcJSgadOv5zcmcKOEsQJRWxMm+CjzyV RksROO/2/XpvNEsYO/BIoC4j6TtYU4jwT1MQ05dRcRJfv4Zc7rlJ5U6oI9xHMqvkAdmY IfFZm7JKIo0AthQ4u2M6LXC181Vyc/Amn57qvpBz+0n97SbnYAr9s2IoOQPeuJ5D9Bnr Ms2MQlNvLWsQCT+I8SKjHvWH/ZUAz5BIQSEPLexP3ztThb1kjC02HwIovBosmN/9zrhF 0qCkpBo+vqGKqiNbDDNfvzkHaquVHh+1AXGQ/mtamasGmQd0rjtETKS/xUtKmebfnegY aZtA== X-Gm-Message-State: AOAM532zXPiUVjYRUl+kW2AStZI8eGKmvygKtMFtxAN/zu97+K6kgWnt lsvvtYuUHxL+7kfRQ3H2TdEivEf6P3pPQw== X-Received: by 2002:a37:658f:0:b0:69f:d94e:46c4 with SMTP id z137-20020a37658f000000b0069fd94e46c4mr2578067qkb.52.1652425005943; Thu, 12 May 2022 23:56:45 -0700 (PDT) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com. [209.85.219.182]) by smtp.gmail.com with ESMTPSA id v6-20020ae9e306000000b0069fc13ce23esm920506qkf.111.2022.05.12.23.56.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 May 2022 23:56:45 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id x74so1078536ybe.4 for ; Thu, 12 May 2022 23:56:45 -0700 (PDT) X-Received: by 2002:a25:4506:0:b0:648:cfc2:301d with SMTP id s6-20020a254506000000b00648cfc2301dmr3267840yba.380.1652425005199; Thu, 12 May 2022 23:56:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Fri, 13 May 2022 08:56:33 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] m68k: math-emu: Fix dependencies of math emulation support To: Greg Ungerer Cc: linux-m68k , Linux Kernel Mailing List , kernel test robot 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,T_SCC_BODY_TEXT_LINE 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 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? 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