From patchwork Tue Jan 21 11:40:55 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: 858949 Delivered-To: patch@linaro.org Received: by 2002:adf:fb47:0:b0:385:e875:8a9e with SMTP id c7csp148279wrs; Tue, 21 Jan 2025 03:43:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV1rHVmuu/QTpsHFvNV3POFCjswl/Hbu5Se8qiY/YZX0iwV74PAtHQuHruBFTXwddmC2VTN7w==@linaro.org X-Google-Smtp-Source: AGHT+IFVc5qCUMbWZZBvrFO5yQ5DurbsT/VPIinCQ3QYoFf3KTz53qA57Fk4ax55bdknz8zwcqDp X-Received: by 2002:ac8:58d1:0:b0:467:85f9:2a6c with SMTP id d75a77b69052e-46e12dd7cfbmr269969411cf.10.1737459820994; Tue, 21 Jan 2025 03:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737459820; cv=none; d=google.com; s=arc-20240605; b=NtTVTrc5voXQffCBmvMQuNwE3g4eVfohaCbeXhc8i/KcjmemfkUfFqqesegWxknWb6 aP0z/0MaJ7OzJQQTrKJCSNrAGXMFM5/NA0b/a9orNaNW9vz+tFcoUIvJwvTUL6MqJ+sL V/Eul5qOcVpgpmsnuPbx+kQPWKCNggUFhp0t2iOSX0ZSEILnhF7wKJzDAn4T+3u5IRoq y7ImAeQgMIR/LvSgzbLB9UxaPa0mBwnvWXLUh5/cZNe/NblAa8JRpS4XBXO9xa4eNpaT 8XsVhYpnn+Q/ElBNrTK/7a12uPfdQk21BRtgJ/e7qZjVkXYbFyOxW34SJ90JmIDMxtbH GreA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Yh+UbdQGf2CtgAWqdvcoJx6GX/6Sn3uz5UbIP9DkSEk=; fh=B7PgRO6ceoQX9QVqUxwheTZYUs+aKW2naPWg2jE2ats=; b=a4qsFUsXOGfRYW85CbWbL1TrR4hypQT3fHf6OIznsoo4TSzBYl58YOmRrzYbD07NOl fFuvurx5Tsh6cRNOfTAf+dF3lMtih2IFIL7awKpxD31HRBI7FVBfTI4J5Q4GPJOm1860 SpKAlH+uYlpaTAjELiUmx4hnJohYbd/tDZvD9eYAtZ7OtsIoVu5pE4dLg22nttgGY+5X ef/1UNK4jabPnOGaLp042Xwl12SKk1TUKrFz8PLi/bqog306bacMFRRElo9YjLOYxXYy YJ2DJo/OiEQYxBvdqDSCMbshhRRzf7GHz7wEAen9treUW3c16EX5kYLQMguOKUlOFGbs okBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iVXMX4Af; 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 d75a77b69052e-46e22b8a616si86426891cf.625.2025.01.21.03.43.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Jan 2025 03:43:40 -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=iVXMX4Af; 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 1taCdy-0006C1-BA; Tue, 21 Jan 2025 06:42:06 -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 1taCdo-0005mI-4I for qemu-devel@nongnu.org; Tue, 21 Jan 2025 06:41:56 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taCde-0003SE-4q for qemu-devel@nongnu.org; Tue, 21 Jan 2025 06:41:55 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4363ae65100so60368435e9.0 for ; Tue, 21 Jan 2025 03:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737459704; x=1738064504; 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=Yh+UbdQGf2CtgAWqdvcoJx6GX/6Sn3uz5UbIP9DkSEk=; b=iVXMX4Afse8Ls9EleNrGaQi6H1jLrCe8oY+qSVfz5FxobB61/BJPq3+vCmd9tOFnJZ HruneO/E+hQymS7KdnfC3pzkiYmrX/ULB3LjFprmwFuYJ2SjBf/epyGAMIF35I5zc1qk UzCsy6+K2gPLitu6U2WWlI3g7gbw8BRSrU17khVl2CXOObLXJyIv88aziLM/k/amzNp5 52Y//zBSCPm+vcUNMgNiz8usjKBPVFGcNN/caazty6qDl7k7T5pqmdNLhqU978AgvrsI Gfo8wX3D8AiIpYx0FiSwVKLpbr+AO8rXar0dshP1Ni8WSBv9xzjI7ijUQLivBIM0DmfE w9Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737459704; x=1738064504; 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=Yh+UbdQGf2CtgAWqdvcoJx6GX/6Sn3uz5UbIP9DkSEk=; b=Ra2Phdul7BjfIgGl0I24aW6aR9qK1VnbifT8yKSU+M6oA0HlK9tYLYSTTcUfF21KN2 ySRZ+HG8jHqYbT1JSNw+D1G5Jo6uzZz6yMi8ueL7RMGcpfvc1g4QqoUskj0ALeFp+mL9 VbJwIaAHKhWVGq7N8LGG1SFtstSduoAhYGEnsxkRmIrxOZMHPQ0D0AbUfUEl/AnUNbei IopH27vmtUg6F7rNITqg0Oo0PhrcY40xEUdHQM9pNwAl9aYtF91DlALsZsQzmxjdtcf4 vLvuDAkySrfMLt90ynwzIxXD6n0c1Di5U7VGh7rDtx9ntCoV2cgw6mRBCnsfUGfA3dQ9 K59w== X-Gm-Message-State: AOJu0YxdrV24AhiO6GoAk0+XvsCPKhUSbJHJjsYWuHQ7vhZz55THExMV zMGrNAs44D2kOEoga7rguNj5v1PsSandDc0d2HDm9dne1WpRdh4wED5z9b5skTCiCx2UqH67fF9 OVJo= X-Gm-Gg: ASbGncsMzJe78P88Zrt3UZF2VwaHoCnPCWzQJWjtN9cp+Jh068knsZi/Oy5sExXm/Om HRbC5roJKXlpGejA8LtKkGzXbjfWlBJYDDdFyc+F4kqMPSJ7N8XoX4FbDhhBHOe66WVC0l/wDDL ZqAmI/nouE5+xp3OsIn1Tt3PkNzVkwBrsOWw4IHjnpOLfzReRh5bb98EqqaTDD/9Vb7ndKuEQxv PofcHaf5mg/Yi0RVXRdyUqLPRIvYwwgGCOeWKUpeQ3gEaI1Xp0HUwrH/arCbZUU2FRQVwbjjgdI GI+bQH3vNSJAONqi9avXd/pAHy5CVkaCMQqm9y0ZBK1t X-Received: by 2002:a5d:6da1:0:b0:385:dc45:ea22 with SMTP id ffacd0b85a97d-38bf57a7746mr18709934f8f.39.1737459704005; Tue, 21 Jan 2025 03:41:44 -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-38bf322ad74sm13306034f8f.56.2025.01.21.03.41.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jan 2025 03:41:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 10/11] target/microblaze: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Tue, 21 Jan 2025 12:40:55 +0100 Message-ID: <20250121114056.53949-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250121114056.53949-1-philmd@linaro.org> References: <20250121114056.53949-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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=unavailable 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 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/gdbstub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c index 09d74e164d0..8b08ed5cb49 100644 --- a/target/microblaze/gdbstub.c +++ b/target/microblaze/gdbstub.c @@ -110,11 +110,10 @@ int mb_cpu_gdb_read_stack_protect(CPUState *cs, GByteArray *mem_buf, int n) int mb_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { - CPUClass *cc = CPU_GET_CLASS(cs); CPUMBState *env = cpu_env(cs); uint32_t tmp; - if (n > cc->gdb_num_core_regs) { + if (n > cs->cc->gdb_num_core_regs) { return 0; }