From patchwork Wed Oct 13 02:45:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 515687 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp6084316ime; Tue, 12 Oct 2021 19:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyGufp0X26Qsds0tXprRZq9oip5CV9MkMNbFZ0Xi3ns5c1w4ynwg6BNhdCP06RSdX4mL1d X-Received: by 2002:a37:93c5:: with SMTP id v188mr22641144qkd.57.1634093817518; Tue, 12 Oct 2021 19:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634093817; cv=none; d=google.com; s=arc-20160816; b=fMWqLd4akywwsqntrzPzG6nDepRmnxSXaglExiRl+ejgFhjn33IUwfPfmITTC5pMqt euW1J+Id7iXuG3zvWmsdgeZlnyJGmyqQ4IkbttLrm64/UnV8Jg+SJhDu5fe+uWrqEaxo gB3DXk5Ee77zxJYmgnc2DFD39Vmdtiy7x4lQtHfBHr55EclIk/3AqQwBUHrWN+Wd569E esHZ+SM0INaV0nsnbCBmBNkC20gce/L9QNyjYSm+jbLlPGEQisGPTzE5IiBrUG4tx215 kmYD7Ecsa8tbbFzYBUMqQvD3BEYfkuG7cvkx1UCjJIbNFm/IgrUW1OOj90gkfQfaH/F5 bSKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=g7vb1DiY7NwJL2MkD8o8UL44MwU+VnbJvJpghPXqqyM=; b=xhCvDaI7U+7Ikpzf6h/8aLZjGrsxo5VCe48BDVeEfqBAshaSc23pn11b66oXiWjAFb 3Rjj438lClbyDGNU0N86xbWiHD2m8TH2gRh/TiteGN/fe1FGajpoSmsH1nK3ohkNdezj 0BMPkN+6zOzBR/vNJx6E0CwkC8Z5/u0gS9JJ+tM2xHA8TPoTqfrItkdF0TCok4xUguOs WrwqnhSS/p/nieQNkAy7uuH9W4iIVIekEWYftt94U1NQj7vcc+OVUxAWCfPlgRYzUmKz zcQCYLDcxpHNmh73XdSvkAxfaQJKbbbr/D4fBhKWJFNjN60lnGFpmmv8Zw/+iz+Sir0u rx0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XWDb5Yhf; 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 bh12si8149193qvb.139.2021.10.12.19.56.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Oct 2021 19:56:57 -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=XWDb5Yhf; 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]:46718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maURt-0002Gu-1M for patch@linaro.org; Tue, 12 Oct 2021 22:56:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maUHr-0004op-Ud for qemu-devel@nongnu.org; Tue, 12 Oct 2021 22:46:36 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:46726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maUHo-00050l-6k for qemu-devel@nongnu.org; Tue, 12 Oct 2021 22:46:35 -0400 Received: by mail-pf1-x435.google.com with SMTP id t15so1120130pfl.13 for ; Tue, 12 Oct 2021 19:46:31 -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=g7vb1DiY7NwJL2MkD8o8UL44MwU+VnbJvJpghPXqqyM=; b=XWDb5YhfbIz70Jj8o+WphdROtQIWTvcduxXRsmRqeTePUm9aDWkQpnfZySRhP5hw1Y KILIKXMN1EFOdu/2rb0FIN2yHtdK5lY/jQIfdn6qbvmW2OJnM2IYaLsHer+VoRUVg/v8 cQub60IdwoPfszXgrm+gSlRxWcTwWm2fK5fac67mJl0PKgiRIhoOb99d1tHw7Jvmqcnh VKNJLPzChmCwO9Nrrt4ldw/54aBrzYymaXSp8SB2forO4he/pKPngmvCgEz9w9UZNFcX PlAHSc092xzMgHtHtE1CqkjjlMxnwg/V6UjrV+sLo4h6Px8eOeZrT3FOBPxbJo2qttpJ lQPw== 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=g7vb1DiY7NwJL2MkD8o8UL44MwU+VnbJvJpghPXqqyM=; b=QkJ4ibC17Rl4sI+QOnkcd/EbGdL+MG2yK1mbdLvzzsP7Pu0es7TAN3dGMSVAXjN0q7 SNsi0oyzzfPnudQ2/yYCkyts2QFp1bB6jOpZOKwx/cd3oe/OxhQJJrxN0csGspLcTyFb /KVzfwSdgHfaLAKSt7RqgPPWyK0a077RG7YbuEnfzLqm7vTeSH5AAEXwPXMfk9e/OPNh iEna2xWmB88tNopgZS5zYdVe8fFc2DcT9FdXsNRI+u78lifknXMUTI1A5z5fJ/s09aIn WKqXQvxVkX+rNR74EH0uRhoH3EE8NSyfpZDKKe15gRYflppeB+vRSdSXg3hzAJoYF6jX jCYA== X-Gm-Message-State: AOAM531DJvUx99d7fQy3GKpKzdpi1dSjfRcxreYrlyMPEZCw8TENh6eh ffVjaQEjJLiH2F3Arfj4HzG7RABzZn8HRA== X-Received: by 2002:a63:1d10:: with SMTP id d16mr25243290pgd.156.1634093190940; Tue, 12 Oct 2021 19:46:30 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id qe17sm4855014pjb.39.2021.10.12.19.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 19:46:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 21/48] target/hexagon: Implement cpu_mmu_index Date: Tue, 12 Oct 2021 19:45:40 -0700 Message-Id: <20211013024607.731881-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013024607.731881-1-richard.henderson@linaro.org> References: <20211013024607.731881-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+patch=linaro.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(+) -- 2.25.1 diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index f7d043865b..f90c187888 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -141,6 +141,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;