From patchwork Fri Oct 20 16:36:30 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: 736270 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp401700wrl; Fri, 20 Oct 2023 09:42:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqX/Me9zf+NIOYFXxnEw5/q3EK8Yr3vYqkkS1emWctgfhehBfjSlupL+QvnocBfBpwVMJX X-Received: by 2002:a05:622a:1444:b0:417:b970:f2a4 with SMTP id v4-20020a05622a144400b00417b970f2a4mr2729115qtx.1.1697820121403; Fri, 20 Oct 2023 09:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697820121; cv=none; d=google.com; s=arc-20160816; b=EG2j9y/zek4aJOfolGEVnn3dpMEuenLMQAFQpJDcHaOKfcgb/eP0XVlRAwzZ5HzYcs vCrCPupuBXysvkVOwRPl2VBcW0Z0CpCMTRAW+mWj42/wMsiaYTSAb4+XEFc+O37XROEv yTgCAHFP8rWG63DS3FSnPArWiMc95d/5O9EQGQ2goDogxa87qbcwb3PM7fZrFq20FSL5 aOLZ7/pCbo+7yxYBkU6qaajW5lFYi/d5RiJwDRH12LtYJAGfw90Y9W1pXLczJURDbDTO mOwejjtIozJomgSyx5rbma3vYTjfckMZNJm/0U6R2VSE/DZEh0TZpoHgWCvolozBsjoY kqag== 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=q4kg06JcXQgpZkYD+aAuvNPHOfoXMdKM9u+t0AGSCsc=; fh=oSlZfSRRWU8mSYQl0tamVh8RcW+kuw5yjdTq8DPQl+0=; b=hSiW4OY77kUdXVd8uYm/KZ+Ia7LIayn7vUw8FNzDC6DVuslsdvHHtjAvBpLEiap6yW Ugl9NOLwJu/cJMEt9PNGv/MzTcTPII72G1Gyfv+pABBqgv2hfRQan2NSLvDb5EX7rmME NUjnUfPRguBKNmGY5XzrvcFOvEmq0ztcjOcwsN2kKATmKpeib4nxGW+aZDwQ8qKycN59 ID1bhqAXHafyDNG9viX8nq6I252pmUu7LAjUgWcs5noF9rE2KPI0yP4X2IhpEZROZcZw Bh67bzkQoR30PpO3RO2iXLub2JOyd5avk98S2aZgkXtVrwl6Yyl88c8bssL+TYh49H8Q L4iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y7TDR7go; 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 g21-20020ac87f55000000b0041cbc899cf6si1548436qtk.180.2023.10.20.09.42.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 09:42:01 -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=y7TDR7go; 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 1qtsVc-0003U7-Fq; Fri, 20 Oct 2023 12:38:00 -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 1qtsVa-0003Mb-TH for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:37:58 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsVX-0002XI-3H for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:37:58 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-53e2308198eso1558831a12.1 for ; Fri, 20 Oct 2023 09:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697819869; x=1698424669; 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=q4kg06JcXQgpZkYD+aAuvNPHOfoXMdKM9u+t0AGSCsc=; b=y7TDR7gocgMIl43p3qs3dE9Hi/fpBdYlyg1vuedF75sXYg0bImBkPCLvD65FmDVYQZ t0U1VUeOlQYzyXh3tdsUfFSaRYnQrMoKzysSOLHfRsa9+0kLJQQECZ9TYARW0jBCerOk yaLMyf1420PsqnIgz5yMVMhyLzzCxCVflxkkfJIlMoxFqvYAI63N+obNSsKFVajxRL6R +7KvU/wF7cjU8Cd95j5p2IZU/XbHyr0sYnbasAnf8BTwd0VAqbMu2sQ97I8wDT4HJGzj 9M5JiHYv57eBmMd6qLh+rCv7rdKlGRdfMbtekuRWuodMsDC8kzCw/Hrxw4rrRxNIWkj4 XjPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697819869; x=1698424669; 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=q4kg06JcXQgpZkYD+aAuvNPHOfoXMdKM9u+t0AGSCsc=; b=ukV0haGO9G6Lehz4kpS7bofn+U6i10cqxvBFERzKTt2L0Kqr2qFArnALcq1ZBguS5S F6NTKpW4vCDJWDz7+JX1a5jvvHJabpY2I6PMH24DU/EmdAgZbVXLWyQ1eKint4w3SU50 sFox7B+L+dVc5SoOoEeZ7w6/vEMVBQ472DhD4MmLSm5tER6pd6ikLEUO0GHGAdwUHivS iAQDte1Oac31hiENW5KSBB5MxzDuHURo5fyXOAX4N/g/uaNvGDR4hIjPMptX1IhIaMxl PdmwJ9ZrTf/MQuzqbX9sNPE5gjiBTmahuYkrLj4FNhzweg2Q2FQwrEjdMBCqxDV5KjT7 NJIw== X-Gm-Message-State: AOJu0YwMOC80zC79kdKdDX5pTEk0XJkxyCSsuoJPtgozxymtMFrVdyuj +sZFuQjAHYGQVIc9ZsF63uo8+iEC/xoBaoo7YIE= X-Received: by 2002:a50:d542:0:b0:53f:a4f7:7bfb with SMTP id f2-20020a50d542000000b0053fa4f77bfbmr1828115edj.17.1697819869764; Fri, 20 Oct 2023 09:37:49 -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 c21-20020a50d655000000b00537963f692esm1813284edj.0.2023.10.20.09.37.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 09:37:49 -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?= Subject: [PATCH 08/19] cpus: Filter for target specific CPU (ppc) Date: Fri, 20 Oct 2023 18:36:30 +0200 Message-ID: <20231020163643.86105-9-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::52e; envelope-from=philmd@linaro.org; helo=mail-ed1-x52e.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 Enforce qemu_get_cpu() to return PPC CPUs in PPC specific files. Mechanical change using the following coccinelle script: @@ expression index; @@ - qemu_get_cpu(index, NULL) + qemu_get_cpu(index, TYPE_POWERPC_CPU) Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 2 +- hw/ppc/ppce500_spin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 380bbe1fe6..c4bf3fef32 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -495,7 +495,7 @@ static int ppce500_load_device_tree(PPCE500MachineState *pms, char *cpu_name; uint64_t cpu_release_addr = pmc->spin_base + (i * 0x20); - cpu = qemu_get_cpu(i, NULL); + cpu = qemu_get_cpu(i, TYPE_POWERPC_CPU); if (cpu == NULL) { continue; } diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c index 3b113fbbdb..142bd45f18 100644 --- a/hw/ppc/ppce500_spin.c +++ b/hw/ppc/ppce500_spin.c @@ -125,7 +125,7 @@ static void spin_write(void *opaque, hwaddr addr, uint64_t value, SpinInfo *curspin = &s->spin[env_idx]; uint8_t *curspin_p = (uint8_t*)curspin; - cpu = qemu_get_cpu(env_idx, NULL); + cpu = qemu_get_cpu(env_idx, TYPE_POWERPC_CPU); if (cpu == NULL) { /* Unknown CPU */ return;