From patchwork Tue Dec 12 16:29:07 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: 753090 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp2010272wrs; Tue, 12 Dec 2023 08:31:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IERWu2Fp2Qkh/bHaRNOhkon+SsNie1TdbNZ9EZw8mtzP5Ct/Tf90Q7LIxlQbnU7R10zhBqH X-Received: by 2002:a05:6359:5e15:b0:170:2955:8747 with SMTP id pw21-20020a0563595e1500b0017029558747mr6140256rwb.54.1702398683858; Tue, 12 Dec 2023 08:31:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702398683; cv=none; d=google.com; s=arc-20160816; b=OxYJNS/kb0RpdeIKFabnX1LJIyUMswKJvcAJtytUcFZOjO8MGUG1gKqqm2TphxnRg0 N+4Tlyx+oZuZfLqCxAH/8zkDnWH7ZuTm4mIYsEF6zEeC1Zh4RJfBnx/ZA6ommdf513Tz GpfAQySE2/lGOUQtTVE2yJysbrAPC75fxzpjbytJUq31arv6ZnjCfR4xLNte3EfrI4Oi T2bJR2DuYhDRRiaVBq3IO1LLWD6XUN0aBx+dM9iZTg8OQ5Vco9fWcEcUf+1owxsJub2R t95Pkd9nDpfUo31SwmwvmXbnYyfLyqDP5Niw9BezkOwxl1NISJEgsQhWjcu1Hz3B46qX h7IQ== 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=ekMLwFEwN8A8wVtLlfYqHUo8mVDJrO6E1RnF8kOlbaw=; fh=CkupYgn1Qmdh7jizui9HJgGegpqbRR5NXz1VyjRE1Hs=; b=tJ+B/5bLAICLYcFDk3qRZvvcMu6L+FCjKmdsbpibLSU5J/UkK9QpEEqIaGsfZO4HWV 9zrqDzxOW92wHXOSr1/HDDtDlBjyzoSZ7Ok1HrCAbQ95AjyugL8e9JKQuEE7Ta/kUjqe zJMc/55Eo5m8z5dX/gLJFShMam8Gc+PqXx5AgGKT8SgDvnLQxyLtBqHnQzDBPXxYxxXU EaGs5YweR5bc6yYwuBT5WIGs05v49zEVAmcatSXmr/RFt2XpEsZ3yXIVxN6YqLLAdwpO r1ebdTRZa2iXuX/gBLGcu539JcFu/He1lpdPLfaRgyOajXBjij+yTvo9OkOHIvHGAr6Y lhtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="U/UqdqvJ"; 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 de12-20020ad4584c000000b0067aa61ec487si11042304qvb.94.2023.12.12.08.31.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2023 08:31:23 -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="U/UqdqvJ"; 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 1rD5en-0001dM-L9; Tue, 12 Dec 2023 11:30:53 -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 1rD5eV-0001E6-Pu for qemu-devel@nongnu.org; Tue, 12 Dec 2023 11:30:44 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD5eT-0007Ne-Rc for qemu-devel@nongnu.org; Tue, 12 Dec 2023 11:30:35 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-54dcfca54e0so7615481a12.1 for ; Tue, 12 Dec 2023 08:30:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702398632; x=1703003432; 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=ekMLwFEwN8A8wVtLlfYqHUo8mVDJrO6E1RnF8kOlbaw=; b=U/UqdqvJ37PDhenvSeJhM1nXjGSgCqx4kZfsqJmJKzzCEnI7OZQW0mNNXwtIWpM5F9 I5xWV8xwOZQkR3lWtFKw5yYrWlk6UumekbRw8BvASOrxO4n8LUKMV5i9hotOjK9Ex+ZF fHBO7pbyclBAxhvN7efSoLQL6E3s7Y2cAACDXmaoPgX3OAfgmDAw9ztFLXTYdMjpyMTk DL44oXin4+27KxAcJ1lO7UBhsDdxR7PXtNtJXaP77DMVRdvTpznydaxbqk8/0EV/Gp1K GNAkFsj1TOL731tGl2rPlB+qhLDai0UJKqr1EGtHTUBmiwIJJxXWzxC5ooaDj7u1gZRe RU2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702398632; x=1703003432; 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=ekMLwFEwN8A8wVtLlfYqHUo8mVDJrO6E1RnF8kOlbaw=; b=ddM+YCPJG/GJYqpOga1c29rm5TMcwVCB+uFfvQ6yLK+LuN3rJJzmThiBh1V/PE3GAF Iv2BQ9/5EwX4/DnyhhstC3mZHtK7gmFUassS57AfMWdPqVC/D4oH9Nbcm5rp2nn9g398 CvjJ8VzJPvQEiQAHYqbiLf1QjnO67HRS9DSHeLqRcSwNsQj78vSs4ToBOf4Cylx5GYeL IJazhQG3iXRAG//lR2as3khM7YVM4EwHeA64+d8AWvVBSPnIzBvqzcUZe0+U2/b3lWZl R7MP9wkU6Z61MaZfobFDAnWKDhPMmHQgkJyml8U9NfTEnUWiXQChdg3ggM28ItMOaVEO nnaw== X-Gm-Message-State: AOJu0YzeaJH4X7lqZ8wERMj8Z+6OJ6Vg8JvsvAa8BHjcsDf8v0iJuFC0 u3TlRbvvTES/vqNmHr52f6wyCXnnl1WTiMV0sL4= X-Received: by 2002:a17:907:3d8e:b0:a19:a1ba:da4b with SMTP id he14-20020a1709073d8e00b00a19a1bada4bmr4130827ejc.114.1702398632039; Tue, 12 Dec 2023 08:30:32 -0800 (PST) Received: from m1x-phil.lan ([176.176.175.193]) by smtp.gmail.com with ESMTPSA id vw18-20020a170907059200b00a1712cbddebsm6453045ejb.187.2023.12.12.08.30.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Dec 2023 08:30:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Tyrone Ting , =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , Eduardo Habkost , Joel Stanley , Alistair Francis , Anton Johansson , Andrey Smirnov , Peter Maydell , Hao Wu , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Jean-Christophe Dubois , Igor Mitsyanko , "Edgar E. Iglesias" , Andrew Jeffery , Rob Herring , qemu-arm@nongnu.org, Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 07/33] hw/cpu/arm: Alias 'num-cpu' property on TYPE_REALVIEW_MPCORE Date: Tue, 12 Dec 2023 17:29:07 +0100 Message-ID: <20231212162935.42910-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231212162935.42910-1-philmd@linaro.org> References: <20231212162935.42910-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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, T_SCC_BODY_TEXT_LINE=-0.01 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 No need to duplicate and forward the 'num-cpu' property from TYPE_ARM11MPCORE_PRIV to TYPE_REALVIEW_MPCORE, alias it with QOM object_property_add_alias(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/cpu/realview_mpcore.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/cpu/realview_mpcore.c b/hw/cpu/realview_mpcore.c index 72c792eef1..7480b38d1a 100644 --- a/hw/cpu/realview_mpcore.c +++ b/hw/cpu/realview_mpcore.c @@ -14,7 +14,6 @@ #include "hw/cpu/arm11mpcore.h" #include "hw/intc/realview_gic.h" #include "hw/irq.h" -#include "hw/qdev-properties.h" #include "qom/object.h" #define TYPE_REALVIEW_MPCORE_RIRQ "realview_mpcore" @@ -68,7 +67,6 @@ static void realview_mpcore_realize(DeviceState *dev, Error **errp) int n; int i; - qdev_prop_set_uint32(priv, "num-cpu", s->num_cpu); if (!sysbus_realize(SYS_BUS_DEVICE(&s->priv), errp)) { return; } @@ -100,6 +98,7 @@ static void mpcore_rirq_init(Object *obj) int i; object_initialize_child(obj, "a11priv", &s->priv, TYPE_ARM11MPCORE_PRIV); + object_property_add_alias(obj, "num-cpu", OBJECT(&s->priv), "num-cpu"); privbusdev = SYS_BUS_DEVICE(&s->priv); sysbus_init_mmio(sbd, sysbus_mmio_get_region(privbusdev, 0)); @@ -108,17 +107,11 @@ static void mpcore_rirq_init(Object *obj) } } -static Property mpcore_rirq_properties[] = { - DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1), - DEFINE_PROP_END_OF_LIST(), -}; - static void mpcore_rirq_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = realview_mpcore_realize; - device_class_set_props(dc, mpcore_rirq_properties); } static const TypeInfo mpcore_rirq_info = {