From patchwork Sat Sep 16 21:40:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 723622 Delivered-To: patch@linaro.org Received: by 2002:adf:f0d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1029221wro; Sat, 16 Sep 2023 14:46:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZAiu9WSDwPaZ3O8PBbKzqdrNCwug3eYgXf1Ihv/wG5TNj1dsaaH3QSyOTB/7b4gn1ZT3u X-Received: by 2002:a0c:eacf:0:b0:655:78f5:bef7 with SMTP id y15-20020a0ceacf000000b0065578f5bef7mr5518745qvp.21.1694900804232; Sat, 16 Sep 2023 14:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694900804; cv=none; d=google.com; s=arc-20160816; b=wzboC10NqZ4GEPzSeCvDriEkN78k50RBSFdCEm6tlZGCFi9YeWCDjI3rV4zxajDBXL bL5LABt/3SQaf8oiAL0UMbXu21vErL9ukNSOxkMkTbTCR7sc1NXGm8woNQeARHXFdpFB bTrUQTUBhrFfHIHoPunRNLyBAQdC2k3OxEGM7ymxe/MMoSwxzdHHKsD8b7DB2izCjFNy 7EXBfxOC3T8VgChuy8wXZq/CIVB0ZjM0ucbyj/GN5u+7FbxYolLZSZcw3DbdjIjHsDp0 GuEn2aqsmD/w5J6p7K/vDqBhIKIV1DCYIIVqHT4gg2xnEmPy4iU49AS/D8h9JZ42+wKo pXrA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/HEEMFcGWCyxqTgAPUxdG/wjpw2eKp2fOJzvzeuqm9E=; fh=d3q967Ss27yOZEBNWb7WV1pwIIYORDjfLhLmomzC17w=; b=ApirsPhpPrQoRTgUvcbWdbF8igEV1ZrzD7p30o8oSaaKX/Pdysy2KPfytY4eKKpU7A ekjL9lwqTYyanh2mysj6tkky3/ApIWwAvElj6wmPmjCDLp2gV0YPa6jyP7o/PJ8vsnA9 esOoo6/vaq+SrR2rdRK5Y34LAuv5gKKkKX0lWw32Hdb8N4ksoW65vQoX38yi3iV0Oqlp ohF4Tg0mqCLIdqkjHcg13qLWLLCerHgCng/kh07CTMVQD+EiWwI3XnelLhsBu+QBr2P1 HiEdJykzBFS+cNvGNGY3I20gd6FT1helWDylWEGeRmUBwEwVUBwCYHJHecFuS+kIEeRt 3Mjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ihi4ZrGw; 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=pass (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 bk32-20020a05620a1a2000b00767c50eea70si502833qkb.375.2023.09.16.14.46.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Sep 2023 14:46:44 -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=pass header.i=@linaro.org header.s=google header.b=ihi4ZrGw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhd2q-00056A-Je; Sat, 16 Sep 2023 17:41:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhd2l-00055V-Kd for qemu-devel@nongnu.org; Sat, 16 Sep 2023 17:41:35 -0400 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhd2j-0000Qy-MZ for qemu-devel@nongnu.org; Sat, 16 Sep 2023 17:41:34 -0400 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-57325fcd970so1985680eaf.1 for ; Sat, 16 Sep 2023 14:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694900492; x=1695505292; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/HEEMFcGWCyxqTgAPUxdG/wjpw2eKp2fOJzvzeuqm9E=; b=ihi4ZrGwJoUA0KCQtUf7z6VC1n5nkoVp7ugXLmALbBZZvTpJ+rM3le3GEsyZ4+t/ZH UV5kDHYDv+qU153oygWmx1Bm49Mn+UnhW1pnCDqj0oTIkR4C/DNjwPco3oK32AVURFH+ KmJoEy6FcrKW8og3pJuDr0ZeLftBxRoIMWgfXcp8205ytRqnUqjefwofVuT+VS9PDHbw N6B/aw4pJmLWQ465+cOd0VU8hNJQPNRcmT70rgSP2MrYnwpAOvlpbnTcGzFckH613WGv 3Cy2a1fI23oPMA4kWIu8Hz0EGJKiSUnx0lqh9hqq+vnjRcgIh21IsTxMkKFgY5A+9w7x nvbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694900492; x=1695505292; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/HEEMFcGWCyxqTgAPUxdG/wjpw2eKp2fOJzvzeuqm9E=; b=qj3NXZeznmjIj2OTaYvFgTTkrYa6Fi1+CqxKeYpucBuaz7WIyLbJOsA0+ft5uy2/Ku xqZbgzDL5/5FrlXbRZVyEya+kBUP93UqUxgCy83Oxuj4eJ+hSOdXeLXFqEzjDKlkzGJY 5se/ej0/F0jIMsRUKToMib5C8aUAgKmkASgmqqa9oYFHRpXaKLGTA2ljaE+/jt8JyJZO O4a4qYM1MAfB1dKj+DPdcDaqjiKtHvtwUaWZr9yOMEkmaGSq67B9B4uZCpqyiTYHKNX/ xEMHWC8Z2PJ0GQrmb5aRSzENrDByigBmqJ9lHpO2MwjWbQAtC3AaMN2LgxJ7eS4mVoAg VrdQ== X-Gm-Message-State: AOJu0YxwANNQApSkTUEx+/NnaIAIIqIwiqCEMq86EgMiI9zfyuhD6w2q ezgkckYqUyujxVmmNiFSdf/m6MXwczKCYWNDy9I= X-Received: by 2002:a05:6358:9389:b0:142:fd2b:d30c with SMTP id h9-20020a056358938900b00142fd2bd30cmr5866353rwb.23.1694900492427; Sat, 16 Sep 2023 14:41:32 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id n21-20020aa79055000000b0068fde95aa93sm4871708pfo.135.2023.09.16.14.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 14:41:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org, anjo@rev.ng Subject: [PATCH v3 08/39] accel/tcg: Remove CPUState.icount_decr_ptr Date: Sat, 16 Sep 2023 14:40:52 -0700 Message-Id: <20230916214123.525796-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230916214123.525796-1-richard.henderson@linaro.org> References: <20230916214123.525796-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c2c; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org We can now access icount_decr directly. Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 1 - include/hw/core/cpu.h | 2 -- hw/core/cpu-common.c | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 165a271642..94fe80c979 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -434,7 +434,6 @@ void tcg_exec_unrealizefn(CPUState *cpu); static inline void cpu_set_cpustate_pointers(ArchCPU *cpu) { cpu->parent_obj.env_ptr = &cpu->env; - cpu->parent_obj.icount_decr_ptr = &cpu->parent_obj.neg.icount_decr; } /* Validate correct placement of CPUArchState. */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index ed1bf8dbf1..4609cf1ae0 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -429,7 +429,6 @@ struct qemu_work_item; * @as: Pointer to the first AddressSpace, for the convenience of targets which * only have a single AddressSpace * @env_ptr: Pointer to subclass-specific CPUArchState field. - * @icount_decr_ptr: Pointer to IcountDecr field within subclass. * @gdb_regs: Additional GDB registers. * @gdb_num_regs: Number of total registers accessible to GDB. * @gdb_num_g_regs: Number of registers in GDB 'g' packets. @@ -504,7 +503,6 @@ struct CPUState { MemoryRegion *memory; CPUArchState *env_ptr; - IcountDecr *icount_decr_ptr; CPUJumpCache *tb_jmp_cache; diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index ced66c2b34..08d5bbc873 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -86,7 +86,7 @@ void cpu_exit(CPUState *cpu) qatomic_set(&cpu->exit_request, 1); /* Ensure cpu_exec will see the exit request after TCG has exited. */ smp_wmb(); - qatomic_set(&cpu->icount_decr_ptr->u16.high, -1); + qatomic_set(&cpu->neg.icount_decr.u16.high, -1); } static int cpu_common_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) @@ -130,7 +130,7 @@ static void cpu_common_reset_hold(Object *obj) cpu->halted = cpu->start_powered_off; cpu->mem_io_pc = 0; cpu->icount_extra = 0; - qatomic_set(&cpu->icount_decr_ptr->u32, 0); + qatomic_set(&cpu->neg.icount_decr.u32, 0); cpu->can_do_io = 1; cpu->exception_index = -1; cpu->crash_occurred = false;