From patchwork Mon Jun 20 17:51:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 583191 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp933124mab; Mon, 20 Jun 2022 11:18:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uARl0wAqhAL90cFnIhQ1C/2Xhue3hVLq35ioTJ0Ni4bl21Z0t581IBnkGfz8gkEtwE2Mul X-Received: by 2002:ad4:5bed:0:b0:46f:fd6:9ab5 with SMTP id k13-20020ad45bed000000b0046f0fd69ab5mr14150271qvc.17.1655749121755; Mon, 20 Jun 2022 11:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655749121; cv=none; d=google.com; s=arc-20160816; b=vrMrsLaIreBhDSn4cI6l31OYdW51vN99RaXxbe7GrtRjY0ENBD0ujYW88NU7vmHYvt NVAgo3uiOWufEuq7CK3iSGvHLzO7VzReVVhTcgWOGLLY/MRusvjmQYa8Q1PrznIqFOqI Zdl+MOszGsEhHhKJrgRyRylhhecH6nF3BiEF22v8HFztnLLtkGEDpy7ZBi9NJF/5WLQ/ RAfjfZ9bHEvhJT9g4zgUYx5xzJj5woFM/feC0sCwOFpFnr9UMdlMsKbNTFxKet06PP8z q7Ww/uGNG+jTNc2cW9en9bOptC0G7JxDK/ox4zyHZksMTbVGYPkmBzf8SEih3AdEcmJh IclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Zqd1McNM5D2fBRbn3StkKgKGGJ4F/qdBrurXM1jISUg=; b=rIo1t/AUOgVP6frRfeRKz/tUvvizUXmcZAsiwcGzpDxcQ5WiFQspDtHqUe+qesgOh7 QhgBluHtQeu6SJC9l1HqpcZAt51BLqjsRPTG3vzOgAWSXN4Fr5yhncp0YQJwnAj88Z4i sdsfIpdykEllW17KFPxhhJvJv0F1xouBEZNg9MrQ4ya/IgunKx4QGlO2Pt+4RUBuRzqU /gCipR3vnT20bgxkIr+qTnAroHKD+nlCiR2oDW1Pp0uRk7Y5XpHDaDtw8pDtDOQ8OMl9 cPn5uml9ijGETPnRC7IW+Q0Ly9YYCf1zAaYX8nWGg2jQ74Uspi/Rmykim1arrjR1euDC P6YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sZZqb05L; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h3-20020a05620a244300b006a53b28d73csi9958576qkn.35.2022.06.20.11.18.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Jun 2022 11:18:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sZZqb05L; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3Lyz-0000Qp-3a for patch@linaro.org; Mon, 20 Jun 2022 14:18:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3La1-0005wX-Fj for qemu-devel@nongnu.org; Mon, 20 Jun 2022 13:52:53 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:37639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3LZy-0001NP-Ew for qemu-devel@nongnu.org; Mon, 20 Jun 2022 13:52:53 -0400 Received: by mail-pg1-x530.google.com with SMTP id h192so10896574pgc.4 for ; Mon, 20 Jun 2022 10:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zqd1McNM5D2fBRbn3StkKgKGGJ4F/qdBrurXM1jISUg=; b=sZZqb05L7zDr93Qf5Rl6MxSUx+E3E4dOSgNXdo4x6Ju22a9BTa4/2+MfoRD4iCLlZq nRCKVNas0EKKKianNUqnTsqNUov4ViaO7gFyMoNwYT7g464hoCsrhOnLGAWVrJ7cc19I maxUMLTiBwzZfp/0GTDNGMYVEq7AkPtyApJlrGMDbzawI+fd452oX0mu5YVoGZseOFBh kWegP/kRzjd/KHYcT9RvKxf/mkCNRIsQYNw3OHbynHkcBJyL7TMX6X5FII6wLQRbaszW /oe+z8vEELkSchxbkP8Cgy2hWQ7A1ZAQ3vPfZHkmAPzuADauDYOIstL048pbJdMPdSYJ T8lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zqd1McNM5D2fBRbn3StkKgKGGJ4F/qdBrurXM1jISUg=; b=M7vC3vE3kiNW/5E4ryHTIoIByMrHpA3gUJMOiiiMY2CiIyBbU6m/7AdzaAF7kt6RIO Aivf3GN7OISzdReTLTTScnMGeBEoeZiUe0vjwifu7MYpTJm5fk168/2oXAD5IHbXJWsr sHRMEP+aKJXoBLUae8JZGqJVm/cLnOCNtHZFH0oUqqpzRVNvDKoEKMHZpyPx3OVTqTs/ QlP/AylDkIZjLF4091qHjwE1elXEtpEpDwYb4/O6n/jfgCpoLm1ZZsSo9FyEN9/Tlu8d 4TvL95W8wyEA91FSdftyxhRbRV0XdEWoPTW4eDZTItcSjC7VlihCK1um5PtUAWaU6swx hvbg== X-Gm-Message-State: AJIora+UA5klLysMro2PtF6L1RW0ZC7ysMaKTviTIG59x11NKUfNCjiv ZeER7s3sVAfJfhSV4xDmbGeid45G0EMPLw== X-Received: by 2002:a63:3fce:0:b0:40c:23a5:2827 with SMTP id m197-20020a633fce000000b0040c23a52827mr19903446pga.314.1655747569722; Mon, 20 Jun 2022 10:52:49 -0700 (PDT) Received: from stoup.. ([2602:47:d49e:3c01:a3e0:8a80:7b85:aea6]) by smtp.gmail.com with ESMTPSA id j14-20020aa7928e000000b00525133f98adsm5138138pfa.146.2022.06.20.10.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 10:52:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v3 15/51] target/arm: Move arm_cpu_*_finalize to internals.h Date: Mon, 20 Jun 2022 10:51:59 -0700 Message-Id: <20220620175235.60881-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220620175235.60881-1-richard.henderson@linaro.org> References: <20220620175235.60881-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Drop the aa32-only inline fallbacks, and just use a couple of ifdefs. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 6 ------ target/arm/internals.h | 3 +++ target/arm/cpu.c | 2 ++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index ece720a757..d8ff78d96d 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -205,14 +205,8 @@ typedef struct { #ifdef TARGET_AARCH64 # define ARM_MAX_VQ 16 -void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp); -void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); -void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp); #else # define ARM_MAX_VQ 1 -static inline void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) { } -static inline void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) { } -static inline void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp) { } #endif typedef struct ARMVectorReg { diff --git a/target/arm/internals.h b/target/arm/internals.h index 6f94f3019d..aef568adf7 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1288,6 +1288,9 @@ int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg); int arm_gdb_set_svereg(CPUARMState *env, uint8_t *buf, int reg); int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg); int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg); +void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp); +void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); +void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp); #endif #ifdef CONFIG_USER_ONLY diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 1b5d535788..b5276fa944 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1421,6 +1421,7 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp) { Error *local_err = NULL; +#ifdef TARGET_AARCH64 if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { arm_cpu_sve_finalize(cpu, &local_err); if (local_err != NULL) { @@ -1440,6 +1441,7 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp) return; } } +#endif if (kvm_enabled()) { kvm_arm_steal_time_finalize(cpu, &local_err);