From patchwork Wed May 8 00:06:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163590 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp2004881ilm; Tue, 7 May 2019 17:31:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFhdVTqAYfNs/1bdF+285rYOLH5b+J6XZodlwrIpJzuPN9hl2owpMqjiT/ACac+lPE/M5D X-Received: by 2002:a05:600c:2043:: with SMTP id p3mr730350wmg.43.1557275500621; Tue, 07 May 2019 17:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557275500; cv=none; d=google.com; s=arc-20160816; b=DGkOFkMfBwvRvDbBR6bABh9qq6PihZHP7VYN7FaYy4JHV85w5KjEuMzLLY2zd7SJpc Q1csT5csGGvaDvvLCmVVCw45Vjc90xH5p5cpqpyQALASp07FDIRgIabKg8OqwURzj7vd U4Q5sVgqQCioT2gJHxa7+cz9DPkniSCiqfAxHv1TpQEx0cJjLwo41H8w7OZ4JXhgqlBx AwTN5q9/NybE7N4SxjoA/QzgmZVFjUk3N7PLRgwrEOLALlJggWB1d5mnzwIs4wdEU1fw Z/Q8crBZLC5iirKEMWT/RFEFdNh9ADxWbhgvfEAFN3BKp7/BioWXVqpOiaM9C0mLgg8p ZQ3A== 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=BFtz5URzR/E+vzG71O/h8BWE9C65m1gz1E6Zde9gnDc=; b=SU8eZQ+wzZVEi3pp29S/bc6TwD+w6MJCziBRXwgm4tOQ2HthLuVHmf+otnBGtt4YrI 2bxx5VEQDblsC1aJ/76qbafwgpWAJZb71k4QKein4lP008HmqrolAIX9VtSaB+01NPMM gbO2YzQEQOZFmYiiBtE5cTnd4qocGbx7kDYehLUHrJMwSbi1UTcmmc2Kr9Ps8SaMX6iJ JcF00SxtnzRKSK99Kta++RBhmJpn1AwJTlIAMi8hH091AiOMXn7IfB4XjhcFOr07vDAK LJrzDt5mnluN02zd+3Yvp+j2+1OzBPXv818IkfG629rT9Qsk6YdIFCcGtw+u6CSLnrPM N5sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ad6+1B98; 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 s16si11377233wri.229.2019.05.07.17.31.40 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 07 May 2019 17:31:40 -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=Ad6+1B98; 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]:56740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOAUk-0003mX-Ko for patch@linaro.org; Tue, 07 May 2019 20:31:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOA7L-0007ow-TB for qemu-devel@nongnu.org; Tue, 07 May 2019 20:07:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOA7I-0007X1-TW for qemu-devel@nongnu.org; Tue, 07 May 2019 20:07:26 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:44222) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOA7G-0007JA-So for qemu-devel@nongnu.org; Tue, 07 May 2019 20:07:23 -0400 Received: by mail-pf1-x444.google.com with SMTP id y13so9480791pfm.11 for ; Tue, 07 May 2019 17:07:20 -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=BFtz5URzR/E+vzG71O/h8BWE9C65m1gz1E6Zde9gnDc=; b=Ad6+1B98HeUJs/WMd6q+BNYLk1PN9bgyvsM6NUt05RLRmTks0RLMlPF1X6hHMSk5R0 g7V2DShAlwnATqeEvvsDQ20FG+UMKoBSI7ZysFiRKx6UFs3RvWJxdOKqxCnUcDHeTbM3 18qv7wDuYC91N0C6GHtNYiUXNLcGcN1pcpCOVQvyZ+/ZkdeFk2XGUjxJW7hL8+MQOTKV E4Zj/C21/6C3rjaxn14uMdKe9iiFFPAj7aGnvyYdRXRHA5KQtMaEr5ePETg+wA6IBSw0 LyjGYa2nXIDTQYmiIgSnX2PPRX0kizzcJMjdsEAwJMvU+OpU9qiZJeT1IJeUa7Zt1cHe DRTg== 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=BFtz5URzR/E+vzG71O/h8BWE9C65m1gz1E6Zde9gnDc=; b=CijOrPNbOVDiB7i6m7WOZRzt+WqJi0uhmOuM+cOZN7+9aCWh1TM7Tkz+9Hqg74j7WH MubKDzYnEzQxSE4ev5E7gagatAlwWVKEzb58oJoAOljowvdxAYz6/9zraMbyLZhU5u4A kb1BCOWOlgG4IRSMNQx7ydm9jsqpONFzZay0TJ/j/MQ4UkGefoHeo6XuB4S9CEQC6FiG udoF+eTqm6pvQPtnyOkPB/Z+OU6Y+n520TonKxOohTapknIchQZBM26f3Kk3iHCfTxlo WJ0HgBMO8SlLWmOfiIf+avyo01JgeQIUuBJO3eitFIIkW64CjcBuZ6fl16voIz+oRQMx bPhg== X-Gm-Message-State: APjAAAXj7c+Md4IZQ8LQ8WFQm4yl7Ef+ICA1HRNEDq3nE3yjP+MeAW7k ij2ZGggkhcGtCnQV11AywoA5u9qj34Q= X-Received: by 2002:a63:246:: with SMTP id 67mr12167448pgc.145.1557274039289; Tue, 07 May 2019 17:07:19 -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.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 17:07:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 17:06:30 -0700 Message-Id: <20190508000641.19090-29-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::444 Subject: [Qemu-devel] [PATCH v3 28/39] 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" Reviewed-by: Peter Maydell 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: Alistair Francis diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 4c997b6d30..fc3328fdf5 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 */