From patchwork Thu Feb 16 17:10:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 654069 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp86606wrc; Thu, 16 Feb 2023 09:15:44 -0800 (PST) X-Google-Smtp-Source: AK7set9HJK4Si3QYoQWushBCAtVpLCPd5pKaT9nQb3RiHp3ZB7w7+4TO6WFfdS6CZ1k+Ll6fVLJF X-Received: by 2002:a05:6214:21a9:b0:56e:fe99:b2b1 with SMTP id t9-20020a05621421a900b0056efe99b2b1mr2883606qvc.12.1676567743827; Thu, 16 Feb 2023 09:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676567743; cv=none; d=google.com; s=arc-20160816; b=tQf/we3gtNkM33FDhhhnDMKThcegvWcHMHParP0jl71Apstt+eddfroj8BySN/8fmZ oW5Frmyob2qVU0fCjO8tff7VZYq6NmNS1EiRIdcRVhThdq4I871KIayGA0O26Z/rjxz9 gjMH+iAMOkPVPfrbMmzbRDnHWLPn1CLQZwEHdpZ3QUY0qQhVoevAXDNY93o5xHyGUljc /HzyAI4/BwmOY/B6uYPQTPdcuGz/gkaO23nfLmm68IAhGwljAqALCcLGiB+KPN/7k5U8 CyJ7TnaZ9V1VyuheKy3lRDZJNMG03RUsQlZJlQk+YTKYJeYdw+bzPswAgobZBNxxqiD0 ++aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=r4krdA8Qnd36kyIKBvwPSIAkaJ6bsOagP1i8kYOboYQ=; b=nIysS9G5HaP6flWksPQSkSVS5mtRnV+gIb8UcDuIkdNblViNcm6E+HIqNqW3QX6CQm 8bw6pRI2BRxU6rUWl5FnX8r9rXRIoI4vxTCewUVgGRa6HXm42ucU3QaAo4We7ZU/sxEu WkI/jGX5Wy3ANTMhRR3LVE3QKBEnvH7aa3AJDOn83oYRH8KTwOHXxa9ugyXH9fF0etzm CSWARVSEHA+1HIXOebYsCmO4xFFNGUgy0w1tSSTrhbDVTthNqKoDA3EUNE/dMI5oalLG +I50sZRm0Xx+AYaZyNxLaOYkn87P7N1gdF54vjEPbCYzsijjD+bD1dBJF1P8ovdXXijY f1ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cDC8VgDV; 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 az34-20020a05620a172200b0073b2ce32470si1920888qkb.106.2023.02.16.09.15.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Feb 2023 09:15:43 -0800 (PST) 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=cDC8VgDV; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pShnA-0007tI-LF; Thu, 16 Feb 2023 12:11:32 -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 1pShn8-0007rm-OY for qemu-devel@nongnu.org; Thu, 16 Feb 2023 12:11:30 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pShn6-0007oJ-NK for qemu-devel@nongnu.org; Thu, 16 Feb 2023 12:11:30 -0500 Received: by mail-wm1-x32e.google.com with SMTP id g6-20020a05600c310600b003e1f6dff952so4757115wmo.1 for ; Thu, 16 Feb 2023 09:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=r4krdA8Qnd36kyIKBvwPSIAkaJ6bsOagP1i8kYOboYQ=; b=cDC8VgDV15bWBWwuZR39Fy8LG6LECXQ85Cvv3BW9G8Wvk37Cz+sRBiHUYMadSkmSyn 56aJm6u0nXui+WQa+KbaATWzdcI1P0KNCWssnM24xYNNlc6UVzSmBgFl78ljiPjBlsLI kA4pWG2t07agzTAdDJ5AC0HZn9chCX0WF7RWgZnhfbgq7P9h+EwPBdibg4VzvkpxwEoO Miqu2g3xwwptpLlLMnGYW5EiOYTncH4qrNXXFjeZl/v6ZI2j/J0edThgbHhVo1yCGdxX ZJcLXX26M2RbDW8kwMQiXIGLodApsT3g4ZgUrRVMM6kRd2ikEx9WcnNbjSa1ohbyNhC6 X+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r4krdA8Qnd36kyIKBvwPSIAkaJ6bsOagP1i8kYOboYQ=; b=EF3kGjGqLSTFwBGhbqhYJXUm7KCbyeZBFxAKOKrLIEPK+QTNrhBdiMuBCFsKOggd7m /DIFpTs5nw1SnJGRmPsQVoZwPSIih7c67h9xzCLUgW/X9DXCsk6wNFlEdysYPgE+W9nz wfiecQS/gp0hrs8ptv0Ak39Txkyd9AfRHQl1a328P3tIXX/qjsx+7KN0s+Ge+xKOfgB+ 1WcfuLebJcvYQiRNBqdbMgL6uD46QOE1hFX7jYaXU8zOGqovk9fMBnaf2OQx6t6QTc2L AVC31/GCEPco2HpAOlgaXQ5Z9apVFbyyzZZb2/d5eC/liwF0MpI1QVJHG0L99XeleEUO marQ== X-Gm-Message-State: AO0yUKUZCtiixnGUFaevRUHQvYp6pioJFOU433w7xFboZMnocwrtMaqT 9UQFbR9ck/99gG6OXWbMRTtfdxroDhQAhUMG X-Received: by 2002:a05:600c:4b1b:b0:3df:fbd5:690 with SMTP id i27-20020a05600c4b1b00b003dffbd50690mr4950191wmp.17.1676567487300; Thu, 16 Feb 2023 09:11:27 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id f12-20020a5d4dcc000000b002c556a4f1casm2049107wru.42.2023.02.16.09.11.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 09:11:26 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/30] target/arm: Simplify arm_v7m_mmu_idx_for_secstate() for user emulation Date: Thu, 16 Feb 2023 17:10:55 +0000 Message-Id: <20230216171123.2518285-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216171123.2518285-1-peter.maydell@linaro.org> References: <20230216171123.2518285-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230206223502.25122-3-philmd@linaro.org Signed-off-by: Peter Maydell --- target/arm/m_helper.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c index e7e746ea182..76239c9abe9 100644 --- a/target/arm/m_helper.c +++ b/target/arm/m_helper.c @@ -150,7 +150,12 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op) return 0; } -#else +ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate) +{ + return ARMMMUIdx_MUser; +} + +#else /* !CONFIG_USER_ONLY */ /* * What kind of stack write are we doing? This affects how exceptions @@ -2854,8 +2859,6 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op) return tt_resp; } -#endif /* !CONFIG_USER_ONLY */ - ARMMMUIdx arm_v7m_mmu_idx_all(CPUARMState *env, bool secstate, bool priv, bool negpri) { @@ -2892,3 +2895,5 @@ ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate) return arm_v7m_mmu_idx_for_secstate_and_priv(env, secstate, priv); } + +#endif /* !CONFIG_USER_ONLY */