From patchwork Sat Mar 23 19:09:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 160966 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2184884jan; Sat, 23 Mar 2019 12:30:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvmESyUv0NjODSjOaLkr891dGYisdYN9t4IZg1V9MY9PSeiWbbJQ2CKQVDuhbQc+Ha4vyu X-Received: by 2002:a25:4a07:: with SMTP id x7mr13006326yba.351.1553369408622; Sat, 23 Mar 2019 12:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553369408; cv=none; d=google.com; s=arc-20160816; b=ZXGC/lhstkcAn0kcUY3P+AyyJSiebXYl2gmySpIryfuGTdoryviNyn8t7JGGBQZkDX nNTZLl18M1bhWLeRp0sIIWMW4sdQt6q+FEJGnlseO1uiWc3QpqfeO+c2GWSpOcaPJOyz TI5+QynekLYODrjFL4fY4WkmaRabadMvV76IkRF7vauE8aMgsy+dnZYhypImudppry4i sUwMiqdZikQpGd0rrwhfS8amSoMyZw+vi8uvqrOfqcDT7ZoD8q6SDPJJUzkae8p9euxT iS3Im7DCmFv/0+Aan5mGD6wgoFjkqxaxOfcFgJI1led7ylsg8gD/cWutSZnFrRtphMAl g83A== 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=RMLV20NoAAHxOYYjZUgH2bsAP15O5mtIcw4toA3zm8E=; b=a/AZy9mYG2NT1aj6NwujG3g6xNcva0PihVgvFnhd1+fAziH9TU7CupyQwP0VXW2wDo XpuYW5+MbDCQpJIpgAg99T97St0/zZWY2PfTu0XTaKbuQv3H97BVp8Ek0iblo8xVyGYV cq6zKN25vBq3RajfEejYSI7Tlbrsz9FStqCXAUINtsWWzCE0LzwnxGrpF35Vr37IrZip nz68tXkn+jTBSUhd7mqSGz+CpQ4soWuP2H9iE94D90B4ElsprBEmGAmxMu8bDQ96c0qt 3eiHm5BJeT0HiZGy2GCFXHfJDaY2Gxc33yOdziWp9LSVCUo/T/cePeWH64lh3anMEDe+ Sqvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e25Xq3lM; 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 m132si7177044ywc.124.2019.03.23.12.30.08 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 23 Mar 2019 12:30:08 -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=e25Xq3lM; 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]:47026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7mLI-0004Cr-5H for patch@linaro.org; Sat, 23 Mar 2019 15:30:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7mFh-0007mr-Al for qemu-devel@nongnu.org; Sat, 23 Mar 2019 15:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7m2c-0007bx-Om for qemu-devel@nongnu.org; Sat, 23 Mar 2019 15:10:52 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:38888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7m2a-00072w-Gi for qemu-devel@nongnu.org; Sat, 23 Mar 2019 15:10:49 -0400 Received: by mail-pg1-x543.google.com with SMTP id j26so1693523pgl.5 for ; Sat, 23 Mar 2019 12:10:00 -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=RMLV20NoAAHxOYYjZUgH2bsAP15O5mtIcw4toA3zm8E=; b=e25Xq3lMBmEHuJllJvj8HUqw7iYacqwu+LJMUOAsj0iF63andl3Dr19VKYloa8g2Bk tKNlJcIMZusYPfBWYyjYUercl+95LV4p5FRj7m286o6fCbs3xaDAGDtqcQdAMVENsXTC TpGLmnWq+Et0wNDZGxLbaOD27DGdfVIySr+pPyMNL1MtfJPd5Gr5RKb/E+iReUBuKbGh t6X4Om2ljDlbgkIWgeyE2IpOz6tw010+TWP6E9jZVB+2DJXOvkwEUBfnmiS/s6hweXlM dj+mr89C59lcw2FfdHXLhcKUNHWcQkiqwDtkXuQgmotryg168RlbwDdFooFfwSKhVF8T GttA== 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=RMLV20NoAAHxOYYjZUgH2bsAP15O5mtIcw4toA3zm8E=; b=tbU5UhFW2iAjMlsely6Jfx/uWz0z29FJXkcxygoQJlVNHpDbC71VutOK+o92yr+isB eD07rm5NUgPe1epkP1vS3RS2YtvAP8Laaefvi5H56pOL4WTjSkrwtpL93GVk181fLPYg GQo+qgJ2ruVUFVt028X8QJI1oo+AYOnIy7IVhN6+WcWiwLPFULwRxxeS2IB1bmBDe20k ow0prD/nGwhHsATat6b/RxV8JNxzFrPgT1oQKptjy3vqiQiTZ1CfuHETsdNjH+QueS0y 4nhtcUlrhZqKw74jx14IUaHXCCYjhtkzc+yJ7tlL0bR4yciLv1Z8DA2h4pTPuui49nX2 1flA== X-Gm-Message-State: APjAAAWjfnmI5ixPWzMtNblkutNYukERDTTE0ZBjkAPruLmL77ssVZ0x x+NzUG7Jb2jmDFyOGa56oxGox4xOuR8= X-Received: by 2002:a62:7042:: with SMTP id l63mr15557380pfc.1.1553368199615; Sat, 23 Mar 2019 12:09:59 -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.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Mar 2019 12:09:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 23 Mar 2019 12:09:15 -0700 Message-Id: <20190323190925.21324-26-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::543 Subject: [Qemu-devel] [PATCH 25/35] 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" 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 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);