From patchwork Tue Jun 7 20:32:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 579358 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp5519895max; Tue, 7 Jun 2022 14:18:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/rTZTm1q6VIan0hbqJ5hk+pgRHVuEkRor7ZAfthOLp82R95dSAk692+v7VGMl8VJKb4t4 X-Received: by 2002:ac8:598d:0:b0:305:98:b95b with SMTP id e13-20020ac8598d000000b003050098b95bmr338967qte.204.1654636711389; Tue, 07 Jun 2022 14:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654636711; cv=none; d=google.com; s=arc-20160816; b=K8gnqy2HB8JFh2aAo4uK6K1ZpCE1yCH70+XzRthqFA4CHSKwbbA2hP2Y4JWlV7jvXX JRxBVCsWk42FJ5jTyeaHmGd5FiVx+PZCVjve4zZ5p297LU4fFiTqW8KM5UEMhoLlRkp8 BRoTdo2imy6QI7VJufQCdcfwz80CfDLXf5tyYYc3FVCqBVVcAFNlMrnO8zCV1R/mxhCe P/nmMjVSSZY5+hrkkFy2cu/N+nLbnv/BF0dSHpdAgj8+2venlK/OdWJF9xAITf+iCQfW C/tx1xm/beaj82VVXDGokKc2OIdyVAghspoMdry7mf70dAcukUhN69bnOKSN/1INhP84 zKDg== 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=Im5u11D8yrAC4qQJy1JnWa+rWzoOJ65BBH7IOoUdIyQ=; b=rm1nuWZeYvmCF+eRmfWKB0DG5PJ4I527T42DmDEDg+UZD58r3Xgme4YnxEqogdp4gx WR5VJWqGZubVGrskVxOl8HbYw9eCdL5oJcD+4ZfMK1cS/oeiPvy25pAuPHeWF+wqwVuj z9T37xpSrzh5rwa4EpQ8Ss0I0Xw949as25A0EqWVa1DWIJZ43c/SWr/L17smNQJHvixF gzQfmqK9bvrMadovIhJR52822yvV7hWevMfzNv+kApEyp92dyEVEcQhiCSwwZN2zwAZK XXngsXhD6bdHCsFGq7PaceA0lboiRMh4Qfc+OX4SEDwLij8C1exc1oYEO/meJbpsB88X L6+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J7y0v9iG; 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 x3-20020a05620a448300b006a6d55c7f57si2033740qkp.369.2022.06.07.14.18.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jun 2022 14:18:31 -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=J7y0v9iG; 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]:53318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nygas-0000ul-Vk for patch@linaro.org; Tue, 07 Jun 2022 17:18:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyftd-0000Kb-Du for qemu-devel@nongnu.org; Tue, 07 Jun 2022 16:33:49 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:34699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyftU-0007L8-RQ for qemu-devel@nongnu.org; Tue, 07 Jun 2022 16:33:49 -0400 Received: by mail-pg1-x52d.google.com with SMTP id g186so8075803pgc.1 for ; Tue, 07 Jun 2022 13:33:40 -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=Im5u11D8yrAC4qQJy1JnWa+rWzoOJ65BBH7IOoUdIyQ=; b=J7y0v9iGUlDOPRh03zbC+4A23pTa9EYfociFC23p5YJ2Us9UuFs90ppQkFkKc9NXGJ USavmNA6PahvKQ6So04V1eHIUv6RT0yqWqbkzlG9o6Lus7PpienJh9MNj231macFiVyC hAzXIb3IHxgYSTzJ/8BTcthPfuAX5apARy4k9NcQRtWD5TD96OpLyLqh3+SXZzRi5d4d g4+JrSrenyecs087twarVewtPduCgVb0/73iLLAAYUa7t+akuUMXTr02dlvCiepmiQUG 66lViN87wmMx2Y0OopVSipGO24er1RaujcJ2h+jss683ZgeNPQf63wRLmXQAgGgWFWUF /REA== 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=Im5u11D8yrAC4qQJy1JnWa+rWzoOJ65BBH7IOoUdIyQ=; b=1Jueo+yLfyVG6FERdW02VEg1uAwbwGI9CENE9nBWw1UM4uE8O9baEi5Dt3l3em0YCm AAMI0c/mlIg7BDmF3teCIwDSWQhf/mnZU+ea3m2m6gcrjs+eBRSy1JYEC8HgNODvSRjh eiH/oeDj1m6R5jmYCLtW9vZMaqqikghOIjA6di8m4Q4M1PFXg9oG9Jmg3fTBJrTyVNpL tdc5C1IfKEmT+4AU4TnVMtJ9Qjx4/wczSACkGsFRFarwVKNmgwrK7Uh80rUr5+dLdQ8k 3OZ4ihD77jPBR09kOdCzrQNMoeknUtYyyKIS7BfAprwcgQJXK/Oa1xxOVOLg1PyajRsj bgtQ== X-Gm-Message-State: AOAM532cUvZie8pfcpRQCrCeeQZx7hc4DPHDjck7iGtEegI8XATEfYL/ 61m7qg/O7+Q/TNdxRf2Nnep6Su9RBYCKXA== X-Received: by 2002:a05:6a00:1a87:b0:51c:29f1:13a0 with SMTP id e7-20020a056a001a8700b0051c29f113a0mr9000697pfv.13.1654634019983; Tue, 07 Jun 2022 13:33:39 -0700 (PDT) Received: from stoup.. ([2602:ae:1547:e101:3cf2:c634:5b19:25f6]) by smtp.gmail.com with ESMTPSA id s22-20020a17090aba1600b001d9780b7779sm4227856pjr.15.2022.06.07.13.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 13:33:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Subject: [PATCH v2 35/71] target/arm: Move arm_cpu_*_finalize to internals.h Date: Tue, 7 Jun 2022 13:32:30 -0700 Message-Id: <20220607203306.657998-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220607203306.657998-1-richard.henderson@linaro.org> References: <20220607203306.657998-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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 4e86d143c8..25a77ec676 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 8bac570475..756301b536 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1309,6 +1309,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);