From patchwork Thu Mar 28 23:03:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 161352 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1333706jan; Thu, 28 Mar 2019 16:33:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUrcgYfSHGe2SLktxh1MFMdSBQ/+8+Nta15jYnbxXDf7BiuIrC6W/iU1QyutcW2T+M9uXe X-Received: by 2002:a6b:b454:: with SMTP id d81mr29618209iof.109.1553815992894; Thu, 28 Mar 2019 16:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553815992; cv=none; d=google.com; s=arc-20160816; b=cFuRdZq1YjmLQ5pSzJ9wfXnR5xSX7AkE6RvkSEA9fFO+nkWsVjmrkTUBCJdVUNqBS0 3ElGmwpNMK+LBhJihpcSf+ChV0C49u+gCZqUrhObF0X8yv6ABRwM4o+sdaKpPB+hxVYn IB23ATWrd1TN0u0GALDP4OE1hxLXV8ZfMheEikwKppZpqcMOZn5aoTjJL0M1XV9KjqNy 7MA4r5Jx9J+wEKpVInathETJPVDEiMdHVcAqweHo2f5LRW5k7SkB0GY7LZ+WGEf8xFHm J6jUeQ/mvWsv3FT5QOfdCqYN1pFOVBHWfz+dfaWUYZ8Zfwm5dSXb7k/IAJyjPl++4bLJ YVfQ== 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=XXbypCqLv/JV/G+ZWN7gYKqqPT7z1FWuDrtgH72nnxqPzQXfwvTzVjCTQPTSsWqjHk mc3vNbBNy8duD4ibzmeyheMlZUq8ML35zQVytOwXQru6K0wV7+rxHo9+sQ73Uh1QW1JJ mu1hGH1wf3i/BIz79GF9ByQluypaFdDMtkJdyW8kQZ3U1sL0sP3rkhfGO97LSH3jPjX5 o37Dd69yyZDja+v+Voh/wbnOeZIzhHWwkvGykSt4HYyhCGVZl1ujL6mFNn7pX0Hh58UD TmxoSznsIAIeTnGMOgItG/22vWOaUPd3mQmWyTTBsOACKbRgCy1AIBOEXhomosEfgpmr 7R3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zrPea30q; 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 x88si169674jah.45.2019.03.28.16.33.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Mar 2019 16:33:12 -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=zrPea30q; 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]:43338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eWG-0004jB-5n for patch@linaro.org; Thu, 28 Mar 2019 19:33:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eKn-0001jU-Eu for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:21:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9e4r-0003BM-5e for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:04:54 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:34173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9e4o-00039U-Nx for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:04:50 -0400 Received: by mail-pf1-x443.google.com with SMTP id b3so91765pfd.1 for ; Thu, 28 Mar 2019 16:04:49 -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=zrPea30qrJeOwe/TmP9nrdE/TnvY0POaxM0aFVPaDHEqNiAn+5C1q2RdxIV7KuwKKF KxuMjGuhiHEwm/HOoBgJHf0MHAmWjLQw646OyrYPw7hreHuCkFDRqeQUzfYTHXFelPxz aza9q/454yF46ZjLxnn70tYhrKfmDgywVPV3K/rA2s2usZDgowaO7+qbf4i3SXYNI8rw YoPO5wvW1UNdLc1BChDhOcdFePVL1kpaWFFPZzzlfMrF1OAltHhBkUgVaCbc3dWJviAS UlFea3JCxzliHYnBeskVG5DBUDtbIoK8EIX5A4tmnSL4e+60VCEnzq4gX6kFQ9WHHU4T 6I1g== 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=uiM0y9wT4agbcyLkTGi0vNxOHocuXV23hYrbXZuLdB1PkmihDuKBCAu6WTb0a3T/Ew ve/uVYjDYoucETn7vuoUN1HVTmOT50KXlgY5JFfQww+MPd/ios6ioBXvvi04O4yB6QFv IU6otyiHOTCHADzXUfZenP9qvftRK8R5A6VFK+GrNoQuP9tTGm8zT86WgIVI2ALeJOXi fWeCcrkqtdklqZveQWITJH6u2T73KtnJlaFgc4ctGIo9DZBy1wJX5FzYHaVooG0GjpKJ LGR4/DeW2/TCZmpnJpQP8vVhidG55iCNyZFCtsGyfHbb/LIEwfEOsVwXJMI99djvDwbj aN4Q== X-Gm-Message-State: APjAAAVEX0B7IXr0rNkukLvajHAcpq3mpWEnAQx2VF9sRxgz0BYkUHVh DatEVnQEwmrsfsHCtJEBNzqindJ1thc= X-Received: by 2002:a63:d304:: with SMTP id b4mr29528499pgg.300.1553814288555; Thu, 28 Mar 2019 16:04:48 -0700 (PDT) Received: from cloudburst.ASUS (cpe-66-75-72-255.hawaii.res.rr.com. [66.75.72.255]) by smtp.gmail.com with ESMTPSA id f1sm280911pgl.35.2019.03.28.16.04.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 16:04:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Mar 2019 13:03:53 -1000 Message-Id: <20190328230404.12909-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190328230404.12909-1-richard.henderson@linaro.org> References: <20190328230404.12909-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::443 Subject: [Qemu-devel] [PATCH for-4.1 v2 25/36] 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 Reviewed-by: Peter Maydell 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);