Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp137262pxw; Fri, 8 Apr 2022 03:34:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdV8TZb67fRUn+ngWyhD7ErWHCN1mpD8ygvaJsgEPpn27qVHLAC9usJKdkPyqrizL+dN0d X-Received: by 2002:a17:907:6284:b0:6e0:f895:15a with SMTP id nd4-20020a170907628400b006e0f895015amr17761390ejc.713.1649414097879; Fri, 08 Apr 2022 03:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649414097; cv=none; d=google.com; s=arc-20160816; b=acp28PN9Yu9zdohpRBPKbqbFw6tqCLsqL4EX8PwwgPIA2+c8Z/mEvsW43thJ+a7Cd7 2bkc1eX5XgSUxttmtSesCPQX1Xw3/yGow69plTINriYhsQJ2K8ujL8dpFc4T/uRMWxY2 TkKxwVsshALjtdI3sv4b/FShtHnZIyWUmnXiSrOIsaePXIBLoOrkP3cdGV2KULTQsOmC wzG47yDRt3+tzTj2TOmh4ThYnr/YnqIG0X++BSJdwxcJckPaZBXV1Zbvu7g/W127bvbT gTlKWyUN4zOxTY/WI0bmAEwlvLJJWIlubUV2ctuFKYhU/ls7VTpbto6uflZJluP4iX3X jwfA== 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=JnMU2AE8TV9Kcs+133A5W6lO2gwAedaJThwKQdVZ8mc=; b=AJsBBWf2ILgctTQlMnDnJgF6q+eG9IEoxh4VKVpEsAkHJr+Btd0VXLhLiV4quBiVXy v7wno+5dOIPyuv5O3LinT68wjeMUsiAE4SrtULseoRJsbATL4yuVwSg190mLqsdwjpdA dfpHE956mBNs7U0Zd+7KRIifnYsAO457tPYMTuYzmLBVryZ9CJuZtYiIKtM2CYPSJXML eOJ3aKCDMP8R1pI+3BC66ycXD/69LU6uohrr1ksL/zQbu8U63b0Zn/AUXgViHe/6e/Dt UCYiYN8U/ziXMJ2za8kZSR8OwkarrtiUeatChPak/eUh/MqH8rZzyGJx/gIweFnrUCaK b3UA== 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 f19-20020a0564021e9300b00419d380ddbfsi746935edf.8.2022.04.08.03.34.33; Fri, 08 Apr 2022 03:34: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 S230192AbiDHJ0e (ORCPT + 99 others); Fri, 8 Apr 2022 05:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbiDHJ0b (ORCPT ); Fri, 8 Apr 2022 05:26:31 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7127719322C; Fri, 8 Apr 2022 02:24:23 -0700 (PDT) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nckqq-0002JW-3F; Fri, 08 Apr 2022 11:24:20 +0200 From: Heiko Stuebner To: anup@brainfault.org, atishp@atishpatra.org Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: [PATCH] RISC-V: KVM: include missing hwcap.h into vcpu_fp Date: Fri, 8 Apr 2022 11:24:15 +0200 Message-Id: <20220408092415.1603661-1-heiko@sntech.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR 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 vcpu_fp uses the riscv_isa_extension mechanism which gets defined in hwcap.h but doesn't include that head file. While it seems to work in most cases, in certain conditions this can lead to build failures like ../arch/riscv/kvm/vcpu_fp.c: In function ‘kvm_riscv_vcpu_fp_reset’: ../arch/riscv/kvm/vcpu_fp.c:22:13: error: implicit declaration of function ‘riscv_isa_extension_available’ [-Werror=implicit-function-declaration] 22 | if (riscv_isa_extension_available(&isa, f) || | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../arch/riscv/kvm/vcpu_fp.c:22:49: error: ‘f’ undeclared (first use in this function) 22 | if (riscv_isa_extension_available(&isa, f) || Fix this by simply including the necessary header. Fixes: 0a86512dc113 ("RISC-V: KVM: Factor-out FP virtualization into separate sources") Signed-off-by: Heiko Stuebner --- arch/riscv/kvm/vcpu_fp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/kvm/vcpu_fp.c b/arch/riscv/kvm/vcpu_fp.c index 4449a976e5a6..d4308c512007 100644 --- a/arch/riscv/kvm/vcpu_fp.c +++ b/arch/riscv/kvm/vcpu_fp.c @@ -11,6 +11,7 @@ #include #include #include +#include #ifdef CONFIG_FPU void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu) -- 2.35.1