From patchwork Thu Sep 14 02:44:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 722514 Delivered-To: patch@linaro.org Received: by 2002:adf:f0d1:0:b0:31d:da82:a3b4 with SMTP id x17csp168614wro; Wed, 13 Sep 2023 19:46:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvQ3TOKyHf2vWJA7MuwzRDxBK2Z1SpbsQPjpUXTNSSgJwTuFBYR4Hpn9Jwfx1ACdQfuIrK X-Received: by 2002:a0c:aa82:0:b0:64f:3f83:4f5e with SMTP id f2-20020a0caa82000000b0064f3f834f5emr3879906qvb.9.1694659571226; Wed, 13 Sep 2023 19:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694659571; cv=none; d=google.com; s=arc-20160816; b=BrtW1958MyTe+wOwINoKlzJ3637nmb53t+1pL88nvuQbp7kNbPLzGxp3Lt6jNrEGKb kE/4VDckDmyDC6x9xxvwvkPssEJzaDd8x4YffZ0cUcu2etJgOACQkXy/9eLPg37xG/Ix 7V55MtZYNzWVCeCmHaHDBPTGKpkMsRFV4ekxh5kVqOud383Nyl3FKnVPDfOeE8gdfsY9 XZ5thNEVV3seOkRxPJMv4+Cn/TWtQPbCBiy32/1cigQIzX/SMqYDogFHzwtAoojVabHj clj6Bbctyzphsa0Srk3FUXgMKs3XnNiscHM69QFcXLrPkwXQCnq6D97QxNuBAzEFrCR6 FHdg== 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=TSI6jMDyGvSeRKAEMOfAI3CC7dsAbVaOANUJ8Ij2cAM=; fh=hDn/fDAvdH8as8KUfuhQfhp9TjOOsPx8dCoE4FbO+Y4=; b=WdNh1RrdFp8ep3bQY0Dnu4VRn/usXHlw3ATnu0RH02m+ivZP/15KXLhVBzEmJmUBc/ KqmJg+pTno5GoEgGVevBMSv/GNQwt4ats8Xp4VEhjhgmopLYFRnIlKymL6/6bWUc16JH ZJ5cD31LsiIOWI1USPiZSG00EBPMAzNewDs8lyG2iVCnPvfFHokG6iUtG3o0upgfytIu 8cva8aGBtNJqOoyWlHDgfjVAS6yeW1j694lvQU8baJH8438Nsqo/QvVycWN4ayG95BSc btQ2CskqEiEgcuwE6+jpcphIvj3DmwpTcV6u3JJw0XvmerQyLT9zv+5GELaMSmbyb2WQ BlEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WpqQRwm9; 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 d4-20020a0cb2c4000000b0064f3f7850cesi317587qvf.588.2023.09.13.19.46.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Sep 2023 19:46:11 -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=WpqQRwm9; 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 1qgcLa-0000dW-Iu; Wed, 13 Sep 2023 22:44:50 -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 1qgcLY-0000cU-HM for qemu-devel@nongnu.org; Wed, 13 Sep 2023 22:44:48 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgcLW-0000gc-F0 for qemu-devel@nongnu.org; Wed, 13 Sep 2023 22:44:48 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1c336f3f449so3736415ad.3 for ; Wed, 13 Sep 2023 19:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694659485; x=1695264285; 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=TSI6jMDyGvSeRKAEMOfAI3CC7dsAbVaOANUJ8Ij2cAM=; b=WpqQRwm9KzpxEoHZcb3KzAYt4paeRjBEcT3xKoY8XKks6EJw0BoTwEhCOsrDSJSLyD szdk53mEL9z9WwKZ3FuHOD9pz9q/dBIwHjqVmb5ZRgiwGHuw8hApk56MPXLPJNagqyO6 +02FVAMZYidtDZ+kCSfTKKsiQJ1z4oBLp34RLFCsZfNnlsC+QV3ANx9aWagGm/hPJW7d KigWNV3n65vWUd9YU9/N8Aek4arGZsjeyNoUlgaVarC36SXqOE5FPcbMl+rccPDVEn4Y bMd3zqJ3wDp8RQUffMJQHcQxZGP6Jum3sT1wEciJPFJtSE4IsQgT1M0/X9OuWSq0wGQh cJFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694659485; x=1695264285; 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=TSI6jMDyGvSeRKAEMOfAI3CC7dsAbVaOANUJ8Ij2cAM=; b=E9IM6pbTP4WV8qxTt4j9LoUpYGQKA9goQJwxsJdNie71VBt34ZFVJ9Hyq+s4WTLe2J Nhr49PN4YRAt4L/mM/5E5y5Fzv9Wts3Y75fYpCaUxpLe57hcc2zenAHCB07H/VZP1hI3 70F14iY8rhFeXJaEBvv+dCn3T7fK/vdvmhpguiu0hAfRtnocOGjO4HCWXwhyTtyDylhU o+F6lkbxLjLdWPcJknze7z1JM3StJrxOgqrnx2IzrrsGc3H1SB0QYyDR38Ta0etzXoq0 5pbJjjEUE/PZIfs3SvycXLklgKroHrosDn7pFsPpdYfhADu3kelEXlQwm6SF84YCdTLL RVfg== X-Gm-Message-State: AOJu0YxXuImOYNv+QgooXzQUoiAnKLnresP56wkrCZoXSYfTchcuTkNC wkbYhkyrxnPOYiW5uLiiMYbH+1KDsMf/ivD0n7Y= X-Received: by 2002:a17:902:cec4:b0:1bb:ce4a:5893 with SMTP id d4-20020a170902cec400b001bbce4a5893mr5771520plg.30.1694659484979; Wed, 13 Sep 2023 19:44:44 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id x24-20020a170902b41800b001bbdf32f011sm304336plr.269.2023.09.13.19.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 19:44:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: anjo@rev.ng, ale@rev.ng, philmd@linaro.org Subject: [PATCH v2 09/24] accel/tcg: Remove CPUState.icount_decr_ptr Date: Wed, 13 Sep 2023 19:44:20 -0700 Message-Id: <20230914024435.1381329-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230914024435.1381329-1-richard.henderson@linaro.org> References: <20230914024435.1381329-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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. Signed-off-by: Richard Henderson Reviewed-by: Anton Johansson --- 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 c3c78ed8ab..3b01e4ee25 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 1f289136ec..44955af3bc 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -440,7 +440,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. @@ -512,7 +511,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;