From patchwork Wed May 8 00:06:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163589 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp2004490ilm; Tue, 7 May 2019 17:31:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4LamAjd41L97KMFBELGJIcVlk5Azbtf0z5r3l6Dt01V2Nu1/MzJ4XwnMaM0SbJMHsikHo X-Received: by 2002:adf:afcd:: with SMTP id y13mr9119574wrd.270.1557275471676; Tue, 07 May 2019 17:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557275471; cv=none; d=google.com; s=arc-20160816; b=NtF5v83K66rXamzYA/0ANsojRA4g/329BtBo1lXpp4s5fjpvSs176FeWG+wcv5SrXH XCcpkIJvm66R1epkcDplPJBcXVoqxHLI3GNXzeQU+4NKN6XjNl1s6iJKX5uajSFNaeiv 5MrKq15wC891/Qn0LBUrpvdZfFMqv2vKnpYWtmlaLAougXC1CMgVMc7Zbs3l5ueQumTx Ww/y6Jev4CiIgbaU1W/2OZT6o3mAjmSqTxv/d8PGHiWF5sWMtTVCVucjwwGmeG8WJ70v 2lMeTVFRmwAx9d8h5PULjBKzBAOtsD1pScnTzz5VsxilFjHTX6TL3DtassGTFdwbrxqU K7rw== 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=oAoyrYKzSYqMV8L8feOy4E2tXuYIVICXlQ/6UykqD8c=; b=B4+OGHdUzbST7RwFkmaPqxMYoIZruYeqi0XRWMVFLaEK+uVe94JupQqLwjfFLQ/S00 ZzoRS/uh8u/NDoWDV1HRG1uS1E3gBTlLixxegNI5b14+W8DJGzfXqq9Xl09q69tf4vFm YFS+4t6TIyJEcFxYv20ec85HzPDWjar7VPpaILrmq289XHRSTBRs41oOUtjqDp6WQIVG xBlZG/6acWDKhZEF9iG40mRTAmM1OWSTmpSMmr+IA/m2/PceddsZjyznMqbvyxjq4V/4 Sq4ChXBnUk8KcOD2HEr85b2V114MHHYXNdFGkN13UVRD3OZ4HxB1nj+A8MKZXH+nXMoW CzDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="BQm/FaLG"; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l16si2006605wrm.433.2019.05.07.17.31.11 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 07 May 2019 17:31:11 -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="BQm/FaLG"; 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]:56736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOAUI-0003fm-JF for patch@linaro.org; Tue, 07 May 2019 20:31:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOA7K-0007nW-T7 for qemu-devel@nongnu.org; Tue, 07 May 2019 20:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOA7I-0007XI-W9 for qemu-devel@nongnu.org; Tue, 07 May 2019 20:07:26 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:41646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOA7H-0007Ft-2o for qemu-devel@nongnu.org; Tue, 07 May 2019 20:07:24 -0400 Received: by mail-pf1-x442.google.com with SMTP id l132so1138pfc.8 for ; Tue, 07 May 2019 17:07:19 -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=oAoyrYKzSYqMV8L8feOy4E2tXuYIVICXlQ/6UykqD8c=; b=BQm/FaLGC95f79CODrRTw189Z/cCMkIGiRdn130r3dvcS1lPtFLbuoUbfYZj/nmtKo +nV36W9B9g9iKTML2MtpUUVW4sYCM25AKd6LHMi3DFDtXt/SXD0PzecHdG8ePDex2Zox XAt9QGOKIIkWQi70TyROaxbgqZ+8uGeirNnPWVjyjLCEtW8AOy/HVAHaWkyT7eTzb07r kDOOERT9FNrowNAisd15wk9yqf1octTLqkuvLgwCUq7urCRZ2v+387qDCyWTyWiCTx8m PVqCWRGkJQqlS8rHNoY+kX7C+HXrZw6T1QrhAMlHvSCaImhp/ZI+VO70p36t/+7GZfc3 uI5w== 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=oAoyrYKzSYqMV8L8feOy4E2tXuYIVICXlQ/6UykqD8c=; b=aEgMT2PdYjlBD/zCMdKVwoji+aSWjYTKgh1tFP54iJmugeLJH35fEXj+Dg/oD+cNzr gLBHnTJRgM5oAbpka+0CQU72koZ0Sal7qmXz4Ijt/itiRgEmv0fBitVIXE5hcBkAtlCl hk2sqB/WuO0gRR8pGllXJPPvT/2KDl/1QyejDRSipXVcNWJtcm95twnBk+rIWQsRjBl8 NNxIz4tO0vRS0JzyNS8IQ/oZMC6WVXyhRdOQj2HxIh9foRf2ajXXH7F4ggmepis3F88B s/akDaRaE3C19RsTHFVERiU9rYV6E36BmvU/ecOnlgMBJLoCQxq6V+5NmqODv687Lh1x /ONQ== X-Gm-Message-State: APjAAAWERc7W/9usdm1DfvX4GQsKRUuWfWIZAFY6fITWfWKDGfo1lq5x FxjcQFZwTTivwVZv/Th9DLRsB29o9xg= X-Received: by 2002:a65:64da:: with SMTP id t26mr43403471pgv.322.1557274038163; Tue, 07 May 2019 17:07:18 -0700 (PDT) Received: from localhost.localdomain (97-113-189-189.tukw.qwest.net. [97.113.189.189]) by smtp.gmail.com with ESMTPSA id j1sm15793183pgp.91.2019.05.07.17.07.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 17:07:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 17:06:29 -0700 Message-Id: <20190508000641.19090-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190508000641.19090-1-richard.henderson@linaro.org> References: <20190508000641.19090-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::442 Subject: [Qemu-devel] [PATCH v3 27/39] target/tilegx: Use env_cpu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/tilegx/cpu.h | 5 ----- linux-user/tilegx/cpu_loop.c | 2 +- target/tilegx/helper.c | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) -- 2.17.1 Reviewed-by: Alistair Francis diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h index 135df63523..7f8fe7c513 100644 --- a/target/tilegx/cpu.h +++ b/target/tilegx/cpu.h @@ -138,11 +138,6 @@ typedef struct TileGXCPU { CPUTLGState env; } TileGXCPU; -static inline TileGXCPU *tilegx_env_get_cpu(CPUTLGState *env) -{ - return container_of(env, TileGXCPU, env); -} - #define ENV_OFFSET offsetof(TileGXCPU, env) /* TILE-Gx memory attributes */ diff --git a/linux-user/tilegx/cpu_loop.c b/linux-user/tilegx/cpu_loop.c index 4f39eb9ad3..d4abe29dcd 100644 --- a/linux-user/tilegx/cpu_loop.c +++ b/linux-user/tilegx/cpu_loop.c @@ -206,7 +206,7 @@ static void do_fetch(CPUTLGState *env, int trapnr, bool quad) void cpu_loop(CPUTLGState *env) { - CPUState *cs = CPU(tilegx_env_get_cpu(env)); + CPUState *cs = env_cpu(env); int trapnr; while (1) { diff --git a/target/tilegx/helper.c b/target/tilegx/helper.c index 4964bb9111..a57a679825 100644 --- a/target/tilegx/helper.c +++ b/target/tilegx/helper.c @@ -28,7 +28,7 @@ void helper_exception(CPUTLGState *env, uint32_t excp) { - CPUState *cs = CPU(tilegx_env_get_cpu(env)); + CPUState *cs = env_cpu(env); cs->exception_index = excp; cpu_loop_exit(cs);