Message ID | 20231020163643.86105-5-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp401503wrl; Fri, 20 Oct 2023 09:41:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhuVlk9zBoyu4IVmn15b2kinHA25q0MBbY+B95MW6Wnk0vMcfq0V5mhTPa4kKoC+Y31h/N X-Received: by 2002:a05:622a:18a9:b0:403:b088:5d3 with SMTP id v41-20020a05622a18a900b00403b08805d3mr6699793qtc.17.1697820095636; Fri, 20 Oct 2023 09:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697820095; cv=none; d=google.com; s=arc-20160816; b=lRAh5UkUq2SKaLUCx3UVR3kqOEAfK8sQvHMGiKk9WNxKYcDhwSdQhBtZK/0eRM1KBZ oPkWnqzKyV9GV8B2zUk4x2zBiFbXAd5W32zVeVU6qcemc0HRbX/xQEXjBIbX3gED0oKb 8/KkQvNrxj3OQLYgfE9h+GiYb0o9aW9mqsyzFySrThw59kc+WG20EGYfjd/pXFQJHbD1 3lRSnhP8a81Zn9I62WABbsx+fqXP8kzlPz2JYL6BIZHJgOktKkvDCIXlNmxGcIVh6up+ WyAs+2Ep9cuouC/dsQZ+m3PRzDHztca+aC1hQgy3KAtow6oGNRDr48RvVzQvW9kz2WdB y4zw== 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=zp11byryPsUZ+4H8wFI4Zq/E/xqbK9hz7sAlcv7KVqc=; fh=YykxacOnBx+desRKZtA/DkfVhI7YzzJSxK9pg0zyy9Y=; b=At1cMl/VYzrEMTyAw8ddIbwY9hgHNVM091sqbul2Wu8wMJYgwq1CPmP1sqwouPtYa4 COKR9Or73OmFGsz8Ni5i5kMpeTUTM516SVE/GADb6cxNcCVN91OU3Sm0LtF5QvcMv3eV 5zCIudZypDMnKHhmAHiFK82Hby0OzRI22cFk5x4nNi4YPv5UGsDBgo/WXrqjB1rYF6jS +NAJpmIrB20JmrPtpEWXwFVDNMgTNwgEuoUY9lbK5+5p5TPpgYZ3TXl06Qt25CNnElfB 4/PP/iPkHmNWTbGluo9UPxLOJ48nnZ+ougpUkjbSfU1j8H4RiybRjWDSVD5ekNnfZmqn yLqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pLFg/Pqw"; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v20-20020a05622a189400b004180bc0da7dsi1534938qtc.397.2023.10.20.09.41.35 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 09:41:35 -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="pLFg/Pqw"; 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 <qemu-devel-bounces@nongnu.org>) id 1qtsVb-0003Mh-67; Fri, 20 Oct 2023 12:37:59 -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 <philmd@linaro.org>) id 1qtsVF-000362-DB for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:37:38 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1qtsVB-0002SK-1p for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:37:37 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-53e2308198eso1558078a12.1 for <qemu-devel@nongnu.org>; Fri, 20 Oct 2023 09:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697819841; x=1698424641; 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=zp11byryPsUZ+4H8wFI4Zq/E/xqbK9hz7sAlcv7KVqc=; b=pLFg/PqwhSxLxyBpw1me7T4KXzVJ/MTeFtyPi8i2DFSvz4V1SOGcmKqQPt3lOh1IKX pWHOF3VZ3bOnTtH/6uMNsOwUG44qWCBS+GVl2zoi2J2OIF/APym4TrQBRKhgv0SeavxC /JgPk4WEieSKaQGwpnin3b0l+7YnznBXqU9QvgBTyK1EohwGXaMs0VqhjErz60PXtRC/ WrMzuzxGXSiAXkQenS8xQ5sFducfDLWTa/j6RRtulpWz2M7vIpcCADD5xetMU9rNg14u V6cfVEhduT3TmuYTI3Vl3TB4P9epli+zbi77/Hx9fkQTYLCPvK7FmfCOjLOLtID0odvc ldqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697819841; x=1698424641; 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=zp11byryPsUZ+4H8wFI4Zq/E/xqbK9hz7sAlcv7KVqc=; b=cdFiAYw6kXvjlmerwNMxpaJwWSbZUpJfcV9Fd13XMKHk5k2B+3tkqnB9iEUhT5hn7A IAPKL9HDl4X9qaEnFlgzGHcLsK3yekyD4+9ZBNMPh/ksBRWjELiWSLaolUVbqD1Xf7Xt 66o7CxGll0mJP4+bLY7THESB/IFj/phxU89TgTtysgaMS0iSlBY0uHd7z7OcTJ0ZmNAm kdsZBebQOsLJJTYc+JKwqqh6iXz647gMlqiJtn6HJOCSbvfZjXH5RV47FXrOuW8CQjWn y0MZaIl/6hy4l6ZSa1vxWFp6Q7stgv+7MFUze0/s3/y6LctV65NC1u1qVO4qYylWDQhq 0B9w== X-Gm-Message-State: AOJu0Yxd0rgAvyauhl2Wb7i4q7K1szGm0ALFHU9sUCdL2TNhyc2XznCe 38P3/SmdYD2/hpovRsiRW9eDHUec1APU/2EDg0w= X-Received: by 2002:a50:d542:0:b0:53f:a4f7:7bfb with SMTP id f2-20020a50d542000000b0053fa4f77bfbmr1827246edj.17.1697819841503; Fri, 20 Oct 2023 09:37:21 -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 n15-20020aa7c68f000000b0053eb9af1e15sm1738773edq.77.2023.10.20.09.37.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 09:37:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Thomas Huth <thuth@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Alistair Francis <alistair.francis@wdc.com>, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, qemu-ppc@nongnu.org, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, qemu-s390x@nongnu.org, Peter Maydell <peter.maydell@linaro.org>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Zhao Liu <zhao1.liu@intel.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Song Gao <gaosong@loongson.cn> Subject: [PATCH 04/19] cpus: Filter for target specific CPU (loongarch) Date: Fri, 20 Oct 2023 18:36:26 +0200 Message-ID: <20231020163643.86105-5-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
cpus: Step toward removing global 'first_cpu'
|
expand
|
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 902e32a3e3..83ca7d6b98 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -560,7 +560,7 @@ static void loongarch_irq_init(LoongArchMachineState *lams) * +--------+ +---------+ +---------+ */ for (cpu = 0; cpu < ms->smp.cpus; cpu++) { - cpu_state = qemu_get_cpu(cpu, NULL); + cpu_state = qemu_get_cpu(cpu, TYPE_LOONGARCH_CPU); cpudev = DEVICE(cpu_state); lacpu = LOONGARCH_CPU(cpu_state); env = &(lacpu->env); @@ -594,7 +594,7 @@ static void loongarch_irq_init(LoongArchMachineState *lams) * cpu_pin[9:2] <= intc_pin[7:0] */ for (cpu = 0; cpu < MIN(ms->smp.cpus, EXTIOI_CPUS); cpu++) { - cpudev = DEVICE(qemu_get_cpu(cpu, NULL)); + cpudev = DEVICE(qemu_get_cpu(cpu, TYPE_LOONGARCH_CPU)); for (pin = 0; pin < LS3A_INTC_IP; pin++) { qdev_connect_gpio_out(extioi, (cpu * 8 + pin), qdev_get_gpio_in(cpudev, pin + 2));
Enforce qemu_get_cpu() to return LoongArch CPUs in LoongArch specific files. Mechanical change using the following coccinelle script: @@ expression index; @@ - qemu_get_cpu(index, NULL) + qemu_get_cpu(index, TYPE_LOONGARCH_CPU) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/loongarch/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)