From patchwork Fri Oct 20 16:36:40 2023 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: 736272 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp401877wrl; Fri, 20 Oct 2023 09:42:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbk2Mp6NjcaCpTQoKmV26kdZWI3fBkFOQDVEnNIMK1ZZ8fcwUl77G2cHd8P/X+oVWBSQCE X-Received: by 2002:a05:622a:138a:b0:417:a74f:69b6 with SMTP id o10-20020a05622a138a00b00417a74f69b6mr2942844qtk.65.1697820145283; Fri, 20 Oct 2023 09:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697820145; cv=none; d=google.com; s=arc-20160816; b=kVG6jObZmDHc5ZmJNQ7AdNtkAYm5Ya1hRFzXnIYQlXuTwrzx3tDdI8m3ozOEQTjym/ KduDpwgr7rPSzf1Jw+IFVkfkL3ua99eGNPSAPoZDwuaS1Hz+QjuA4587c9eXRV1RWB9/ DbRjhkyI5U+hYtmGa93MmmdO9yGCNCoGi0U71+6xFHMAfFO5zPnov67uHA0vA0my5tIs nwL5519j40YbogxRs9q5Bi1oOI2rwoeDZZdkWRv7u8mY4CQhtkItSV6ioYt8jzVOeaYf rr+t57lQmNrsb7mYgL/wjMpZJd3FnugTy/pa18GfekalFwhQodVK5gHTMqOUM3X3scga kcww== 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=DwpnvxLwaI95t3fo0bAhEO0dcxZPMEfx1RWmGk2WvB8=; fh=gUlLUWkIPL0onzCD3xYUadRbfkDHrqUfxzqZ6cOQM4s=; b=K60PiO7LwMVoNbDcQE1n9mZnMIZhj6coLweabugWTK08Bh8WD7I1vdSdFjR4mQKY85 baFWjkf5fLyE6SzIuyoH+YjdCp1Kp1QkYwsD4ajFCUJd/U0fZ4avmK1ElLEs+Wj0BYjH tgdQ5zbPzmrupDiXHI6r2+4ALfxXg3xta34UhAcOFAtQ00yfGAOEW3jx3SO3je3+OXqV 6m3ryixSbbXRQNgUgZ/oE5ShJfeOVGkOHHtU5ByljaUOmXQBaJkKZM08pj+dKN/csHbs EabxfPe5Kkx7W7dZLw2mU7Fh1H/arnVPIlQoELD818Z4Knfr1vfXICnZGfxxktAUdGjO 9FYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xr29MCCK; 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 w3-20020a05622a134300b0041b7738953bsi1577831qtk.79.2023.10.20.09.42.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 09:42:25 -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=Xr29MCCK; 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 1qtsWp-0007Dn-9O; Fri, 20 Oct 2023 12:39:15 -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 1qtsWh-0006TC-4B for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:39:08 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsWf-0002tv-Fw for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:39:06 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-53f6ccea1eeso1518767a12.3 for ; Fri, 20 Oct 2023 09:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697819943; x=1698424743; 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=DwpnvxLwaI95t3fo0bAhEO0dcxZPMEfx1RWmGk2WvB8=; b=Xr29MCCKrphnTBEUOCv1rm9Zx2q9loF4d4rUJqbYKPPd+OxCN01x5rMFb5T+ygKQEj BUUaHkZ+Dk+YkbT0bfX8IjuYImBemIvNq7OyMHSG7lkFyzr44VIu8a1og/b4uQPOtsJw 8KeyaWpemNkS5FWfVSbTj92MyyH3FLg6zGz8Uzu4+lTwvg/8eu59vGS4Y9xBS4Rx17ky AkIepag9lUxTi5utxKt5EEu/hdxdfUVpE4z+RhGWRlti6af4KwMSyyOfntXK2t7Yn3/D Se9n83NF/CzaxhHDUTAf3so8Eza2LnmXM7OUKJ7vIOnd8YYCz7VFDFd+HHAhgC6cVkRB rXFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697819943; x=1698424743; 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=DwpnvxLwaI95t3fo0bAhEO0dcxZPMEfx1RWmGk2WvB8=; b=M2rr2FYsiEe+lRAbB+l8c+AlJrzxrh6aXvhfg+vausZftSz5xfkq8yLiaCbvC8Jd+0 nPIGzsHWlieyyWbTHIwz+VYnR3cQr3LAJm3aHJLC10wnDAYpvQ+HeYZT7/Joyqf9bkzy KWUZ32SfevJCYuSEEEjUmIjbfvhocsg+0F/SiS/bKZJaVNDngqcHam/+VAD55EJyU2rG oSdfrkIotqELTIfEHV4Fu5Ka1RLlko+ygACXCXpDe6OthQTioFJY9+DLSqrwTLYqMsnC PCjrAip+jPr7sVdimrrsRS8UsbQsAwa/a/4ivwDqSVGKVpFygh3ZawvC/eAw7IpEZ2qe R4zQ== X-Gm-Message-State: AOJu0YwMYgK92mXdfIUSTwGvhTgDzGmSlJ63wtP9U+5Ry0GRZ797iDYz D7yuPgVCQg9l/q4ssdfWiyCG+hRDfRj3/DLdca4= X-Received: by 2002:a17:907:80e:b0:9b2:aa2f:ab69 with SMTP id wv14-20020a170907080e00b009b2aa2fab69mr1819995ejb.30.1697819943414; Fri, 20 Oct 2023 09:39:03 -0700 (PDT) Received: from m1x-phil.lan (tbo33-h01-176-171-212-97.dsl.sta.abo.bbox.fr. [176.171.212.97]) by smtp.gmail.com with ESMTPSA id 16-20020a170906019000b009b2c9476726sm1819672ejb.21.2023.10.20.09.39.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 09:39:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Richard Henderson , Paolo Bonzini , Alistair Francis , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, "Edgar E. Iglesias" , qemu-ppc@nongnu.org, Eduardo Habkost , "Michael S. Tsirkin" , qemu-s390x@nongnu.org, Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Yoshinori Sato Subject: [PATCH 18/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_RX_CPU) Date: Fri, 20 Oct 2023 18:36:40 +0200 Message-ID: <20231020163643.86105-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020163643.86105-1-philmd@linaro.org> References: <20231020163643.86105-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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 Mechanical change using the following coccinelle script: @@ @@ - first_cpu + qemu_get_cpu(0, TYPE_RX_CPU) Signed-off-by: Philippe Mathieu-Daudé --- 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 47c17026c7..091f83cc60 100644 --- a/hw/rx/rx-gdbsim.c +++ b/hw/rx/rx-gdbsim.c @@ -126,7 +126,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(RX_CPU(qemu_get_cpu(0, TYPE_RX_CPU)), kernel_filename, SDRAM_BASE + kernel_offset, kernel_offset); if (dtb_filename) { ram_addr_t dtb_offset; @@ -152,7 +152,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; + RX_CPU(qemu_get_cpu(0, TYPE_RX_CPU))->env.regs[1] = SDRAM_BASE + dtb_offset; } } }