From patchwork Fri Jan 10 18:04:42 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: 856276 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp359338wrc; Fri, 10 Jan 2025 10:05:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWy2vyO9QeNBPvaYLoE1gm+DPNTjRHNU2vjFpswTlWzqsB9ouxqIce5m+IpFY5h4NscMpCi1Q==@linaro.org X-Google-Smtp-Source: AGHT+IGj4Hywn3uYYJxSI+To3ZE+cCYaDuvtvV128v0JufySWEG07Ech4UtRSc9beYgdvl/5Vj0n X-Received: by 2002:a05:6102:a48:b0:4b6:1ce1:30a4 with SMTP id ada2fe7eead31-4b61ce132famr6173130137.21.1736532340510; Fri, 10 Jan 2025 10:05:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736532340; cv=none; d=google.com; s=arc-20240605; b=Z6M+ivXbjkqecy8mdcbJPU4lS9iX5DXf28n2ofK6bnZPclS7tn7lOpnR9bIuz5e41s Fq041LKTXWYVrDDQQidoRClfItCFYUaOESpXRttKHN/QDISsf7WOp9G9EQlK/KSnjepq yO/yAcD7tCySCQTdXs/vs+IdJIxg4AAWG59MkiTHnQBgEcs31+z+ZrYCheOY0lLawH/i Y/2i/Z4Xqctmo+aqxIulo8+5xiy9T3XpbE1kKE2MWTT8H62KteRbSUvET0sSrOoJTJ0X 4mHGXMsj/Dl3dXLZaS/JOWYiAxIj1NA3hkFM445ghZJzoXC8uPkF5hFt57n3mRY9C6Xh eNXQ== 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=q3tDYW/FZQAb+LrrJkOjtGoxqsuktWpm6SvboahZVVo=; fh=u1DmPy787MKR1yK3PXAuEYfyYnfjfaHvk+Pu2lI+sEc=; b=HabDjphwq9ojYwpvGgP9M/9qtNU9lug0cT/pZn0/eNyRbEv8ixstTbvFIf/nXxyOEa a0gaIQBH9ZdWIZCgvp63K/fehWliU9ReqOoDYj8/LaoSZh3Iq46etCy84BTdTy1a2OZa nt3OI5mVV7eSJxEgwCn2CwjDzZqoEepEnqfEC0JZon9V+T5w1oGKHqcJFpvIQV86nt30 PlQ7rSwwB/oicJNedLLQ9kBpslHcJyc8CRS1UgV5nXysQId5xJwNcwCQty0Lu9kJ2E6O 2dbPveOZ+aO3918PIxJyXL10cz4R8vAYOANBekkM5BXgPON8GoAAuXU2LPGUCCWHx/um 6M5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JvUgCCpt; 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 ada2fe7eead31-4b608fb2e94si1790703137.61.2025.01.10.10.05.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jan 2025 10:05: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=JvUgCCpt; 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 1tWJNY-0003fs-17; Fri, 10 Jan 2025 13:05:04 -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 1tWJNI-0003cz-Mu for qemu-devel@nongnu.org; Fri, 10 Jan 2025 13:04:49 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWJNH-0003sL-3e for qemu-devel@nongnu.org; Fri, 10 Jan 2025 13:04:48 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3863c36a731so1718218f8f.1 for ; Fri, 10 Jan 2025 10:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736532285; x=1737137085; 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=q3tDYW/FZQAb+LrrJkOjtGoxqsuktWpm6SvboahZVVo=; b=JvUgCCptPiaSlJ8Npq04f7a/b601oKRxDduCT3GF1xOAxhTl3Cjc6sQnzB5Mn9CdUe CWqP/xI6mh0eAAF6Oj99NJd3rTrrsNflSd51r+hzrCMMbOwSvQLLRq1NR4rOQD3UHoz2 K0fNGNPa+kcFdCN+rFdqtYqRqg8XOAI3gOdc8NJvkW6c8HPbdUolUfqCdieEdcV3TLIg QfDeVjCofjGFqyNN7FA7Q3ZTm7Ry996lvRm/ffD/Ikgt5SX7sfDv152l9/5ECW9VC7zq 32qXAJYtlRDjRpfSLEaIZPiL1X7DoLoDvN7YtNIXFp25n3tvtOK7X8aG+XQMffMrW1IY deYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736532285; x=1737137085; 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=q3tDYW/FZQAb+LrrJkOjtGoxqsuktWpm6SvboahZVVo=; b=bfxGRLGRIvoC3A2DtvafoiVxI52Sac0XG2B/ungNOg5lyMd66aShH6xU2yt1pD+RYp Ei2uK8nj8f+nwdBnJSlweju22ql1WcVCTi772YaxhWXDEXGF0jxsoTR8wQwIUE0wBXlg oTotoj4p5jZv80IeyfebbK8Ahxh/hTSQYLZ0mzgpyoBrMduIbv/cSmkDQ+l7Pk+LX+rU F53yEX9KUWrJvaLAenBqkgYML6ClGJERA9W5ewZ+58vNJ8cTfnC9A76BWDiGZGVkODEv mAvGfzLUtSw485rOCUtIi8jIVD2ea/jTcINIaEWOx6q0cvGYDnZbaU0w9O3HzLFYCoK3 PBgg== X-Gm-Message-State: AOJu0YzbI3UcyBdmpgbDJs/oiKmvJcPjTguQi6fXzm3dtWZtEhfo4whs v325a5QdKor2Y0cqf2IoSRHTShgmeA+2P8hn297q44dW2PrUyYJ32niQ8hseSf0/CycrxPwys4L oELg= X-Gm-Gg: ASbGncvJaVCPsHCYKhggzYeZPcM6ysjRV/5TMWpnhw1QX+d5Rc+qvAzRl/KFODWQY4/ TEGttjlTdsclyR/3jAu90BG6geo8lRSTL/hWpTZBFP0mtYpZ7uC95fLT3eZE+ppAWbM/5UwtWwN c7rXknjf6HkYihm+0s2bPgDmaAEFM748EwTlqms9fQ9FN+Wpq0Lru2p393XxOY9gZnIafeq1OvA SxAvbpfqZzmjPI8A18NfP1udjOVfhAiCtnkEsfDdMKzMey+6r9NStcO2LDmoxJBS3V8hJHbYwEx zVNkW3C/62b2NQhZXgYHtEdR2Ztqmro= X-Received: by 2002:a05:6000:4011:b0:386:3835:9fec with SMTP id ffacd0b85a97d-38a873306cemr11936213f8f.44.1736532284757; Fri, 10 Jan 2025 10:04: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 5b1f17b1804b1-436e2ddcda3sm93762025e9.22.2025.01.10.10.04.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Jan 2025 10:04:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yoshinori Sato , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH] hw/rx/rx-gdbsim: Remove uses of &first_cpu Date: Fri, 10 Jan 2025 19:04:42 +0100 Message-ID: <20250110180442.82687-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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 rx_gdbsim_init() has access to the single CPU via: RxGdbSimMachineState { RX62NState { RXCPU cpu; ... } mcu; } s; Directly use that instead of the &first_cpu global. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/rx/rx-gdbsim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c index 02fdbdf824b..88c8f12c101 100644 --- a/hw/rx/rx-gdbsim.c +++ b/hw/rx/rx-gdbsim.c @@ -127,7 +127,7 @@ static void rx_gdbsim_init(MachineState *machine) * the latter half of the SDRAM space. */ kernel_offset = machine->ram_size / 2; - rx_load_image(RX_CPU(first_cpu), kernel_filename, + rx_load_image(&s->mcu.cpu, kernel_filename, SDRAM_BASE + kernel_offset, kernel_offset); if (dtb_filename) { ram_addr_t dtb_offset; @@ -153,7 +153,7 @@ static void rx_gdbsim_init(MachineState *machine) qemu_register_reset_nosnapshotload(qemu_fdt_randomize_seeds, rom_ptr(SDRAM_BASE + dtb_offset, dtb_size)); /* Set dtb address to R1 */ - RX_CPU(first_cpu)->env.regs[1] = SDRAM_BASE + dtb_offset; + s->mcu.cpu.env.regs[1] = SDRAM_BASE + dtb_offset; } } }