From patchwork Thu Mar 28 23:03:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 161346 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1330931jan; Thu, 28 Mar 2019 16:30:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzelnmpcJgU5xpH6G6PFfV175PHXxj2aGDW8eDwj5sB4JRQNcSdgmpIeNKJhARlfEjl3x4m X-Received: by 2002:a24:254c:: with SMTP id g73mr2246888itg.77.1553815803128; Thu, 28 Mar 2019 16:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553815803; cv=none; d=google.com; s=arc-20160816; b=Hm8xb+mLkP8lz1hiM5SYaApb+Ey55kZDLXn0v1fspIxr4H1SpfbU47mUZPQut+nrpP wlcpRpbBKFAn+Pr9igPzscAjNaX2PcUIlNeVQGMy69Zem3cLBZ3esJKKHGAbVm2pGS+A Zuc6FCi/0riQCO1vwaNGZC9geKi8Rr6iczZlRMAG5a9k+vnnG2JGdeFS2KhWx9hORzcG 7eEMRwTL34/PIVGv9BgVWlmin5I1pykSmdvsLgmVop8UIIWouio69KnypAjhk0DqB8ur lzScbHN4Be4uQKKnR9ecqmKCUdidDZB1sd6yPxptBtSQOu4mGSiG6PPeJCaO0iiQdWbi Jlrg== 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=KTPu0A4yRZk6SAccQ35Jw9mugJOMEe3GiZ5yoFwzJeQ=; b=i5qv7zojI7TPLnJMO0AIqG/DL+tw3dl5auRKca18MD7cw0KuDd9H291mybkh4Au+QE pGy5a1sW2jMwG7DpFjha8IAjrfaSCI/Q/FyfcAyBO7SzLJP6TmS0iWWwI8oFrHUTII1W FNJgqVB+iSGhJXoX5SMKcoIYrEl2UgFeEjmm0GseyWL/wCVHSaYma6/TiU8BxbZ9bGDY 91Ry5EyBJx4wiEWUke07hueRt9Efr3q9qklXoGZU1CHYS+X3Ya5S4lLXXAz+FEw67s70 LPqhySsJ3W93TpXSyuu0eDcd0R+oHg3RwgYhd5IuZc8lpzoQNjMs/4UM8oUvRu7hXuQb 609Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qei9l4a4; 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 a14si210788ita.35.2019.03.28.16.30.03 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Mar 2019 16:30:03 -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=qei9l4a4; 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]:43282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eTC-0002IO-EH for patch@linaro.org; Thu, 28 Mar 2019 19:30:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eKn-0001dn-71 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 1h9e4t-0003CT-8u for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:04:59 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:40541) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9e4r-0003AH-44 for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:04:53 -0400 Received: by mail-pg1-x542.google.com with SMTP id u9so226312pgo.7 for ; Thu, 28 Mar 2019 16:04:51 -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=KTPu0A4yRZk6SAccQ35Jw9mugJOMEe3GiZ5yoFwzJeQ=; b=qei9l4a4aCT1BMIbIaVcsjId2A/VAk3XvO/xBXzKYi7aO8HiV0r81/9BrAGCq/RL7X 6y7m/CkzqO5vG9OKjrwjQbl2/zfY4TX6Jin1lrfAXLHcpaiXWNguPUQO196Do2Jvlv4E IDyTCwDov8Tm9Zbi/iIjiM3h/fxVKRrTm+0RDQTCFxMJFphm/SfIU+vXTMTGY1ZvbvKx nkKx6OonphpBNPQ0m5gm6xvGkZ08bNNlSXphiVndbAxIFgdnYpIyP2Xf2IXj5ZBPF/cC wmwnwpjDfrBhXKo/ew+4TPE+P6mQN0Gsg+dfgvtpFsp6zM4WzFTQ1eV1gbS4nFAkotaI jNsg== 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=KTPu0A4yRZk6SAccQ35Jw9mugJOMEe3GiZ5yoFwzJeQ=; b=R72i4U/oj3aE9q1ilzUKmTXSCoK/a3ZI1XJxybQg4gWNs/J29jiIfSRmoXI+P8F1Bm mtGHVleF1zdVn7Dvt1a+6mlzhs/CMdmddQiV4/tbm8i/aeQuLtS+y+lZf4Hjj4uysSf9 tqhet5kmoDa9M/fY0umRbU6tpWWnv6hoQNAVLi6qfvD2c5cwyeLDr9YxbC+PgoQmeqok DZ3tUw+AsVMbsau8LsAY/KP5XkT6Z7USdyjD1e2SX5JLYsUdIhxx9fIAGE+hc8p9K0Te TfGojiYsK4CFcK9kFV7Ji5oH+roCcVbYlDioslT3hfWTv7Jw0z916axzMYFHo0WDbzYz TCdQ== X-Gm-Message-State: APjAAAWM77l6+44TtkdewTT49NOY9HmuMNRIgRPaRQamM1+BWPhJExy4 1Ae/o9wB2shqPojEitZV+hS7a3v1R6o= X-Received: by 2002:a65:518b:: with SMTP id h11mr42728631pgq.41.1553814289959; Thu, 28 Mar 2019 16:04:49 -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.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 16:04:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Mar 2019 13:03:54 -1000 Message-Id: <20190328230404.12909-27-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::542 Subject: [Qemu-devel] [PATCH for-4.1 v2 26/36] target/tricore: 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/tricore/cpu.h | 5 ----- target/tricore/op_helper.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index ed32622388..9ea5060a87 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -208,11 +208,6 @@ struct TriCoreCPU { CPUTriCoreState env; }; -static inline TriCoreCPU *tricore_env_get_cpu(CPUTriCoreState *env) -{ - return TRICORE_CPU(container_of(env, TriCoreCPU, env)); -} - #define ENV_OFFSET offsetof(TriCoreCPU, env) hwaddr tricore_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index ed9dc0c83e..ba2f21a6c3 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -29,7 +29,7 @@ static void QEMU_NORETURN raise_exception_sync_internal(CPUTriCoreState *env, uint32_t class, int tin, uintptr_t pc, uint32_t fcd_pc) { - CPUState *cs = CPU(tricore_env_get_cpu(env)); + CPUState *cs = env_cpu(env); /* in case we come from a helper-call we need to restore the PC */ cpu_restore_state(cs, pc, true); @@ -2800,7 +2800,7 @@ static inline void QEMU_NORETURN do_raise_exception_err(CPUTriCoreState *env, int error_code, uintptr_t pc) { - CPUState *cs = CPU(tricore_env_get_cpu(env)); + CPUState *cs = env_cpu(env); cs->exception_index = exception; env->error_code = error_code; /* now we have a real cpu fault */