Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5990296rwl; Wed, 22 Mar 2023 05:14:26 -0700 (PDT) X-Google-Smtp-Source: AK7set++LeAifhEoqXQlZAQkYZX24kjgYISPB1COWME+WUZqZIX+4n7v4+EYTi/1yaTuDOJ76HwQ X-Received: by 2002:aa7:93dd:0:b0:625:caa5:67ee with SMTP id y29-20020aa793dd000000b00625caa567eemr2902246pff.19.1679487265972; Wed, 22 Mar 2023 05:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679487265; cv=none; d=google.com; s=arc-20160816; b=FR7i0K7K2KwAp4YVdoL1eyTjnIXfwWci5z/yUmS1DOnrtRuoVY/Ic8G8MHWe3TEHdh eiULmGsmvqNoatSuQHCBL9S0GDfjF0V7aK8eC5JRwDwpBWV2ztgoWbnZlG+z2Tjzl95j 7MElSLX0eN0YEZwNqeZZCR9VXtkcSX2539iUwEdsZVQ0NlvmaP+ZKt8vjKR8pWdio97i cT/R5bYPk5+pucl1N7YSD6LqX0UI1gOd9OzNPJrtmWBUMFK9MOw6qQsdLlhtpk16s1BH oGdZMU5qiQUwFQI0fcT3wHl5cj+aH+suyTDDn5xbxPaGeaIp/Xa7IhvAMBZf7GSFsWWN 6ZvQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cvY46fd0vZ13Q/NmQURfWfLe6EF0yiYVFhbjH7fFs7M=; b=Dg1JNkp5ajuD1ZkLgAawvsw4x8W2Qq6NSioHkNdX91Ln/u7apmisiBAB+KvMLyugvO movQqmB7sLe+06T0AXqo9H/5NIpAyvIy/SD32vgqJ6OVpj742c4fPJfeZy8rg5qbzMfB 9ECMPUS78HbEnT3CyWZM8wG4JbI2e9aGmh0lvPpfNmmFzNAzTfnWCkuLt0zs+0SaIfu8 wtxyTP2MpG4LF4O3Z7L/xWmDXwPqkWbQlzZrKtbTSHv6MIyQM/BYzzxG/TcP2dZMi+Ro +J6GdTYAfa0y8137HbBzivbaknThFfcBfnHZysgQqkrztGXpW9HbMCfhXVEtiyOirjNf EieA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Ingdh26u; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l187-20020a6225c4000000b005a8d09dbf4csi15079046pfl.226.2023.03.22.05.14.13; Wed, 22 Mar 2023 05:14:25 -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; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Ingdh26u; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbjCVMJ2 (ORCPT + 99 others); Wed, 22 Mar 2023 08:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbjCVMJ0 (ORCPT ); Wed, 22 Mar 2023 08:09:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F2D05D8B9; Wed, 22 Mar 2023 05:09:26 -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 ams.source.kernel.org (Postfix) with ESMTPS id D8135B81C6D; Wed, 22 Mar 2023 12:09:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5A80C433D2; Wed, 22 Mar 2023 12:09:21 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Ingdh26u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1679486960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cvY46fd0vZ13Q/NmQURfWfLe6EF0yiYVFhbjH7fFs7M=; b=Ingdh26uTgL+AN1fOvu35JFST2YniG3PTzJicWjc5W9yyYF2h60NUnVJR9UbDD2TPUGlAp u8i7dV2T/DOrIM8ICunWgluYNu4zVTlXuvh19Hgs6mw27Ysq1OCE0mSnSr2G/4YPV193zm jQbSRUFloY7TwDg99rgsNfJ3CCs+oXY= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 3165d7c0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 22 Mar 2023 12:09:20 +0000 (UTC) From: "Jason A. Donenfeld" To: Jisheng Zhang , Palmer Dabbelt , Paul Walmsley , Albert Ou , Anup Patel , Atish Patra , Heiko Stuebner , Andrew Jones , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, regressions@leemhuis.info, regressions@lists.linux.dev Cc: "Jason A. Donenfeld" Subject: [PATCH] riscv: require alternatives framework when selecting FPU support Date: Wed, 22 Mar 2023 13:09:07 +0100 Message-Id: <20230322120907.2968494-1-Jason@zx2c4.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 When moving switch_to's has_fpu() over to using riscv_has_extension_ likely() rather than static branchs, the FPU code gained a dependency on the alternatives framework. If CONFIG_RISCV_ALTERNATIVE isn't selected when CONFIG_FPU is, then has_fpu() returns false, and switch_to does not work as intended. So select CONFIG_RISCV_ALTERNATIVE when CONFIG_FPU is selected. Fixes: 702e64550b12 ("riscv: fpu: switch has_fpu() to riscv_has_extension_likely()") Link: https://lore.kernel.org/all/ZBruFRwt3rUVngPu@zx2c4.com/ Cc: Jisheng Zhang Cc: Andrew Jones Cc: Heiko Stuebner Cc: Conor Dooley Signed-off-by: Jason A. Donenfeld --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index c5e42cc37604..0f59350c699d 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -467,6 +467,7 @@ config TOOLCHAIN_HAS_ZIHINTPAUSE config FPU bool "FPU support" default y + select RISCV_ALTERNATIVE help Say N here if you want to disable all floating-point related procedure in the kernel. -- 2.40.0