From patchwork Wed Jan 22 09:30:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859145 Delivered-To: patch@linaro.org Received: by 2002:adf:f78a:0:b0:385:e875:8a9e with SMTP id q10csp244737wrp; Wed, 22 Jan 2025 01:33:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWY7am+b/ngvMkfUcVux5vQSOSCVsF1qo/oFp2/Ouun6ZZ3ORqxt6DaFD6lwWQNXyIe5gPh5Q==@linaro.org X-Google-Smtp-Source: AGHT+IGhaCHALCWyzR0CLFxM7E8CkROZyTo7OOF87ep0LpyoruUb3VQ0A34G9FL8HSnMotr2WldG X-Received: by 2002:a05:620a:2484:b0:7b6:d799:1f84 with SMTP id af79cd13be357-7be631f5c52mr2889850885a.15.1737538391506; Wed, 22 Jan 2025 01:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737538391; cv=none; d=google.com; s=arc-20240605; b=kKC9docZwqdnGsS+qP1lH+KwK7W57b92M/fKpBCDqQqGXOkh4jzNE2gwTC7fFfZT5g +PyqHjhWOYpf8stu9fDLf7mje2CM8AwU4Ufp4kZx5Ty8bt9RG5i/3xUR0jgh1/K4xEqA GKK6qBg/qJ/6x0qHZ3w4OqIsfQvH5S6LapvvBGER7htSK7Os4Pd9budnTeHCItXksk3v cKaFmx2XERdusOdV1pDF2moaBpqzeMv78x+7nLDvxfJQfDrRlHbG7o6lNFOteU4jAPNR 3HhA6mhHBgyH25DzdsV0YRgz3jQUqJoL/qAdJgx7/9Yz9b4NGew0OPrKXje3rY1zDXjR Gh2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=6JCKxl/E/lMfjQGnH4P9B5vjq2aSMsz2teDy8pH82EM=; fh=Brec4ZYd5wGCfOwL/9Q1OxqxWlcx8jJnKse3UD0zpBM=; b=UofkkNO8SViM6giHKmxMwoPZPI6bsPheXy0WVrF2ljLnJBVOx1TVfWZGkADfblBgB+ y60v/NhADeM7u80j9JXMYyPaLIs6S0+lmjyt3AJOqgI4+1G46n7EGSwQeQd6xq0kMBM4 IUJjB4XejMsq55BVjbuVVaZdMuLCQexQWT4ILVP8j2M8Bm6NTC+Uo+vb+veGHGp1VDLy 7GLwmh+ezgG7O89jPWO7aijo/MAqeR1NqlpkqpDPL4DSuh/+7JvPvzH8M0FQlc47cmEb S+z5beoGhwho0eVrDao3Y5+tjzFF4ZcLzANchO+IsOoVata6hfh5X98WWRWV2ACmCwFj h23w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="m/B1MMkW"; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be614dd03asi1442467985a.460.2025.01.22.01.33.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Jan 2025 01:33:11 -0800 (PST) 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="m/B1MMkW"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taX4Z-0001Jq-TF; Wed, 22 Jan 2025 04:30:56 -0500 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 1taX4E-00018e-Tc for qemu-devel@nongnu.org; Wed, 22 Jan 2025 04:30:39 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taX4D-0003BA-8V for qemu-devel@nongnu.org; Wed, 22 Jan 2025 04:30:34 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4361e89b6daso45837965e9.3 for ; Wed, 22 Jan 2025 01:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737538231; x=1738143031; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6JCKxl/E/lMfjQGnH4P9B5vjq2aSMsz2teDy8pH82EM=; b=m/B1MMkWWSrKSgyIWzgIaeTOlUetUXpzjal2EuskhFuBPVCib1GzovGejuoVVpne4R 7ZqNSMkW2F7FrlinAMmjbUE3idrIuYabvKGNqc3ATqnh7nkiONgJCtmA89489h+AkNtX qNF46DBdUYOQa2IecGMHT+GdqQevd505mdV1K8i+TlqxWr1cfGEQe/o/OXPPvPU29UGD b/3rLni3ahMa1S6t4aDcTzpeR3XcpgKWv8YQ6sL0vqgzdSSVdITwNvbgT/+/nUlKNsux aH5rDX0RdVhmHiJCVk1Vc1L/Ef00zReWC9bYbmvpNlilYJ+0N+r9mebUlyITumqd9KGq NR9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737538231; x=1738143031; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6JCKxl/E/lMfjQGnH4P9B5vjq2aSMsz2teDy8pH82EM=; b=GrcBkQGlW+hP281ojBiqkBwxGvK291qLPrDJK/HQGs5HtB+aMlv5qdSXn+PGON6zf0 pGdGLjq4nYE1rNSMFp/XSeujYTD0Ocvg5KbQVusJidJaG2nwBoMQ3uzgKH6CpohN0LZO P2QIs3ktLMfNvR9+MaoNnjXCZqOw47R3uyY5A/c54OhnLd8GOJ3bQeVzaQ8WIH4Ie3+A mHrOTxnqF+UguA6TXeyDoRuuzpPEUs4Ad6wnP8by8ZTwAnkJwa+QoOcQi5Xrc59mDVG2 RCLFZDFl2DO38HQYaaw1iwAKHEfo9Oqnh6q0jrlF96rhQx+lDQQoiZA/0c2MYjRThDmS JfCw== X-Gm-Message-State: AOJu0Yx/0b/NaggEeUS8aJiuKNhpUdLxJ6f3qzQXtQkKzIAo0brPU8Pi w6XZDpQ+fhnWxXhQY2CCQsYogAOCh/CwTIGulw9TpPSxtSFgxvSuV5IjO8uYWDm3O5yZo6L59iv vTzg= X-Gm-Gg: ASbGncvsqeKmPUmsQ3iBmftuY/58DYm06bJjY8H/4pemaL6hudM9s/fMRsO/Am3XMX0 PeK395K6/luGKZQV9sRPN6B4uXJ3g43UUeyoVlaDWGCU6nX9e4r7j2gE2u+dTtnVf1YQ+43WpCU CuyOh3mOHUHKMABc6aoUDMghnFyQph9GiXch4F7wwVAdT7LhCb0HxoqqvSPvbdf5hl7P6luGXQx FOfmg9b7juJ7ZF2h73Hc6g4iEiR0nUYsGC1oYAl3c7lXmAhBtNKCymr0z++8b4HpbTjCffhjHHq i5F065b/jJyVdxWeF5rTewFCJqEA0n2Ach+PsUBR4bHf X-Received: by 2002:a05:600c:5486:b0:434:a10f:c3 with SMTP id 5b1f17b1804b1-438913cae48mr176319165e9.9.1737538230734; Wed, 22 Jan 2025 01:30:30 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf321503fsm16019060f8f.12.2025.01.22.01.30.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Jan 2025 01:30:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH v2 00/10] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Wed, 22 Jan 2025 10:30:18 +0100 Message-ID: <20250122093028.52416-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 Missing review: 1 & 2 v1 cover: Use cached CPUState::cc to get CPUClass. Main rationale is overall code style. Philippe Mathieu-Daudé (10): hw/core/generic-loader: Do not open-code cpu_set_pc() gdbstub: Clarify no more than @gdb_num_core_regs can be accessed cpus: Cache CPUClass early in instance_init() handler cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro accel: Prefer cached CpuClass over CPU_GET_CLASS() macro user: Prefer cached CpuClass over CPU_GET_CLASS() macro disas: Prefer cached CpuClass over CPU_GET_CLASS() macro gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro target/arm: Prefer cached CpuClass over CPU_GET_CLASS() macro include/hw/core/cpu.h | 12 ++++---- linux-user/alpha/target_proc.h | 2 +- accel/accel-target.c | 12 ++++---- accel/tcg/tcg-accel-ops.c | 3 +- accel/tcg/translate-all.c | 2 +- accel/tcg/watchpoint.c | 9 +++--- bsd-user/signal.c | 4 +-- cpu-common.c | 10 +++---- cpu-target.c | 9 ++---- disas/disas-common.c | 5 ++-- gdbstub/gdbstub.c | 26 ++++++---------- gdbstub/system.c | 7 ++--- gdbstub/user-target.c | 6 ++-- gdbstub/user.c | 7 ++--- hw/acpi/cpu.c | 4 +-- hw/acpi/cpu_hotplug.c | 3 +- hw/core/cpu-common.c | 16 +++++----- hw/core/cpu-system.c | 55 ++++++++++++---------------------- hw/core/generic-loader.c | 5 +--- linux-user/signal.c | 4 +-- target/arm/cpu.c | 3 +- target/arm/tcg/cpu-v7m.c | 3 +- target/microblaze/gdbstub.c | 5 ---- target/openrisc/gdbstub.c | 5 ---- 24 files changed, 76 insertions(+), 141 deletions(-)