From nobody Tue Sep 23 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1584043239; cv=none; d=zohomail.com; s=zohoarc; b=Oa5PGSjeMBbBORblH+ogfwTYgqi57huiIdGRI0zKlbiE1/nNJdG1dsmaff1gUaXFuhH3GUNYpiX5qA4f+X+7oWyNp54fXE66OUkafQMROPBl1tX3gcXTtA46PkNwojStwgSg2NjKkIboNYO+5es5WsLSCES7gcxu2c/mEwtMkVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584043239; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Kqb/ekSCjd3NGP5caJeLUqYBI+D5wVD+00pKBar9ftg=; b=gdsy/w3I5Bg5RILUkkaBsnMbzlmbwbrlSTiNG56BCKI1yeTHgBkieNvSxRtPGYdpY569Z+5V10h+6aIaDeTqF0hZbQPZQqMspwOaQwrplryp8N3CX2FQ/LfF8ifWS0DrcXaxy0NTdS/KS9/f99RTeom5hQCsAgM1+7ehlflHhzA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584043239082336.3012057117769; Thu, 12 Mar 2020 13:00:39 -0700 (PDT) Received: from localhost ([::1]:49756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCU0T-0002VD-2a for importer@patchew.org; Thu, 12 Mar 2020 16:00:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45579) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTjJ-0005hI-JF for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCTjI-0002Be-Al for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:53 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:34521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCTjI-0002AZ-3R for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:52 -0400 Received: by mail-pl1-x641.google.com with SMTP id a23so3080278plm.1 for ; Thu, 12 Mar 2020 12:42:52 -0700 (PDT) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id g69sm6824842pje.34.2020.03.12.12.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 12:42: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=Kqb/ekSCjd3NGP5caJeLUqYBI+D5wVD+00pKBar9ftg=; b=zyEfpJzC8n0DGsJTLkFv4XBCHbl7Zo7VXBxw7FUjt7ig0XTgV0zZJtXk/twPg74NT5 5cEvY/xbiDelwu4lgRDkdNvKtFBaO1ugk8iATZP0zKWiaFl7pCE337961lxalS6EfH0Q Z+q0Y8pfDuxPPwWXnOfVUsZujR8MTSUxnLoKpXiTXWKelldFLDB7aHHBTd6yKwHuqvth dB0qmlW1cOJ+jO2FI4zfFEOx+cLiZx/P5YQ/4KqM8WyD0i+yA61iHlUE1oNLtXsPCUlL M27efZ9wMZmM9ysa71WhsKYa4SOe0nDnXCKbrPfLLiCzl2Kk4JIwhv0xgg5HCebs+oyZ Zhkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kqb/ekSCjd3NGP5caJeLUqYBI+D5wVD+00pKBar9ftg=; b=IihpDwZHyVBExxqH51K9DJ89qDFCS7J7Xw3wCGFaY19Kk5elEeJ6bB4RdXoczDHOjI B0XAGlyjYzS0hwUnW0JbhVmoi58pCvmkO8N62JXHlxQTBEJIhMmliFTnFxMv2On3SXmT YnQ3LQf1ULfQrJ/HLmB1o/+xSwR2RTqkolM1MS5easNkQJe6i7s1w9qLh8GL1juexuBc R//giQgP7ycIiH0kIcYddveEl0MGHSSMFQRFZxS5ZJp8bvFQkF6SJn1kugQdIiMjCSSV mXKPoSQAz+srHngJ2VQ6j9dfv5vE2sBhyNauaNTSe7g5XCwwpsqz3kUe0sMjvCw+28dd YWFg== X-Gm-Message-State: ANhLgQ2/+WkhPHiZZVZFzSIN6J4YA0nQCiF7WHMT9o+wpY3Y8YMmoqQ0 mO69BrEypnR5ca6XiHEA2otoB5WG6gA= X-Google-Smtp-Source: ADFU+vtrnEhf0fLWU8QylZUW37j6GCE4vArUjqWs9aYbiiagDuVpeKYPlSQzx9kFmEanihj93RcDgw== X-Received: by 2002:a17:902:7794:: with SMTP id o20mr9505928pll.312.1584042170835; Thu, 12 Mar 2020 12:42:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 22/42] target/arm: Move regime_tcr to internals.h Date: Thu, 12 Mar 2020 12:41:59 -0700 Message-Id: <20200312194219.24406-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312194219.24406-1-richard.henderson@linaro.org> References: <20200312194219.24406-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" We will shortly need this in mte_helper.c as well. Signed-off-by: Richard Henderson --- target/arm/internals.h | 9 +++++++++ target/arm/helper.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index f091891312..56fb07f2b6 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -948,6 +948,15 @@ static inline uint32_t regime_el(CPUARMState *env, ARM= MMUIdx mmu_idx) } } =20 +/* Return the TCR controlling this translation regime */ +static inline TCR *regime_tcr(CPUARMState *env, ARMMMUIdx mmu_idx) +{ + if (mmu_idx =3D=3D ARMMMUIdx_Stage2) { + return &env->cp15.vtcr_el2; + } + return &env->cp15.tcr_el[regime_el(env, mmu_idx)]; +} + /* Return the FSR value for a debug exception (watchpoint, hardware * breakpoint or BKPT insn) targeting the specified exception level. */ diff --git a/target/arm/helper.c b/target/arm/helper.c index 2a50d4e9a2..e4b4366af7 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -9835,15 +9835,6 @@ static inline uint64_t regime_ttbr(CPUARMState *env,= ARMMMUIdx mmu_idx, =20 #endif /* !CONFIG_USER_ONLY */ =20 -/* Return the TCR controlling this translation regime */ -static inline TCR *regime_tcr(CPUARMState *env, ARMMMUIdx mmu_idx) -{ - if (mmu_idx =3D=3D ARMMMUIdx_Stage2) { - return &env->cp15.vtcr_el2; - } - return &env->cp15.tcr_el[regime_el(env, mmu_idx)]; -} - /* Convert a possible stage1+2 MMU index into the appropriate * stage 1 MMU index */ --=20 2.20.1