Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp264331pxf; Wed, 31 Mar 2021 02:51:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz43LIZWBCSDwiIV+k5ulfaX5NFLxiMNm+dwP3fOlT109kcgrYOF5T3+7nkYNe+UD+lFton X-Received: by 2002:a05:6402:b31:: with SMTP id bo17mr2592476edb.113.1617184294766; Wed, 31 Mar 2021 02:51:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617184294; cv=none; d=google.com; s=arc-20160816; b=g+c2entSUVLdsJMxIXShYX3VoWYc40Q+iq69QY6CqlD+cvhphISueVJ69XJUdRAicJ 4k0G7dXst3YNmkuQBCGwqwvGMccBMHsJJhstJCHfe9KIsycI9xpSwGxe77dHZUOHNLpY FVuBi/qbv/ZSAtQoj6gD3MZi1B01IDXQCU4cJq+gTPaZgB83K9bh7ftd30SC78TxK0Rr xtPTZ+Kqh4u96W/ogzopPD2vAae6LlbRpCXk2xeyQGejw8Rx0Q62PmSveIWGNx4VC+YF /MUbvAp6Jktve2JPif31zcRDVXBkomElSxNrOntsbaHuLcyD8EhgCwjjeT/eOPcMI6q2 oOcw== 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=wGVSB8+Icc8AMqAGz4Sul5lEPlDf593m+hWnmgOtJzA=; b=Q5vDPGQh5soOFQ5L4DzZwzFaoh8o/HSMbR7pgTkSndlQ3KThVLWRWmJ1vcqEnkfDyP m3g19XMuuAw63JcPiiUPTrX8kS7aFSNoJsXGY+VOKpb8rMB6iOXm3I8+m+a7lqx+VYZG Ii93Y3eg/sGHsoKQ5iCfUb8ld/QXV4Inx+K05Cur7KOBZkbJW65kfILBtVQQMNKK3gWN dJh0qa8yGfo7OdKt60jhJ+pX+Tr+pEaRXx1bhUQpvKMPNoybNekFgfCNR9Y0oFWrq7tR CNVHOzj0W3rZjJQErV7D/l1BLULJSXTIB9M1922Ov1oPTH0qm5Xi1bxYdBFiBD9Aq68s i5Ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si1229843eja.266.2021.03.31.02.51.11; Wed, 31 Mar 2021 02:51:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234378AbhCaJrx (ORCPT + 99 others); Wed, 31 Mar 2021 05:47:53 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14977 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234622AbhCaJr2 (ORCPT ); Wed, 31 Mar 2021 05:47:28 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F9Lyn47SwzyNCy; Wed, 31 Mar 2021 17:45:21 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Wed, 31 Mar 2021 17:47:15 +0800 From: Xiaofei Tan To: , , , , , CC: Xiaofei Tan , , , Subject: [PATCH RFC for-next 1/1] arm64: sve: Fix some compile errors about sve_cond_update_zcr_vq Date: Wed, 31 Mar 2021 17:44:39 +0800 Message-ID: <1617183879-48748-1-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are some compile errors of ARM64 KVM when ARM64_SVE is not selected, in the locations of sve_cond_update_zcr_vq used. One error log is as following: CC arch/arm64/kvm/sys_regs.o In file included from arch/arm64/kvm/hyp/vhe/switch.c:8:0: ./arch/arm64/kvm/hyp/include/hyp/switch.h: In function ‘__hyp_sve_restore_guest’: ./arch/arm64/kvm/hyp/include/hyp/switch.h:220:2: error: implicit declaration of function ‘sve_cond_update_zcr_vq’; did you mean ‘kvm_pmu_update_run’? [-Werror=implicit-function-declaration] sve_cond_update_zcr_vq(vcpu_sve_max_vq(vcpu) - 1, SYS_ZCR_EL2); ^~~~~~~~~~~~~~~~~~~~~~ kvm_pmu_update_run The root cause is that sve_cond_update_zcr_vq is not defined when ARM64_SVE is not selected. Fix it by adding an empty definition when CONFIG_ARM64_SVE=n. Signed-off-by: Xiaofei Tan --- arch/arm64/include/asm/fpsimd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h index 05c9c55..3f93b63 100644 --- a/arch/arm64/include/asm/fpsimd.h +++ b/arch/arm64/include/asm/fpsimd.h @@ -168,6 +168,8 @@ static inline int sve_get_current_vl(void) static inline void sve_user_disable(void) { BUILD_BUG(); } static inline void sve_user_enable(void) { BUILD_BUG(); } +#define sve_cond_update_zcr_vq(val, reg) + static inline void sve_init_vq_map(void) { } static inline void sve_update_vq_map(void) { } static inline int sve_verify_vq_map(void) { return 0; } -- 2.8.1