Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6705780iob; Wed, 11 May 2022 03:39:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5/GhWfWnMkiAUz3rwYcFTcRysl9ThSZUeQNDYXbJ7iXBRRiU7QFW1EsiaDJtTR9RZSvGl X-Received: by 2002:a63:8ac9:0:b0:3ab:dab:16b4 with SMTP id y192-20020a638ac9000000b003ab0dab16b4mr20777232pgd.129.1652265598007; Wed, 11 May 2022 03:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652265598; cv=none; d=google.com; s=arc-20160816; b=h3qN8UbTKMkh0DJFa8QYClHkh5jhJJ0fhTSmNLUWO1r5OUSkXWboce9rdSQA5L7/C4 DMcD9vswk+RSEI7h3WQzfWJyXsnH3uEassmcyoXESDnnFTJADSQz3GihFEKUiD8/j4z0 pR/yRqT0F2FetCyBNTgBe2FrcmtrQPg+TMMvntK/9d6gQ9QLiR3KbCHgdg/JWWfJp+Rv tnmUwNYCX4a10/6Rr++T+qbm/OcLXrmxLwCz2QlcJ3qaD7WE7wrFaEN906sHpN0rjc56 bAsGQIEpyGjblMPQUkr86wuJt9ulZEYKvv8Pbx3e6+3hILlXd9UWarhjbSFkv15HVWpy 3WeQ== 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=MCSnj1RwZNMQMVThappO7eiA5L7zCEzrTlM6UnqqRE0=; b=ZbJPt9a9SC1fkZ2WFwimS3UPRKyS30HEg9syxAl9Htv6xnduR7GPHkyti1Cie7S83J zcoMugfCQVzRpT3ItcXjc8AV2j5e+nuKbVfr8m3dLxDKR6FwQ5yuDuyII0pEac1gZAh9 iZRnDcbrK/8FOZtRDtlqObEx+YtT76ZZgnBK9ZFvOp5UwNJa4z9WzolbZVXcFBpomdpB TqXBKP0jTT6S1AvkiqCdlWTkfnZHwi2E6Z9YSgnEkdRMoctDef+WTSuLJbZGctu6M/gp BlHX+6n/9ANj8l3/Pyr+ujmT+ptXyIVnQj/QrxRgyolhnZiBkgPObsoQGAhxObKiONWC sF9w== 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 lw7-20020a17090b180700b001d2dc5fc896si6868076pjb.64.2022.05.11.03.39.46; Wed, 11 May 2022 03:39:57 -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 S231828AbiEKJtk (ORCPT + 99 others); Wed, 11 May 2022 05:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235331AbiEKJtX (ORCPT ); Wed, 11 May 2022 05:49:23 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30A0F4ECC9 for ; Wed, 11 May 2022 02:48:59 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:c9c1:6ba7:bb0d:8433]) by albert.telenet-ops.be with bizsmtp id VMou2700f1sk9zo06MouV6; Wed, 11 May 2022 11:48:56 +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 1noixi-003iYm-3x; Wed, 11 May 2022 11:48:54 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1noixh-004bcs-3d; Wed, 11 May 2022 11:48:53 +0200 From: Geert Uytterhoeven To: Greg Ungerer Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , kernel test robot Subject: [PATCH] m68k: math-emu: Fix dependencies of math emulation support Date: Wed, 11 May 2022 11:48:48 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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 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