From nobody Tue Nov 26 14:45:06 2024 Delivered-To: importer@patchew.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=1706853093; cv=none; d=zohomail.com; s=zohoarc; b=cNlI/d5LUeObt904KBOIBYidnsAJn1DfFHU5oNrYjNe8uYbqF2u37o9plUQNTNKqwGx1Q7TX5xY46AJBgOZlTkWvoqK3DP4rfzL1SWELzusE5vUsDh159GA/9T7Zel/uQss4sCwNGgaT+rX6rl8tCjv4l+yqOhJgWVCf85XUvxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706853093; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ih9kNFtuKNhrUdysAgLO3jiT9TTjcwOFp1g4b3mJWUA=; b=UwD1ukbg8ctZ6lPDXM/Fox/4ccXYpJyYzVQgKEHIVpkH8M6l8QBV7a9nzUhpqWvJrVh+jw0z8Na6gk4RFh88c6zn+f64pgzZS4nvqU2CTvqkABVmgco/YOARArt+eCvlYFe6/u6L81Ua8v0DAjgapAVobIZjMSgeaFDdngO5GEU= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706853093747494.82599235702935; Thu, 1 Feb 2024 21:51:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmRv-00014K-5e; Fri, 02 Feb 2024 00:50:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVmRt-00012n-QO for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:50:49 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmRs-0001bf-Co for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:50:49 -0500 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6de2735151cso1229867b3a.1 for ; Thu, 01 Feb 2024 21:50:48 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id h2-20020aa79f42000000b006dab0d72cd0sm715111pfr.214.2024.02.01.21.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853047; x=1707457847; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ih9kNFtuKNhrUdysAgLO3jiT9TTjcwOFp1g4b3mJWUA=; b=QgTHM0Vpf1nqXtlqGFg5C7e4Br9r1TKRpZOw9aXUsKNrai2KIVbkEFgsuPAS68soK0 7p0wlEEWUObisjPvHWkwhe7+AS1bCSxHjwZGSDwW3Kgdz+KDpfwjbFcXP6/9kWnyVBWb 2DQwMLyG5OT40aBxZ45MxHXR9CYIxsK2SnqmZLX11SQn8DyouDJ8Z5TDZo1KFM5u3oT8 4bKcTesW5WneG0e+Dtx4DtAzhtgqObHas4eSs0BlZ5PTwY8BCLFO+4n4Pvz/M7hmqpt7 rEGKyCVKwn/Iwjh5FYes0ckMDXobWEPInET5C6I8gHj5SygyARYoxIFLro44n2EbHsVt 5NRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853047; x=1707457847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ih9kNFtuKNhrUdysAgLO3jiT9TTjcwOFp1g4b3mJWUA=; b=Q+72sb3ojkyei69D85Wep8zKL20nuNrwGKdWJAOXytN8kv5II0jb3j2Z3wLXYIrNNs dqEXWToXgifZ3/LLagor8yYQuudYpDUMPVyc6+9XS8eJlzSYjgzr89nXXfMcxgAv9PCa LxUKzVyhNi2WTjukU1ZZ6f6NuAXOGf8nhy1LnCBqqxwYDYdj7G3Q1oq2eZ9IHSn1h6is haqR7/LzNoOlIRlT+sMXkbRFBG3j1w0rHhjTipOhPjCtlHVBIJBuKKZThaWpW63VUcXh zjwtAGkV/7P8lzuFyManh3LStf2iOyvw2RlP+7pwRQbQ7OMIrpDTvWsZJD8Zlw7QOnEA h1+Q== X-Gm-Message-State: AOJu0YyDB9Sb7fQZqU8kMfz/h4UgqeJfGelj/5/lWGr7pTN1P7DNn+Zf KAA/drOOpXHHwgQFuY90PXJjYA/8jxelSUjMReeU7r8+xXMc3hlYLRtb+1sDJRWEpIGdTKMGODu neAw= X-Google-Smtp-Source: AGHT+IE76fgrLlqvPpz21UuQ/1qw55eyXaHWy7qxfQ78uUHMw6z/hAHi2P1wjaeLZbBlbGpQDlS/Sw== X-Received: by 2002:a05:6a00:1407:b0:6df:f634:4f83 with SMTP id l7-20020a056a00140700b006dff6344f83mr1776559pfu.2.1706853046932; Thu, 01 Feb 2024 21:50:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/57] target/alpha: Split out alpha_env_mmu_index Date: Fri, 2 Feb 2024 15:49:41 +1000 Message-Id: <20240202055036.684176-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706853094506100001 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 7 ++++++- target/alpha/translate.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index ce806587ca..3beff2738a 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -389,7 +389,7 @@ enum { =20 #define TB_FLAG_UNALIGN (1u << 1) =20 -static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch) +static inline int alpha_env_mmu_index(CPUAlphaState *env) { int ret =3D env->flags & ENV_FLAG_PS_USER ? MMU_USER_IDX : MMU_KERNEL_= IDX; if (env->flags & ENV_FLAG_PAL_MODE) { @@ -398,6 +398,11 @@ static inline int cpu_mmu_index(CPUAlphaState *env, bo= ol ifetch) return ret; } =20 +static inline int cpu_mmu_index(CPUAlphaState *env, bool ifetch) +{ + return alpha_env_mmu_index(env); +} + enum { IR_V0 =3D 0, IR_T0 =3D 1, diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 134eb7225b..4b464f8651 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -2875,7 +2875,7 @@ static void alpha_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cpu) int64_t bound; =20 ctx->tbflags =3D ctx->base.tb->flags; - ctx->mem_idx =3D cpu_mmu_index(env, false); + ctx->mem_idx =3D alpha_env_mmu_index(env); ctx->implver =3D env->implver; ctx->amask =3D env->amask; =20 --=20 2.34.1