Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2148731iof; Tue, 7 Jun 2022 21:22:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1SVbwv94d4qOdTqLFYVDccLDSlW1H4Df/N678u6c96pFBCqNUckjPYOdGIqMUHY5HbdSu X-Received: by 2002:a63:1a63:0:b0:3f6:4513:44af with SMTP id a35-20020a631a63000000b003f6451344afmr28395732pgm.370.1654662153776; Tue, 07 Jun 2022 21:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662153; cv=none; d=google.com; s=arc-20160816; b=NfAfFtCqy4VxFVoRsuk8XNxujMxjGf1QaTck+bCXW5UWsGaDO35XJHznBXegBjYjd2 kLXg5/jJ3lE/rvm5K1cQ1JNLddJYtCO12Xa1lYSX7tdr68CaRNXpjHTBFvEakD3tDgn4 UBnSqjsylSb7/SZ65FrE+hhitw9kIC4IpoBkaTqY+Ph6KC1eJ9slGuEgkZXIe2aCWC0s OPn/BXlAj3jScHIHLPZn6ahh1VsI+nBp67GMH0QowOlD0ukY2ewdYB9E+bhv61wQDO49 20r9CRro7lPDaUZ1QQSkDyZEJMaYSusrVq3cCLyyOpLnxR5mxO/xv8gjl3XEjQ6C4lP0 78PA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2BWSFYOv52EJgEexrKWZbpZsHUubHS9PEFwkFg1vSHc=; b=qx1LUz5ET/uo74TGAma7JPDn/8Gj3sTWirwHZTRftVWRivYZ6+/UYfOSc8qLGfg/Xk 8zzBmNLjba8XXbkuf0iQwe0jmH91M3lamDLxPTVL3QHybkERC7twkEi+eeIo7CiTyfFL hukbAiX8HKsPZR/2qw1oW0gX13TBKBVsnH0M5lldb+SqZuKPrVwAPX4M/nFdyZtac4fY EvZ6WBqrTipjUjXrE12khJ+oCM0iNCYndIKZR46kIfUachJvEwwdsS86jtGF1gfXuzDg TfhY+C5j+yXXE8oShR9+9WuTrlmQgAR6jZvl3av3VAqRX9jxARZvHe5J6HeZnPGIhEDz vxig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CLWk7cqW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q132-20020a632a8a000000b003fccbc8a085si23349126pgq.782.2022.06.07.21.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:22:33 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CLWk7cqW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59184443E24; Tue, 7 Jun 2022 21:11:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386579AbiFGWtL (ORCPT + 99 others); Tue, 7 Jun 2022 18:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381432AbiFGVkn (ORCPT ); Tue, 7 Jun 2022 17:40:43 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EB88232A79; Tue, 7 Jun 2022 12:06:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 6CD4BCE249A; Tue, 7 Jun 2022 19:06:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BA15C385A5; Tue, 7 Jun 2022 19:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628813; bh=59IH4Hwdtk8/94TSVvLP0CH/Namlp4yfyGYO4itvuzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CLWk7cqWEYGDcSHKWfp/YMdXWxudUtX9RO1frUDUorn7J+sv0kYW7g9QM9h+qo58M TURaOpp1eZ1w80bbqEN9o1fndwkOUkq33GmDWXX4PlZ+7VWP7NVs71mwHgniBimR/f 9GScQI+MWiz+HSJRrRGecGEG1sheXF+9StENMFuc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Geert Uytterhoeven , Greg Ungerer , Sasha Levin Subject: [PATCH 5.18 466/879] m68k: math-emu: Fix dependencies of math emulation support Date: Tue, 7 Jun 2022 18:59:44 +0200 Message-Id: <20220607165016.403396588@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 From: Geert Uytterhoeven [ Upstream commit ed6bc6bf0a7d75e80eb1df883c09975ebb74e590 ] 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 Reviewed-by: Greg Ungerer Link: https://lore.kernel.org/r/18c34695b7c95107f60ccca82a4ff252f3edf477.1652446117.git.geert@linux-m68k.org Signed-off-by: Sasha Levin --- 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 16ea9a67723c..3d5da25c73b5 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.35.1