Message ID | 20190323190925.21324-8-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2198358jan; Sat, 23 Mar 2019 12:48:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOw9lhf+8vLP8m1gaYxWdn30cpYpffVDA7MG6iMHs/e/CEmupF6hg7KocHcf/qdR9Pa7FX X-Received: by 2002:a81:3253:: with SMTP id y80mr14246597ywy.63.1553370489444; Sat, 23 Mar 2019 12:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553370489; cv=none; d=google.com; s=arc-20160816; b=ptMSQVdZwTHW5QgT/cipz6RohA94eCZpLGbK+ycN7rckyLV23TtZsKX/hS5K9jbsxz AxBTGUD4Su/jacjT+7ciZHEhghEXVsKwpVVvCpps//gjRzxmAJcTlwWeuRCXJfZaLetV eD/A6droRf8PuOAatAhTOSBh1ubvpW4679J3/UHGl6A7x4XSx9VM5c6wV7ZHYmVc9WFc pXOL7QFeoKq6s6sXeSk2B5es9y2DJtBrF8LESCk3cCFw9Zr1OPq9P8Dqm3nd/afjXbtl dMIYNRYPypl2Hyo4v3rrLNNxORBx6n6vCi1aMa6WK1dW6w/qsn/9P7BI8PX2bS6OLCO/ e+GQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=pboOW5h3NGyyKEYef8MP27p99BzWuQLk4PmNbUbBl30=; b=eXmDRJAGYPFAPH3QDfv/rcpMZC7t73LQMalgHTsBpDixD/xqyd4yMTIrlQWp6XV78E mdzKUaOZoTgK4qZgrKbmpTrRdlbLELhexUj7W1pYqoy7fLgAvAVhp8laC6EnmxMMY73Y SebdhaJRJAsEgxrerh08ekOhVyZzMlT2CuZSrakSl93ZpI6qagzDLOFPuCL7cTpaYY5o ahkQD4uAc2bM79FQectBx+aZm8FjsusTVXSxibQE1U1PTP2V1lXmazslmVcNwOmR9mWF gRFil8wqYc/yPggbIpbMqfWsS8KK6ty5tQlQNaKEJId2whNJhbZIkQ2cw5GjiCaXOydy KoYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uIMnQQjv; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n67si7637736ywe.319.2019.03.23.12.48.09 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 23 Mar 2019 12:48:09 -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=fail header.i=@linaro.org header.s=google header.b=uIMnQQjv; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:47272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1h7mci-0002q1-O1 for patch@linaro.org; Sat, 23 Mar 2019 15:48:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1h7mGA-0008Km-IS for qemu-devel@nongnu.org; Sat, 23 Mar 2019 15:24:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1h7m1V-0006pg-Tt for qemu-devel@nongnu.org; Sat, 23 Mar 2019 15:09:43 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:45853) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1h7m1V-0006oJ-8f for qemu-devel@nongnu.org; Sat, 23 Mar 2019 15:09:41 -0400 Received: by mail-pf1-x42f.google.com with SMTP id e24so2823363pfi.12 for <qemu-devel@nongnu.org>; Sat, 23 Mar 2019 12:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=pboOW5h3NGyyKEYef8MP27p99BzWuQLk4PmNbUbBl30=; b=uIMnQQjv6kMHnM8cPz5N/BR2B8G6vtIT/GbIkD/xZTijzYfI1cmzkRce7F3nZ8QrQS pT2mmZa9dWOMdoyLDG01newUYhoNv/4ZbMwT/qCVtBlT3WUQdXQlY5zcYbF7yB58xnYw +a6/8ktQzMHYJomAstqAPHp/WGaDfQCnn9FDz7mB4KrySDTnzbEElhA3c8BqguKxWuoy cGGfxMyIXvFPBywgwi9yhyVdN1Yk7hxylw52zC30wbVRg/WVmbq7bXXHz+YmVIuJ9cjn 7hB7CX5vgmIh5KnaQ5O3IHRLUy3cdACWVtHLlGNlUWBgHWQNg0nbHhYbfJV7MTaARt/j Zzhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=pboOW5h3NGyyKEYef8MP27p99BzWuQLk4PmNbUbBl30=; b=ACfX2yXQn2SrNwVr9ZbFpuo5pIphKRRwufzg9s6/LFZGQ9nQCY8WsjZZRm6xgdE9gZ +jZrxUkaYEa0gCLNHTDkk0nAYRYWk4faNMDCDD7qegvyF8AZOdRGRuxaBkIEpAU1vgLa WyCYXk5s1lnhiLSfWxiM9n7SitFw+SN3n2Xdq8Y0Hi0wwpmRQgO5CTKzuhDsxkIctfjV 3+tbkc7NOvBGOj4NHrlYXFzRLp9+4y7lstfZ3eROdXxAL7C8zIBd+yjVE3G6x1K413+D CgwYHdLVa/75Jr48eUdhJB6SC+b4v69+7xSTBlSvjrHjJCELdqFnbYmww1bmdNmP6oMV Pbhw== X-Gm-Message-State: APjAAAXrW60K6N7pbfnQmOOjs0AFo68NCFq7NbpgpWXr+2tF0IN0nthN 0Ahm9Dme0PZ/wCVwzrTd2k2hF2/POTk= X-Received: by 2002:a63:5317:: with SMTP id h23mr15163534pgb.437.1553368178241; Sat, 23 Mar 2019 12:09:38 -0700 (PDT) Received: from localhost.localdomain (174-21-5-201.tukw.qwest.net. [174.21.5.201]) by smtp.gmail.com with ESMTPSA id h184sm25990703pfc.78.2019.03.23.12.09.37 for <qemu-devel@nongnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Mar 2019 12:09:37 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sat, 23 Mar 2019 12:08:57 -0700 Message-Id: <20190323190925.21324-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190323190925.21324-1-richard.henderson@linaro.org> References: <20190323190925.21324-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42f Subject: [Qemu-devel] [PATCH 07/35] cpu: Introduce env_archcpu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg: Move the softmmu tlb to CPUNegativeOffsetState
|
expand
|
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 9fb3f57684..0951fd9053 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -371,6 +371,17 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, int cpu_exec(CPUState *cpu); +/** + * env_archcpu(env) + * @env: The architecture environment + * + * Return the ArchCPU associated with the environment. + */ +static inline ArchCPU *env_archcpu(CPUArchState *env) +{ + return container_of(env, ArchCPU, env); +} + /** * env_cpu(env) * @env: The architecture environment @@ -379,8 +390,7 @@ int cpu_exec(CPUState *cpu); */ static inline CPUState *env_cpu(CPUArchState *env) { - ArchCPU *arch_cpu = container_of(env, ArchCPU, env); - return &arch_cpu->parent_obj; + return &env_archcpu(env)->parent_obj; } #endif /* CPU_ALL_H */
This will foo_env_get_cpu with a generic definition. No changes to the target specific code so far. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/cpu-all.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 2.17.1