From patchwork Wed Aug 18 19:18:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 498967 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp990176jab; Wed, 18 Aug 2021 12:59:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfJxkBSMwLCL5qj51YmHUe9QkzQZiItmuSWwT4sl6oaCCk0mm+70qkJl7xsGHKy6WaHBNW X-Received: by 2002:ac8:5302:: with SMTP id t2mr9177582qtn.317.1629316777454; Wed, 18 Aug 2021 12:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629316777; cv=none; d=google.com; s=arc-20160816; b=AIA0/Z6MhLytNhv+3/lpKEDpGw0P0Djm//yK7lmLXhjSXkpYTPh9HrMXLQNRGsr3Gm 0H327zIaASiNItmcIxt55b6FGjzsxo1ZEhQui+5kpIiccgFsnUtOLc1XE3mhka5AwIEE STiI9+zQOXShLmhEPOtjPlc4cERDxf7+6oz/rIwPpJu7PljfnaTMKgwQTzWH6LnyhAKW 2lUNUxNLxbk/uczKMVmYKaxeOj+H2emkqmDv+gjXR9IzFvsxrFxYFPaR0D8NU+r5Qjnt algO1VqeUjaY8BvNCrG9TrowxwZqQ3ml3DpM9YvVJhJeQUAYmptK346VKg8LdbUf/vYO EAqA== 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=z5GHTABClhIJC54p0f9xKGIGp+EMnbq9v7YA+T66nys=; b=J5S2R5IyNFq/eQw0ZAUfR29vcTQAGXW1MX7LZAfQ7QPszR+6Qv4Zugha7h2tw0PwN0 ghts5+AF6uaraespZY1qN+JHzkUoYccWE7U9NwLxPD+8Trdo21n3aCterRdo8q7UdFx7 78+I/FxfNgU9COdOG6ddBNVRc5pPGZ0H31ZFxaiujffZ897no32PZem8JviAd+awnJr0 9jUGTJLQyTOKLzwbXICFPV0N92RUnogygAmivKrord8kJItTWVo6EySFP2QxyWZB9v8n vhWJ4onPiVG1dKKl2Dwyp26m4Z3CKiszKukfnjci4JepOljM4prPKM0rpfYpUBFXWEAb W3sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DyILv7Bd; 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 u11si582892qtg.20.2021.08.18.12.59.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Aug 2021 12:59:37 -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=DyILv7Bd; 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]:45314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGRiq-0008BT-Op for patch@linaro.org; Wed, 18 Aug 2021 15:59:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGR6d-00011t-Mf for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:20:07 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:38655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGR6b-0000LU-U5 for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:20:07 -0400 Received: by mail-pj1-x1032.google.com with SMTP id om1-20020a17090b3a8100b0017941c44ce4so9583042pjb.3 for ; Wed, 18 Aug 2021 12:20:05 -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=DyILv7BdUaD47x94obGb7QCrrBIDWQyobHzhqgSDis2t7+SKY1d670Oo7r04U/SeJ3 xvrphrlnjDaKrMb5iaxEF3E7SIUvaSxeLHs70mIPAyybsZbGfezaYaFN/yyujeZgVQQC nM1p3RlYsmb//agNHTyqofBDW8MC3KPxxQE9I+Xo3P4DXI89sg/iwIgksJgqc6pG6vGS gMO/u2E2qvwrjmzlZ0oQ2H/o543OR5CnpWTlxdG8TfC66mqohwd8kAF4cuOm66UnFcbI eIeBvTp/d+hVZY4Yzu4n067B8ftGpBjW82O9LmRgzF6Ov7OY1FzEboqi8aIcZoZGItre IcXw== 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=rChwpgSrHtP0e1sFexbErxO/ulXbMNai9OMlxNgPKqfo4SQJ8i4dRH7iB54ri8G0vO NH5vYSSS/qelZgG6LWQICRDAF1WUqT8yqF+vTGE8T03QUaVUB3Sdebjcf7MIm3jlH0hN IGMupPqwgG7EXQ7Eib1RyEynAjEqTVpLUx7vKRULJ7O6xZsO0TITZC7Au6DZgdKb+ET/ DiEZH8DXYZjsb4plnW4JXKChzedbpVk6mMYSRnqVIEexEoGcmXgBE4MApxG8VRywy6Um pohA8+hTYNthk/mqcoGY344/1BnWWmCBSe10wm6I1hsovqcWDPCo/vImyQIbVTZ93j37 DAmw== X-Gm-Message-State: AOAM530wRN/I+VjLZb1Ha27rzTYArQpDGkTya7HghaTxLSNbUuxEqdhU qNN/ywqaCWy4C/DIBoJxWmfGMlRYugvGuA== X-Received: by 2002:a17:90a:5583:: with SMTP id c3mr10683710pji.133.1629314404612; Wed, 18 Aug 2021 12:20:04 -0700 (PDT) Received: from localhost.localdomain ([173.197.107.15]) by smtp.gmail.com with ESMTPSA id a6sm524108pjs.40.2021.08.18.12.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 12:20:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 34/66] target/hexagon: Implement cpu_mmu_index Date: Wed, 18 Aug 2021 09:18:48 -1000 Message-Id: <20210818191920.390759-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210818191920.390759-1-richard.henderson@linaro.org> References: <20210818191920.390759-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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_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 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;