From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C53EAC4338F for ; Tue, 3 Aug 2021 04:27:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62AF660720 for ; Tue, 3 Aug 2021 04:27:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 62AF660720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:42678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAm22-0006CO-KR for qemu-devel@archiver.kernel.org; Tue, 03 Aug 2021 00:27:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAlpv-0003r8-QG for qemu-devel@nongnu.org; Tue, 03 Aug 2021 00:15:28 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:50928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mAlpu-0002Ul-2m for qemu-devel@nongnu.org; Tue, 03 Aug 2021 00:15:27 -0400 Received: by mail-pj1-x1034.google.com with SMTP id l19so28136639pjz.0 for ; Mon, 02 Aug 2021 21:15:25 -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=z5GHTABClhIJC54p0f9xKGIGp+EMnbq9v7YA+T66nys=; b=MoTS4pJfLmTv6zSAowSW7wf8Ab4LtRtT+6zQkXw5va9+u43fACQ/Vg3NPp4hcHkiPJ MlEu1QDxI6+qgDQbjwx7EECaNmB+xxdmXDn528azzzmxjWJacD+YDwNs3UDwT951kQkv /YiwkZRW+y4MtO0phCJdB3ms4o51VZnp9ML9OtMZmqyAXSn6qvI52CHeYR/Qzkc2o9Wx ZVtcjMubK5qn1hS69YQEKIoKZiwa2dcmNmAH0FlRF4eR9KtzE2ZoasPNdCgHEnsOb/Ud OgUDlP32swikyW5bcwnSLvBs9snc964Ywr3CgW1J+Yp6Wau108UFyl7VtGhMPd+nj+Mu vrUg== 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=z5GHTABClhIJC54p0f9xKGIGp+EMnbq9v7YA+T66nys=; b=odNMpGFALSWo4XR2ktHOleaTFB2Btjzt1NlwSUMWJZo6TaU7gjMxNVlwifZa0y/y9n LEt45Ev8ZxfqLbfdpjY2FMw4T9G7LYIw61+zzKpt1tKJfZOA5fB8XSzGZVaAxvCu1S16 l0rUdXBiLDlQP7H2Sz8s6dyGwDBUBVIJgtZowojc7AESFqbcXssu/oPu3HPYI5gn3eU9 47Rn6eDQlDnbJAV1dhF6TnB5wTZ3XahfrFEVkY3N2VISiVdF9Y7PKe+97FmPnGmVX1za rLDbuCR4Dc33Qhc9ulVgh5P1LQAlKjZ2nGNq3FZSvrxfD4+DJbtWJ/7rP799rqiWaUIZ emBw== X-Gm-Message-State: AOAM530nvxV8RPH1xIsmmX9Q5dVIQT/g+eS7wLTOpg2jj0tCUozAE1iC aD2Fa+LPsYySfuxmpdIP9t3pn4zNHtsF5A== X-Google-Smtp-Source: ABdhPJyoMKDFBZWuTic+dN77q9XrmYJQpvCVQEWGoqEv+ebDiiios6xyme+5CZYCyBykGXPW6nHXbw== X-Received: by 2002:a17:90a:9483:: with SMTP id s3mr21154845pjo.22.1627964124810; Mon, 02 Aug 2021 21:15:24 -0700 (PDT) Received: from localhost.localdomain (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id c23sm13718532pfn.140.2021.08.02.21.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 21:15:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 33/55] target/hexagon: Implement cpu_mmu_index Date: Mon, 2 Aug 2021 18:14:21 -1000 Message-Id: <20210803041443.55452-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210803041443.55452-1-richard.henderson@linaro.org> References: <20210803041443.55452-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Taylor Simpson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The function is trivial for user-only, but still must be present. Reviewed-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hexagon/cpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 2855dd3881..bde538fd5c 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -144,6 +144,15 @@ static inline void cpu_get_tb_cpu_state(CPUHexagonState *env, target_ulong *pc, #endif } +static inline int cpu_mmu_index(CPUHexagonState *env, bool ifetch) +{ +#ifdef CONFIG_USER_ONLY + return MMU_USER_IDX; +#else +#error System mode not supported on Hexagon yet +#endif +} + typedef struct CPUHexagonState CPUArchState; typedef HexagonCPU ArchCPU; -- 2.25.1