Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp950982iob; Fri, 13 May 2022 17:30:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyMIssQEFpMdfY2q0Ui/zNZQy006bDh4hn79PXsTE5RWBiqE1WR7mgmAKJdmw87I1/o7cX X-Received: by 2002:a5d:590d:0:b0:20a:c3eb:2584 with SMTP id v13-20020a5d590d000000b0020ac3eb2584mr5681199wrd.18.1652488205164; Fri, 13 May 2022 17:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652488205; cv=none; d=google.com; s=arc-20160816; b=SnaM8ZsNXv1hTi3PVVB+p/ghns/qVMmYhGtq2oMF7P7/YlE0K7BY1Ll/kOL63OjlG2 OXDhgMurp3J0t0kDqEbQQ9EFFAftDAgDqg3Dd6AkzVKIaE/BoLL3ggtNsRdsGJA8tlmy vp5T1Fjvl7wWpuYehV2kUiaJWHP+9bRcteQDFEBhSY6XXVS9Y2XrLsLgmjTx+G9Brbl2 eTt3xdR4qJZZxGxcZFe4/HxHX/TJKpfMG7N3NuBCVGiyeySZyIyxuQ43EpEyuNA6/Vf4 Z0wHFdh6fbvLLcaOVt/KwBceAdhQpYD9Fezrb9EBVNErLPTAIdMA6uObDi++CBl51wpC BcFQ== 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 :message-id:date:subject:cc:to:from; bh=tnipLjsPkc1u1vjIo7BcOutGsuV0YGyxVXGC8rDm6Uw=; b=B/FC9lygIngh7/+4Mq/55gXmSz2JT57OzqIIiUEjlH5V/IZuA+oR/xWqsX9Nwjn3F1 ygVo71VZO2ci8d5eI2rYh96IAXlVBhDHjqTYVER3EZYKjGdG6cE2BhwAuo0H1BbnBQ9E reuEoEWxxck4JEPH/3asOfZ+TwJ5Kl4/DDqJULYjoRI6dhCMM8lWBc3CSvOEIBLbkWbV yvWQ1DBVRHXxa6GZ7gV/gGcBsDfl6masDmg3q8cl1UTJOJTBOqdOYyvmcGQamzyZMLte N+jPGN26Sm5p2FpsHYCBTjaNHnPoH63wAwGLYWgIhN7kkDdhmxEP25Cj3ZoirRWiCOOZ Quog== 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 e10-20020adfe7ca000000b002060b54c798si3054212wrn.959.2022.05.13.17.30.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:30:05 -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 DB4883053BC; Fri, 13 May 2022 16:21:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380452AbiEMMuj (ORCPT + 99 others); Fri, 13 May 2022 08:50:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380448AbiEMMuh (ORCPT ); Fri, 13 May 2022 08:50:37 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 065BA5007C for ; Fri, 13 May 2022 05:50:35 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:898f:2cf1:a787:bce8]) by andre.telenet-ops.be with bizsmtp id WCqW2700i4dF7tN01CqWBS; Fri, 13 May 2022 14:50:33 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1npUkY-0008XA-Cs; Fri, 13 May 2022 14:50:30 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1npUkX-0011on-En; Fri, 13 May 2022 14:50:29 +0200 From: Geert Uytterhoeven To: Greg Ungerer Cc: kernel test robot , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] m68k: math-emu: Fix dependencies of math emulation support Date: Fri, 13 May 2022 14:50:28 +0200 Message-Id: <18c34695b7c95107f60ccca82a4ff252f3edf477.1652446117.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 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 M68KCLASSIC (to rule out Coldfire) and FPU (kernel has some type of floating-point support --- be it hardware or software emulated, to rule out anything 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. v2: - Fix typo in M68KCLASSIC, - Improve rationale behind FPU dependency. --- 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..3d5da25c73b5af8a 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 M68KCLASSIC && FPU help At some point in the future, this will cause floating-point math instructions to be emulated by the kernel on machines that lack a -- 2.25.1