From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081446; cv=none; d=zohomail.com; s=zohoarc; b=FqEKhFmxibylA0RjmTKR35t5t+o50hb4n7zpRVfTRhM8rsY8UxxwxkrYAIwa2/IW4Y/Qk5BZXpUmGgD9iUC6aEfH/Crte6rwGvNUO5MiAoEdD+df0vJxVYAKAxvkjRw7HFQu64GEj440fJ0whWVAj/hBwlGKz5EtPigZVV6DWeo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081446; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eo0SdoR6qSJ49xsDZEZ0yqz4VDVUEvJcVdzt8nM06Fc=; b=at/6WZYjg32sukEe8Y3nLQLdmMi9x17rjvIEgiAbAwNUbOYCAJvQ0zXOo+24m/ayOZQHEE9uatkzd532kx2jS02/CHkbBsWaBX4giDzuVA6BGV7HmTCHSCq5eRh/MfiuQba98D41tiykJHGOt0zrD20hdDFw/AyPFwYlXyTPvWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081446052124.45537081359817; Fri, 16 Feb 2024 03:04:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0E-0006Fn-Od; Fri, 16 Feb 2024 06:03:34 -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 1raw0A-0006C2-KT for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:31 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw05-0000nL-MD for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:30 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-412529f671aso1185275e9.2 for ; Fri, 16 Feb 2024 03:03:24 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id b7-20020a05600c11c700b00411c3c2fc55sm1934681wmi.45.2024.02.16.03.03.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081403; x=1708686203; 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=eo0SdoR6qSJ49xsDZEZ0yqz4VDVUEvJcVdzt8nM06Fc=; b=oVkk7Hq5kNVZHb9M5Sg0jrWnn6XpqE+Lcq+BnZM/XsAACDTAdO50z4VhjTxf431+NJ BSlLLLGOFhgGI08RjkYjIyTgr2QIvBz5EJ12W+5IAURw6Z6rzzh5Ws80m5DeKOoyJkgN hj3q5Gm7DWJoPn6xzBtA+8uWzxru6SWCH70aDHhrb2fSxjilV7WojaU14UA2CEUAw+6d mGJvwEOxM0BFij11r3GXNiQxwuKMk4Urh4R0EFUrqvjyX39J3PTwuImTWAJO1Jv1j40c kie1w2Mtb7nMqeVGTEF9++GWYM2EWc9gwftaLDsJCvy/gFGshNjxzQ1yCL8aT5gqx0Iv UlbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081403; x=1708686203; 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=eo0SdoR6qSJ49xsDZEZ0yqz4VDVUEvJcVdzt8nM06Fc=; b=rq+AlFwkS/0YsYgfYQa62cHE5gaVlNXCqakX1Mu0PLiWPQXurvynvVwb8CF1Ozsvry KRXCgbPa0ArjDvsIIR4PjnXUo+iP+niXkHNN6KlxRrb3SFY49esOsHxDPafSWOGkFGIx 9NhFQtkaEr73w97sm1tswni9wkTB/NkJEprA1XYZ19JNSbc4aGCd8qAYb0hNk3TU6O/F HuSOzVvYMQWmO/J5DKPsyIQ1gloRiBypiQjdR2TOPBW4xGPU8+fVNt1YiSawdKkXdlVV sJKATUHU5n2dWzRzmGvnUDZoPpADCeq46h8gqFqHGtlplY5oliG/mmy4x1BzSzkCsny1 zzNw== X-Gm-Message-State: AOJu0YzQBEDzRfX7IlD7a9IcaDC5qG32RWWrAhyfokNva1vIPVZaqPNZ F7M35NlWwiXTqG+zFE/9CbOC8yr+VenufldC9qTu5Fq+noEzDND4Vw1BmC/dkGvDgZLr4Bx8eGV T X-Google-Smtp-Source: AGHT+IFRPbYqzsy3VeU5xODQnVp/7Dem5fsYgmSpSJj6Ft2wlOkDWP2xTmx5sLzZuvaMqygYty/suA== X-Received: by 2002:a05:600c:1e09:b0:412:457f:7094 with SMTP id ay9-20020a05600c1e0900b00412457f7094mr977358wmb.29.1708081403143; Fri, 16 Feb 2024 03:03:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style Date: Fri, 16 Feb 2024 12:02:52 +0100 Message-ID: <20240216110313.17039-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081447862100003 QEMU's coding style generally forbids C99 mixed declarations. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 196827531a..3c00a87317 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1227,6 +1227,7 @@ void pc_basic_device_init(struct PCMachineState *pcms, */ if (pcms->hpet_enabled) { qemu_irq rtc_irq; + uint8_t compat; =20 hpet =3D qdev_try_new(TYPE_HPET); if (!hpet) { @@ -1238,8 +1239,7 @@ void pc_basic_device_init(struct PCMachineState *pcms, * use IRQ16~23, IRQ8 and IRQ2. If the user has already set * the property, use whatever mask they specified. */ - uint8_t compat =3D object_property_get_uint(OBJECT(hpet), - HPET_INTCAP, NULL); + compat =3D object_property_get_uint(OBJECT(hpet), HPET_INTCAP, NUL= L); if (!compat) { qdev_prop_set_uint32(hpet, HPET_INTCAP, hpet_irqs); } --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081493; cv=none; d=zohomail.com; s=zohoarc; b=GEUJtas5TYEY2vLbVAM4OfcxE3ZqjQ/PjD07Y+aGr2/2ngSyQDH4tNnH5VkxG23ytThyFelVYR+NiVjYVEovBW+bB08NmyAfuEGQU7+6SexgrzTwKgpBNkiFjjAv6AZ7laUfjkJvBCGpjc5+ShIIy/Zff5c8eYQBMdRDaDEE/p0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081493; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=11uvKBQ22hdk4Lseo0ZUQbLGXppus19b55fkM12lrfA=; b=V9bluoSszF+QE7acY9CdcMOJc8f6h0XMXAK4bEErWlZLQkgQXgpqFK+FqPi1/M6MwJq1+Dk3dIqjVltImHbi4PJKOs84AwXdIj18HrwMZt4Wd5OToxS7HSk08HVs2/VBBiPe0rsv8encX3mqvOGr5pCDTAVkn1USD3YoXuNtu+Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081493601840.2053335682056; Fri, 16 Feb 2024 03:04:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0J-0006Jy-Dq; Fri, 16 Feb 2024 06:03:39 -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 1raw0H-0006JE-Mq for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:37 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0D-0000oV-Ia for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:36 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-33d14a711efso681052f8f.2 for ; Fri, 16 Feb 2024 03:03:31 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id ay3-20020a5d6f03000000b0033d1b760125sm1780146wrb.92.2024.02.16.03.03.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081409; x=1708686209; 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=11uvKBQ22hdk4Lseo0ZUQbLGXppus19b55fkM12lrfA=; b=VVtEuRONg16xx1oOe+nOWr24BGDYupjedUe7m/Ujf6aVZ+6pexCN+uWLFWnvv6/die f0p5imiKaKkivgTp0MnTNlr2Xvra4oKuMAKBKsNCGmky56UcgLPxTSbGVeIA7/qUmts1 hd8JyMbK6VxjKivF4ClO3HOjxZ6DXyTYaRKR/pAf0ei7zKtKY3RtciPy8DQTwKH0O0mV PVUSfPxkL7VgsbizmdK9JWuw7bN5bzjwwdPbwgd6To7jkWDMgWn6WGmBNy85sAuq2WFw ReVQmnsYNRJuTvqgeU2ZhqCVZfMShzvN+mXHUSnP7xeSMjG6JH7Xd1Z+UHpwTVQCgv1e fmAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081409; x=1708686209; 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=11uvKBQ22hdk4Lseo0ZUQbLGXppus19b55fkM12lrfA=; b=P7LMImfzuersiKzc/KF0cXreZa50DDJUzlHICS/l8bnSiE3OVBmmQ9Onu0AhdMm0xu WbwP91Y7vDbrbe7722+nfvWmGBDFpSCXkYM3kwCv2AiKGCQ14F/qiSv/1mt38CPfl3wo ZabAxp6xFsCzK4mhfvLgooymdqd2O05OgCMEHfHwuO3PFzGy1AolUzl88FUN3F/7QKDJ K25+0W5/NnT9T25uowshkzrGysAH/CbstLW2VsAf2VsVzGLkCzbznmAendixsZ0TiFaH zt3UO+PVxFcMzucuP4Db8YHx3kH36SMe87+mVeHKvfGsKRrd5r4fWf2uYLDchODkFDda 81Sg== X-Gm-Message-State: AOJu0Yz1NyKC1+SkmLc6vuZ8+u1psoXTHQiLQ8BeL55Gsy/I6eFvZrap E62uJ5Uhu51RlHuabSeKZvNusKkkZPaNsBXrlpSYcPKstG/4yivQKg4+yP4L4ZjOlYpGVKAS+Js n X-Google-Smtp-Source: AGHT+IFEGlWLlINId8jkLQ8/GP9ml2ND63LfgQ5zuvLNh4i2admrWyka8hFD5GkfVv0excP++UzanQ== X-Received: by 2002:a5d:408b:0:b0:33a:fafa:8cdc with SMTP id o11-20020a5d408b000000b0033afafa8cdcmr3540983wrp.32.1708081409620; Fri, 16 Feb 2024 03:03:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH 02/21] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API Date: Fri, 16 Feb 2024 12:02:53 +0100 Message-ID: <20240216110313.17039-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081494081100001 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- hw/i386/pc_sysfw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index c8d9e71b88..3efabbbab2 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -107,17 +107,15 @@ void pc_system_flash_cleanup_unused(PCMachineState *p= cms) { char *prop_name; int i; - Object *dev_obj; =20 assert(PC_MACHINE_GET_CLASS(pcms)->pci_enabled); =20 for (i =3D 0; i < ARRAY_SIZE(pcms->flash); i++) { - dev_obj =3D OBJECT(pcms->flash[i]); - if (!object_property_get_bool(dev_obj, "realized", &error_abort)) { + if (!qdev_is_realized(DEVICE(pcms->flash[i]))) { prop_name =3D g_strdup_printf("pflash%d", i); object_property_del(OBJECT(pcms), prop_name); g_free(prop_name); - object_unparent(dev_obj); + object_unparent(OBJECT(pcms->flash[i])); pcms->flash[i] =3D NULL; } } --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081860; cv=none; d=zohomail.com; s=zohoarc; b=GSddIB83Xu1nO6RHwZgOD0lZUwYx4XKNK8RKNF0ygEdX0s83gxKw+B73p59Y3WGit7zXHMWndn8xvKhHufYi2TVHpWIL1gdlWxmUtstBW1LYWbR98vIuH97UjYToNedPxIgZtJBq6LlQBZ13vndrWYFXt6jWdR0am2MsLWgSxX8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081860; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jnkIS3AaHEP065b9a1SZ9IcaJ8jPciqvA+XhsfUsiWs=; b=PzGDL1zF7E4Fe8U8Az3KvE06FxKJiTyxFAy3OwqxWD5cThy0Vvj9TpvGFgHj+AjFGyltKgo1MhxIwokHJZwWUT8vgCG0oEmhOC6ychGCM0YQXwtk+Lq84Am4XgGPs6eKTJbeKCfHVU1LDS6sA49udNS6IUeWb99nhDEVlW0B9Gc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081860713388.014956033291; Fri, 16 Feb 2024 03:11:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0W-0006RL-7c; Fri, 16 Feb 2024 06:03:52 -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 1raw0S-0006Nk-Pe for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:50 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0J-0000pv-D2 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:48 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-33d01faf711so571675f8f.1 for ; Fri, 16 Feb 2024 03:03:37 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id r8-20020adfe688000000b0033cf5094fcesm1863549wrm.36.2024.02.16.03.03.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081416; x=1708686216; 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=jnkIS3AaHEP065b9a1SZ9IcaJ8jPciqvA+XhsfUsiWs=; b=Xwk2xuO8gUd5m24pdtCIK+51HtqI0K8DX6rY4qrU8Oh6w/gcQV50/ngb/AZe4bg9op oBGmuZE5FVtE56VBWhjNE7YGqWErOzN26YnTMUGbNK8nfeWCOJ5waOKdsNhpX46YGk9i Ap8jO/vr8kqza8kGnIAcg+iTVgpDKVrKZIGQlCMIpk0+06OxC4k+AxHzg/MOLVfBh8Ws SiJr5mH3+XUmq8+H80MySpDDzokzqoSiBUvXLkZ75v7N/jROevb06vxxPVMAp+kIuo4m vp8gznQuv7V/eBCNbhENNuVz7c68oBcoDgu1gHFhj/rMWvOJ5RMGL8zrPI1/v/wrb6f2 nAMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081416; x=1708686216; 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=jnkIS3AaHEP065b9a1SZ9IcaJ8jPciqvA+XhsfUsiWs=; b=uEOE2DqwipAXw5hm9+PfDsErJh/nntv2EILfd21EFmfszjzWCjiZSLcgSfp9iQtHL1 s3+5i1UMGc0+kkEdhUDCFjflQCLQ4gLgulT0dqU6UCdtn1zesIbds/YAi1ZKh0+d408H mWn1y6Hqw0z3IiFvo1WvpicJJOdUo8RpncqajZk/RH+rIsA9d+WQZyRCaO3tl+wpinJp /clgXsPYjpVGyEHiiEr882oBo0zmueJvrvHt+K0+eP8yXafGouyJPik6QHPxxI7Oa+4P DA6DapO47ZxCqN3eoOhqgiVHrNOy4Wm1Z53BaEKWP3YZXicw73Bq3eyNM0IZEKGK/iLN sJ2A== X-Gm-Message-State: AOJu0YwI2cKFwE7+MNs4A1m6jlBHxD+bNoU1h75WWeoPNlFqU7h6Nq4M s1QNAJtzitUunRaCuKvCIp+HDpTEGCzsT83v90oLTMWYG1EkYZTJRSk595+WXOf6DE+1ancgt0n G X-Google-Smtp-Source: AGHT+IHX94RGubUwK9zNha0Z7Tr05UGN79hCY5mMek9sIxtt8PGwvMF3xUnkwUzNuyMV2GQiYyBSHA== X-Received: by 2002:adf:f4d1:0:b0:33c:e3da:923a with SMTP id h17-20020adff4d1000000b0033ce3da923amr3667425wrp.12.1708081416026; Fri, 16 Feb 2024 03:03:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Nicholas Piggin , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson , Harsh Prateek Bora Subject: [PATCH 03/21] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API Date: Fri, 16 Feb 2024 12:02:54 +0100 Message-ID: <20240216110313.17039-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081861498100001 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- hw/ppc/spapr_cpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 0c0fb3f1b0..40b7c52f7f 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -245,8 +245,7 @@ static void spapr_cpu_core_unrealize(DeviceState *dev) * spapr_cpu_core_realize(), make sure we only unrealize * vCPUs that have already been realized. */ - if (object_property_get_bool(OBJECT(sc->threads[i]), "realized= ", - &error_abort)) { + if (qdev_is_realized(DEVICE(sc->threads[i]))) { spapr_unrealize_vcpu(sc->threads[i], sc); } spapr_delete_vcpu(sc->threads[i]); --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081883; cv=none; d=zohomail.com; s=zohoarc; b=YjwJNgL4HtVJRghf0Zl6YC4lwoxCcnaVW8yBO7zCVZFxmB91HYP5I0TUtzZXb8nlE34WxriH6oLJNvBI3oThadaYuB/jt0do3cR36A9T5ARyKgVQbb0BUqGW2WFtQOrcS8Nb7KJWQccoo01ZDvBu96k16K78noaIlWREDJS7a7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081883; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kkGLYDX+GSE+ZJ9BSh+2Q16g0HNqBL3+uba9nDXc65E=; b=gBS/VdFIjs5RxvsiNbWyclcKy80VdHmfWmSqHWYxRkax+8PNzhUMx3l01aofN2AQFhwg39iU97okLl2dUhCP2YY52owv7XuSkQMU+jme/KZbWGZ/dts9L5OLLYF2MkVJleBr1h3eksq5t7Aqtuztj+eqHqNLSkLZM6S8Rw8CZqo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081883920231.00609463695116; Fri, 16 Feb 2024 03:11:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0V-0006Q4-8T; Fri, 16 Feb 2024 06:03:51 -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 1raw0T-0006O1-Qr for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:50 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0O-0000ra-SB for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:49 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4121a8635a2so12177345e9.3 for ; Fri, 16 Feb 2024 03:03:44 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id jn4-20020a05600c6b0400b00411b7c91470sm1942118wmb.12.2024.02.16.03.03.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081422; x=1708686222; 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=kkGLYDX+GSE+ZJ9BSh+2Q16g0HNqBL3+uba9nDXc65E=; b=Qnm1dp3sycbUkM+tBK1UduQ6hTzF0RbdoXxMESGYgym/1Aa2naOY1aL2YYD32XicXv hOmC0FtBDCr42KliVaKivFtoIaMa53uaG+y3Q+TtpdublYzgKaSkfebOGAtZJV/Pt8gl DNIinS7b/JGDKlw9PEqXmbYyYFri5td98f97rS2wxzOMVrG2aDIVyVNLKahBVbe7R8Jo PJMHoAs5dSCCgTdy+53XsNRir+cE9BNuo5nR6dF0/LUGKKPuQDlCbD88ssBwmsiH9iTT acKTyG7g6zyMc1ShyhpeClrdUAUvtEpgA0Uvj4cDzsNuXrk1F3eGz94r79+7FGUqWjnw olgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081422; x=1708686222; 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=kkGLYDX+GSE+ZJ9BSh+2Q16g0HNqBL3+uba9nDXc65E=; b=nh6VAnCSnKXPHKt6EvJHkDaHpzzkADzg975nQDZUkq1dYBqx/wJRWRWW19NwPVQF9a LyZmveQhXa1f92jEuMjLibmNDFRGpxxro/2cafICUuNHIgHHu3r0Rk+xp7dVo406TWb0 jQJcE/ByU4jF8baItAtYxS+gv+vRNd7oousoVnBa/+s5xCguebLssr8VDWwDj56F8bzF paj1F8/D/lDntHU0dqPyWK+E4MPWKmwijnLjE7De2tjK8ewMkrvVe8NhQ06c529VwOeP gZmBDlyMi6QVj/FmNvFrSUbLonRVY52DYcEzUodxrJjT+TRO2X3v196TmBR+SbyXsLFm omTA== X-Gm-Message-State: AOJu0YyhIwW3bdqDhhKHc1TyifzVJ1SKczl4cVuyyZrLl2s//4bA2wLG KZkN10hScS7Rbtfr7FChAABAuLgfFpy50k7ee4j8Ootk6kovM0w4z34ItSEvMGMl5JhcxCf4EHc V X-Google-Smtp-Source: AGHT+IEZtXhf8DnUedrxCBZXX4R63+iEsHeBn/ZvgaRaXofB08nnvTVWshhe5uqwoszWqRVn4xPqEA== X-Received: by 2002:a05:600c:1c9d:b0:412:3c20:5c67 with SMTP id k29-20020a05600c1c9d00b004123c205c67mr1395904wms.39.1708081422054; Fri, 16 Feb 2024 03:03:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bastian Koppelmann Subject: [PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API Date: Fri, 16 Feb 2024 12:02:55 +0100 Message-ID: <20240216110313.17039-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081885790100003 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bastian Koppelmann --- include/hw/tricore/tricore_testdevice.h | 3 --- hw/tricore/tricore_testboard.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/t= ricore_testdevice.h index 8b4fe15f24..2c57b62f22 100644 --- a/include/hw/tricore/tricore_testdevice.h +++ b/include/hw/tricore/tricore_testdevice.h @@ -25,12 +25,9 @@ OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) =20 typedef struct { - /* */ SysBusDevice parent_obj; =20 - /* */ MemoryRegion iomem; - } TriCoreTestDeviceState; =20 #endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index b6810e3be0..c29db8b451 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -89,9 +89,7 @@ static void tricore_testboard_init(MachineState *machine,= int board_id) memory_region_add_subregion(sysmem, 0xf0050000, pcp_data); memory_region_add_subregion(sysmem, 0xf0060000, pcp_text); =20 - test_dev =3D g_new(TriCoreTestDeviceState, 1); - object_initialize(test_dev, sizeof(TriCoreTestDeviceState), - TYPE_TRICORE_TESTDEVICE); + test_dev =3D TRICORE_TESTDEVICE(qdev_new(TYPE_TRICORE_TESTDEVICE)); memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem); =20 =20 --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081522; cv=none; d=zohomail.com; s=zohoarc; b=fRqUXHksYZ6xquQ8Tg4E/NYj72kG2HVuoxQyP6bTbbj4OaFkhzlTbcUjuKl3k49sjkzeoT3UOn/42GnwAgckrIjnR5LEL9UH2rqVa8nRaMGzaINbiaftUd7K92RYLAShEu3QFbr70k6+UecqdLLKs/jt8ClNFI3nFtBNLcD3qfM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081522; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NuItVagnX21LnnaFpIrCDiEh6nnybH9GKoEtwiotckg=; b=MSeuoCpPt1N65Z2ZiXCuKxsOYL8aa4ElcO6e8QMXKozpLOk1ODPm1z1EtQHDpbGhR9caAP0HKksmH0Y1J/TVjZt45mQtb0mB+kcSx9GXWPpM7sbMWVVTe1zTSvNETCgwL1D38ViakF4jZLL3IF0qnExwJccxpzsT7UN3g+pmukA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170808152207445.877973517981104; Fri, 16 Feb 2024 03:05:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0X-0006TQ-Gu; Fri, 16 Feb 2024 06:03: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 1raw0W-0006RK-5J for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:52 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0U-0000tB-2g for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:51 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-412345cca4eso7136985e9.2 for ; Fri, 16 Feb 2024 03:03:49 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id k4-20020a5d5184000000b0033b4f82b301sm1942603wrv.3.2024.02.16.03.03.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081428; x=1708686228; 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=NuItVagnX21LnnaFpIrCDiEh6nnybH9GKoEtwiotckg=; b=zNIr7y0EqNB2slVEoVD7JE/EWg79kDhOfze+vjPAGjuJ35R1MMLkDxzeIG9MuY2uTc teic7TqLhD7U17NYex5MxbWWKRrFY7mLll2gs18eQ5pdqS7v0IZjK4k8TuExWAyN1WYP ETooz96kVf67wAqZhv05YpAwLvvO3m8mRkWsXrb1Fll6N4/ISmgIsINOmYod0EHbmJvJ NI2JTpSHqi7DDFPc1+hnuylXIkr1dBEv3bqdc9IybqRfoMtGwKjIQcLII3Qo5Dy6hvih +jqIQAzq3wnKZkwCzefgEewZxjgxR2LZfedaGU/EDu+x52xWs9m8iPkpXEM/UqNteDio lEBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081428; x=1708686228; 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=NuItVagnX21LnnaFpIrCDiEh6nnybH9GKoEtwiotckg=; b=iF11jaQZNJSJKJtP/V8da8L8guObVERNqzDfnKf950D29Kj4L2EUz8ThzTRT8Fz+XW /OThyhT+QVYEKuVEQYmtZjcCdW99aPE7dWqbIH+xxldCKiH2I7cS1AeF5ihAw7A7MU46 52zRuZIL2sYReVKEYJc8w9Vu04pEqHTR9RuGCIC5j2GhZweUNlv5te5+VGeCPpqBE8qh CJvRZiWVXk6mWyaP05yRsd4Gtcltg5tq+gQSTB92/2w1SWfud0tOsZhT1mYphWZo49Pr aQsLbx7yNwsHkv33Zne8W03QMw8AWBAhWTgSAI3zmlDoOQQetd7qxlErS5pI4LdaQsoH vIrQ== X-Gm-Message-State: AOJu0YwQTJhp+6qZJBnJn1I+0OTiyoBmfgV/T2ARK67rZvggMABUEOt4 SXwmyX+1x5jefWNiqLFq/9/Q2fDmLqmQ+MlOGzmpoGP6jzyH0ZPxzciVhrzVOPJM0HKJBvL6zKb Y X-Google-Smtp-Source: AGHT+IF1rjUpQD9NjyQ+iWSd2ftr2L4Qc5BBAPfLtU5QmVd9bHlSq1HNudg1PtEIdKHsOlgDeHuqIw== X-Received: by 2002:adf:f34b:0:b0:33c:e1fc:65c5 with SMTP id e11-20020adff34b000000b0033ce1fc65c5mr3642680wrp.69.1708081428352; Fri, 16 Feb 2024 03:03:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Nicholas Piggin , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= Subject: [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API Date: Fri, 16 Feb 2024 12:02:56 +0100 Message-ID: <20240216110313.17039-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081524211100003 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater --- hw/ppc/pnv_bmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c index 99f1e8d7f9..0c1274df21 100644 --- a/hw/ppc/pnv_bmc.c +++ b/hw/ppc/pnv_bmc.c @@ -269,13 +269,13 @@ void pnv_bmc_set_pnor(IPMIBmc *bmc, PnvPnor *pnor) */ IPMIBmc *pnv_bmc_create(PnvPnor *pnor) { - Object *obj; + DeviceState *dev; =20 - obj =3D object_new(TYPE_IPMI_BMC_SIMULATOR); - qdev_realize(DEVICE(obj), NULL, &error_fatal); - pnv_bmc_set_pnor(IPMI_BMC(obj), pnor); + dev =3D qdev_new(TYPE_IPMI_BMC_SIMULATOR); + qdev_realize(dev, NULL, &error_fatal); + pnv_bmc_set_pnor(IPMI_BMC(dev), pnor); =20 - return IPMI_BMC(obj); + return IPMI_BMC(dev); } =20 typedef struct ForeachArgs { --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081538; cv=none; d=zohomail.com; s=zohoarc; b=Glk1jK2QcE+HhIEj06kYRr4umrL7qlo+WKZRb2iL7MepSng44ryCj2OnxaYUDLcrBQNB1bFbU8C7nItt6hoW/bObWstil8VqsYdR1UppMRbTaELauowvaYLvqnO72Qx0QuYjPlIzm6OTJsQSwU23M3mHyAv328/JKM1KEv7Gtvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081538; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jyHSiP+USy9LLsFpR2fD5RYQ//7L3lzistxQTGbBMcU=; b=m35ZkltxJXqhBf94itX1DedVfHQ+2b9WSTIzaqB1v7tSCgJDWJsh41EHi2Y4n31/bb+syARTZXEqmOZ7G/quSewB7i0hLAnhgT16kAuhKkdlnWJTfuR9Y6ZRn/YMbO4gf8Az64oTCm1CGFGbEf5zcssWR+62QahlMqfV3KlEuUk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170808153816131.497796936744294; Fri, 16 Feb 2024 03:05:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0f-0006a4-Ga; Fri, 16 Feb 2024 06:04:01 -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 1raw0d-0006YK-MG for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:59 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0b-0000wX-E6 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:59 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d0b4ea773eso23787391fa.0 for ; Fri, 16 Feb 2024 03:03:57 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id bk30-20020a0560001d9e00b0033cddadde6esm1920641wrb.80.2024.02.16.03.03.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081435; x=1708686235; 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=jyHSiP+USy9LLsFpR2fD5RYQ//7L3lzistxQTGbBMcU=; b=tI5dWdyKBhFtIOXg5uWn8++EdwkI9bV/ShkHlbHXcI8QS0TYyvoSc41cti49Wvdft9 K+PTrFwaaRGWQ1R24NTKTx1s4vFvhm68JwaV7uH22nfGyqTdl19qEx4ys8R/WbUR6Z7C 8HuEIsw8JZaf+xJpPO+2k3/ltziAMVqwcZQxJpE+gcdDxNshmWTAXpN49aqYkwN3Syjb zs9k87MnMfIw2zB9/HGkQwQ+PCziC3QwCY5ZJeUVK8QM8Uz4LyPkROMlslodrt5mrw3k 9soYk769Y4j4N5EzhghvOl1GUN954L3lb1Jrv6E6uRpOdr1YAVLfwmwgQF9bq3I4nAAT 7smQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081435; x=1708686235; 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=jyHSiP+USy9LLsFpR2fD5RYQ//7L3lzistxQTGbBMcU=; b=s/Bf3AcZLW1DWh4c5oxv7qu67R6aK4Qe+nvrZpPrk0jWlYI3sdE5d9WSSc7pIDYid7 7S7re9ekdqn7sRD43ldVU9F7+lryKK3+sQ4cchR6h5TRJA/77LYDAj5n/pVs9j/bpHnA G6lUU+/n67uwmhSSKDVqRWdvSCbn3nTwpVx25f4Csg29Sq7L9caWsSJ9xYrnnpHMCaAT fDNsWYkIB+r6GZuLcd5zrEKmtR6KPJhQsmJfDzIMjx+DB9/yiRhI4M5y4aIN1055GVHV ztl72KxsVZTrobXVcTIBNR9ptDZJFdGtpRbc6/HDZrmLCBIK7wUGw8y1E+0T9VeEUf61 Xo2g== X-Gm-Message-State: AOJu0YwsYdSPPAGtv49wIzm3Vp3nXsMSo2sZdQmapoISHeLxZuUu1T1H Sypcv4bZN4VdPrTNuZIIdVBi1ITXfidV/MK7+8IGJV5BmyY9+HFZmi49hR4PS77lF/cc2UE6wkU O X-Google-Smtp-Source: AGHT+IGwFCOSAE5u5XuM3ABzSbBFzUUJPQD2I2SIKs+5IDNXIEsbPSf9z/PKbbwaFLS7QsJohGfTxA== X-Received: by 2002:a2e:8911:0:b0:2d2:12d8:42a5 with SMTP id d17-20020a2e8911000000b002d212d842a5mr1692149lji.7.1708081435334; Fri, 16 Feb 2024 03:03:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jan Kiszka , Peter Maydell , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Mark Cave-Ayland , Artyom Tarasenko Subject: [PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new() Date: Fri, 16 Feb 2024 12:02:57 +0100 Message-ID: <20240216110313.17039-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081540231100006 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- hw/arm/musicpal.c | 2 +- hw/core/qdev.c | 2 +- hw/sparc/sun4m.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 2020f73a57..74e4d24aab 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1238,7 +1238,7 @@ static void musicpal_init(MachineState *machine) qdev_get_gpio_in(pic, MP_TIMER4_IRQ), NULL); =20 /* Logically OR both UART IRQs together */ - uart_orgate =3D DEVICE(object_new(TYPE_OR_IRQ)); + uart_orgate =3D qdev_new(TYPE_OR_IRQ); object_property_set_int(OBJECT(uart_orgate), "num-lines", 2, &error_fa= tal); qdev_realize_and_unref(uart_orgate, NULL, &error_fatal); qdev_connect_gpio_out(uart_orgate, 0, diff --git a/hw/core/qdev.c b/hw/core/qdev.c index c68d0f7c51..a271380d20 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -171,7 +171,7 @@ DeviceState *qdev_try_new(const char *name) if (!module_object_class_by_name(name)) { return NULL; } - return DEVICE(object_new(name)); + return qdev_new(name); } =20 static QTAILQ_HEAD(, DeviceListener) device_listeners diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index d52e6a7213..fedc4b8b3f 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -979,7 +979,7 @@ static void sun4m_hw_init(MachineState *machine) sysbus_mmio_map(s, 0, hwdef->ms_kb_base); =20 /* Logically OR both its IRQs together */ - ms_kb_orgate =3D DEVICE(object_new(TYPE_OR_IRQ)); + ms_kb_orgate =3D qdev_new(TYPE_OR_IRQ); object_property_set_int(OBJECT(ms_kb_orgate), "num-lines", 2, &error_f= atal); qdev_realize_and_unref(ms_kb_orgate, NULL, &error_fatal); sysbus_connect_irq(s, 0, qdev_get_gpio_in(ms_kb_orgate, 0)); @@ -1000,7 +1000,7 @@ static void sun4m_hw_init(MachineState *machine) sysbus_mmio_map(s, 0, hwdef->serial_base); =20 /* Logically OR both its IRQs together */ - serial_orgate =3D DEVICE(object_new(TYPE_OR_IRQ)); + serial_orgate =3D qdev_new(TYPE_OR_IRQ); object_property_set_int(OBJECT(serial_orgate), "num-lines", 2, &error_fatal); qdev_realize_and_unref(serial_orgate, NULL, &error_fatal); --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081855; cv=none; d=zohomail.com; s=zohoarc; b=Pp8zH3uCNis74R4+nsoah+SMpatWndpvlieWiFzR2AAm+4VR0KQXxWh6nHSumXKAmTZx/pYR71XiGPXrHsBAjbMRzELwD+fj2QDS2SnpUcnRMwf7JaDWNXHTsxYfyui1sqjtZDL8jxMAeWARG0ix648f+96OPkkt4WnM4sJAuQI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081855; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+4cWnhsBShzzzFHqb9EuQ4ogMglB6l+e/nMze0glgi0=; b=l/KF8KLg5KxlW78vt3q2QPbQAxOM1fU1XlNSQMKfbRpL6+BPCbTA3a1yq83M+StfJPt8Bfh9gzFcrlrMs4drFS9tA911vK6utGRDkgWQy/DyRUe+1wpyKrvNRbbLK2UHb2fSi4XBeT94OtrbdzRTddu00QhL3cwcv6O0EaArN2A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081855651204.78157329479052; Fri, 16 Feb 2024 03:10:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw0t-0006p3-Bt; Fri, 16 Feb 2024 06:04:15 -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 1raw0o-0006hA-57 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:10 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0i-0000z3-14 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:06 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-411d231ea71so14663285e9.1 for ; Fri, 16 Feb 2024 03:04:03 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id x11-20020adff64b000000b0033d157bb26esm1880818wrp.32.2024.02.16.03.03.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081441; x=1708686241; 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=+4cWnhsBShzzzFHqb9EuQ4ogMglB6l+e/nMze0glgi0=; b=loa2CLhH2eVGucz+5u/ZHrF/tVm3Kb1XtkZaChSqNZYVLfUMD0wrsLSiUCIX1v+ZZ2 jnXz5aRtVP6cTU3+P5FB0lxpBp84TcD4B/ZpIHLL0UwDR370wc10Ayzy/MMmX50KDTzZ z/Xk/1TgaS3HGA1tZzbOYyJ5yMj5iqUmsvFOtz/mMibvVNmyGoDg6pE7J3ywZfZoyJM+ rP5QIqhDB64AJm+QA0C/hkCE5WkVITAfkMzFpGjp46DbKKpYv+z9A4zHOKszin2d1q8w vxNA667jv1R8UcE5ccNyourlTN6BHYxI41xFsKfuTAlNPqFyqEWYIVrJQHdFX1xTtkID EDSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081441; x=1708686241; 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=+4cWnhsBShzzzFHqb9EuQ4ogMglB6l+e/nMze0glgi0=; b=n6Ra7KPfjdWCSeLc8zqX07pITiqtJjuBClbelXjOXHtatzyy9cpS99/Tu0B0cphHSR 1EuX8u4rm9I6whvRPG0QDs9aqMFX77sVMcjGyvmpqaFRT7qABWDaN4oPLDIE9/dAKlu4 Q1ebiNDhmOZ7JszZCp556hoOg5kQUHMAsnvulOhV8Ui7uyPCC+RtbfZSzVs3D30OFSjw KNnRxmJ30w0HLS0/NLzDDaFVluPZZpMPY6IpIT6ceoKkWhBzYaTOfYuQsDcQdhDQkQRU 6CmxiGErBA5iBh8jtH6+D6Fj4cKFbGMpFvXBMa9VaeZi5miHjucGoFiH+6P0wqA75kDg +2wA== X-Gm-Message-State: AOJu0YxDDg/XgyxyF4antVqefTlGQ+Lv0P+6ZRTEGp++iwUJjr2UhAHJ XqgaBHbmFp5IBOcfQst/ARoKOmb/l9yRrkZlQITIV548fZRnpbNo6cjcTOhsqD1eS9T0hkwK7jU q X-Google-Smtp-Source: AGHT+IFJ0tgORZjuv+Xo1BE69NDOJYJ5Z6N8Ug5++1Pn0E/2AFdYFRNsQvRUPzDxGqWA0u8rp4Hd/Q== X-Received: by 2002:a5d:6143:0:b0:33d:2437:e739 with SMTP id y3-20020a5d6143000000b0033d2437e739mr252251wrt.54.1708081441727; Fri, 16 Feb 2024 03:04:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Max Filippov Subject: [PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new() Date: Fri, 16 Feb 2024 12:02:58 +0100 Message-ID: <20240216110313.17039-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081857501100003 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- target/mips/cpu.c | 2 +- target/xtensa/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index d644adbc77..6b3909ee08 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -649,7 +649,7 @@ MIPSCPU *mips_cpu_create_with_clock(const char *cpu_typ= e, Clock *cpu_refclk) { DeviceState *cpu; =20 - cpu =3D DEVICE(object_new(cpu_type)); + cpu =3D qdev_new(cpu_type); qdev_connect_clock_in(cpu, "clk-in", cpu_refclk); qdev_realize(cpu, NULL, &error_abort); =20 diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 79f91819df..4f9408e1a0 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -205,7 +205,7 @@ XtensaCPU *xtensa_cpu_create_with_clock(const char *cpu= _type, Clock *cpu_refclk) { DeviceState *cpu; =20 - cpu =3D DEVICE(object_new(cpu_type)); + cpu =3D qdev_new(cpu_type); qdev_connect_clock_in(cpu, "clk-in", cpu_refclk); qdev_realize(cpu, NULL, &error_abort); =20 --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081845; cv=none; d=zohomail.com; s=zohoarc; b=XkNo/GUT+I045T2p2W5WJir+FFkuHWuxg3fipicJqVgAUb5q2vgB3j7gu7Ddp0dXzGGaUbYUoZIgPvDbk7+cQxD5f1n5SZaGby1xKLYYYeqZWK4yLGpdTqQT2ZXpaEsR44rrcFax+JmdJcLfJzm4prAqt7Ve7LdISiFev7hirtk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081845; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xmVGPYBQPq46VUwxkc77izpk+jGAawySTXLarOn7Kps=; b=jWx1xamh15V2+0Jovx5ZiGikm1dz1uvf8tKKK3nl7xPUqQ8GcT0c/yRhRJqwQsg7yAcmq/swDOchF+Ax6s+FPuSBVombUCpfpbBNk681L2r/55KW0rq3aOLQ5qs9f6zqMZKP1b8j2et8Ceft0QjVbLLfAprBWfJmX9hd7/RDljg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081845840147.87714229301196; Fri, 16 Feb 2024 03:10:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw11-00070D-JR; Fri, 16 Feb 2024 06:04:23 -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 1raw0x-0006qt-F4 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:21 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0q-00010T-7z for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:17 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4124c3a7a75so2534895e9.0 for ; Fri, 16 Feb 2024 03:04:11 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id s1-20020adff801000000b0033d01fe1f04sm1881745wrp.55.2024.02.16.03.04.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081448; x=1708686248; 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=xmVGPYBQPq46VUwxkc77izpk+jGAawySTXLarOn7Kps=; b=Gm+E4p3yblgCXSJ42IVeSIMR18y1d+Lb6ZpMjvT+QCmcvRshvJmEhOoo/o4pDsY1wn r5yyv16wHznHhFfrLrYAYL9QXyGuJbnAN1m4MC8ErvoN1W3niZyV8HZoyUrg/QAFABwV SIrsJDUuNLIH2Mf8QAqzjAqiqPHZXxUG7iUUkDBojPXOeTBn5Qf4eJMDv8QcTiPGj158 u7ASomjPDNp0vGuHBf+c5yRutxzp6T3JkznIHTJ9pR1L7XjYk3EafMkG9SazH7020DXH NFxId7bTp9RAvrslOlmaV/pYOGIm/RozmERAU/P074z03TTUeg2NGPEpsmuNK9ScK+KI J8Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081448; x=1708686248; 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=xmVGPYBQPq46VUwxkc77izpk+jGAawySTXLarOn7Kps=; b=ZLZk0NDrINRpk+jgeGIVGcGG398U2Cj5QtP3mEqhn8af/mNYSrAUmubAze2Rkxbk7T maw48PddTW2xAVwtKXTOMfecQUt1xcR5yvl0bhnnNme9R6r0X3GktE8GYW2EZ5X7U7BY GZ1rzCPOhN2fbD7HU9j+TbgU56hgCzrY3XH42wfA+DT+9bbZEZYx/Lb0GSfFPwmtjhzp jh1EhTfW7YQTYyE3BpC4wQQCG+0393AUEpss7IiW6odmDg7DIDTyPgIqUSZrMl3NAIXy twWrOnL9jF2zrgo+lF+oM29vGxFw7n+SGunXiCWEpFGqJsv1gGFvBu9erA+ZdKtGb97D ax+w== X-Gm-Message-State: AOJu0YzUwVHnZ0dXxGpfiBNbFqaEazxALQLmYWj1J87+OuOkODVZAMNC IXL/I67shsYHnonbk81/ufdohzMu539lE9UgiVhzlzEWa46glOPhRbQspgBqs4QfLt440hEbfOO 7 X-Google-Smtp-Source: AGHT+IFYc/i1Ir9pKLSmlGbNdjfSEBRBEzSq0hh1UBG+3WXRxLK5PeNmhQ2gadtoi1VjBbeun9m3xQ== X-Received: by 2002:a05:600c:3ca6:b0:40f:c404:e2d1 with SMTP id bg38-20020a05600c3ca600b0040fc404e2d1mr3937401wmb.19.1708081448655; Fri, 16 Feb 2024 03:04:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum , Jason Wang Subject: [PATCH 08/21] hw/isa: Inline isa_try_new() Date: Fri, 16 Feb 2024 12:02:59 +0100 Message-ID: <20240216110313.17039-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081847473100003 Inline the 2 single uses of isa_try_new(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/isa/isa.h | 1 - include/hw/net/ne2000-isa.h | 2 +- hw/i386/pc.c | 2 +- hw/isa/isa-bus.c | 5 ----- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 40d6224a4e..8475120849 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -81,7 +81,6 @@ IsaDma *isa_bus_get_dma(ISABus *bus, int nchan); */ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum); ISADevice *isa_new(const char *name); -ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); ISADevice *isa_create_simple(ISABus *bus, const char *name); =20 diff --git a/include/hw/net/ne2000-isa.h b/include/hw/net/ne2000-isa.h index 73bae10ad1..2440ac8621 100644 --- a/include/hw/net/ne2000-isa.h +++ b/include/hw/net/ne2000-isa.h @@ -22,7 +22,7 @@ static inline ISADevice *isa_ne2000_init(ISABus *bus, int= base, int irq, { ISADevice *d; =20 - d =3D isa_try_new(TYPE_ISA_NE2000); + d =3D ISA_DEVICE(qdev_try_new(TYPE_ISA_NE2000)); if (d) { DeviceState *dev =3D DEVICE(d); =20 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 3c00a87317..e8130774ad 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1183,7 +1183,7 @@ static void pc_superio_init(ISABus *isa_bus, bool cre= ate_fdctrl, i8042 =3D isa_create_simple(isa_bus, TYPE_I8042); if (!no_vmport) { isa_create_simple(isa_bus, TYPE_VMPORT); - vmmouse =3D isa_try_new("vmmouse"); + vmmouse =3D ISA_DEVICE(qdev_try_new("vmmouse")); } else { vmmouse =3D NULL; } diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index f1e0f14007..8aaf44a3ef 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -158,11 +158,6 @@ ISADevice *isa_new(const char *name) return ISA_DEVICE(qdev_new(name)); } =20 -ISADevice *isa_try_new(const char *name) -{ - return ISA_DEVICE(qdev_try_new(name)); -} - ISADevice *isa_create_simple(ISABus *bus, const char *name) { ISADevice *dev; --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081620; cv=none; d=zohomail.com; s=zohoarc; b=FkWRiRKZj+j/AHCV4ZoZp8tn9T1K2OEBinLshmIMrex5NkCmdTAkHswkZDkQmInROWaxDiw2Xpp8DHvFyhuY0oDbfDqipl5CVc86wjhlY4174Qg5GskMAgapw7gLbQa21KWitBj1XYplX0WXFXXnC1hXe6Ev6hXppZHKZwVPeb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081620; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7iBFC1QhPdWDrDOtRIvOXPWDjCtIz2lHCQrIRmLbo9Y=; b=jYR1LN7TN/etbAG5CKG35ZErKlOiFv4T1etCLSxScsdlk7neWGcIjSKddqpNDF4Iw4QnQ4Lh30D2jRl/5WiCR/BlgR462tbqoeGLseGzcaNoLV3/KopQzT5PlbxLJAtqMEhvh7RMpfbhDVX9ybpEH3TQSl8MfmwfK+9PnMKuQYY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081620284635.9736363287682; Fri, 16 Feb 2024 03:07:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw12-00073T-Do; Fri, 16 Feb 2024 06:04:24 -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 1raw0x-0006qw-Ft for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:21 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0u-00011d-L2 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:19 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4124907f6fcso2992465e9.1 for ; Fri, 16 Feb 2024 03:04:16 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id k35-20020a05600c1ca300b00412393ddac2sm2036410wms.6.2024.02.16.03.04.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081455; x=1708686255; 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=7iBFC1QhPdWDrDOtRIvOXPWDjCtIz2lHCQrIRmLbo9Y=; b=wYiptgNATPM6dlfnFTPvx+lWJzI+wJZgbFG8wYD7C3czB9Cy/uqfistfDLM4yxj/U0 /qwWlA+2JzfJgywgFXbiX+Fwq1Al0h3JHuQ637UDAC9sFfTbDmZLsUV+nN0mOBBFtTsv M5tu/2JKLMzH/GFc/WHanaZy8CdIMc3nSZR52EYbMkINHq/REzasZ4val+iRVC6HbgHl A4zS2LKtfaHto88IuwrQHSTzKl9IvJVWSmnJJUEoByabCZYB/APz/rIVLY0kQicaxMwa qoYkpCUWivO8Vn2Z3HdweVwQJOa1xnaX29PjdY5MTy7lkcooDRYPunTwZm+hp915dky+ 4Fbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081455; x=1708686255; 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=7iBFC1QhPdWDrDOtRIvOXPWDjCtIz2lHCQrIRmLbo9Y=; b=YWuAjOin1fbprF4d13YZGzEHD86oyV30H8jFweDeKLYVEKRO/srFiuiMRQBbU1+gTL HkuZIwZXFWBe79/8BwlDgQxj6ZLaTiBSjC0M4YXpwv0Z7VEQHOZT0e9BBUn12bBvtgWh qU9q6mFPTgr68WHu+86lh7Ob/MApKLCok4ZfPxzWTbsUGkonV0KQfVZa5URBqKE/BvZM BI+WOv37xtjFtz2yhYDaFxvnbMQPZaIP4d4aMwnwzbhNU7SehYzLzz9Ak0u15gpmRZ50 IefFwo3vlqKYBDEjASHdOO6X7nezrH+FqKwcKVv+qLYZB1BWSIhYXTp85eoxmw0Mi5Bj g3GQ== X-Gm-Message-State: AOJu0YymlkuoUQ0/jHy+y+pwHrobom7DcPv4o021olxw3UA50I3KjXQ6 Oip7ZXVa5pClMRSyETXT1OIRLDI9sqkf7EB3kfsRiwnKUCYZaUcN0e8+JKgQG564GByH8o2tejS m X-Google-Smtp-Source: AGHT+IF8QGAe9CWzaU1NDXic+DWdnM9DUB8PzSiWHsKJgDo8NqFEzjBod/sng/WkWkUHWzyjCvyQtA== X-Received: by 2002:a05:600c:b92:b0:410:c69f:51b8 with SMTP id fl18-20020a05600c0b9200b00410c69f51b8mr3531506wmb.14.1708081454975; Fri, 16 Feb 2024 03:04:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Subject: [PATCH 09/21] hw/usb: Inline usb_try_new() Date: Fri, 16 Feb 2024 12:03:00 +0100 Message-ID: <20240216110313.17039-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081620561100001 Inline the single use of usb_try_new(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- hw/usb/bus.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 59c39945dd..148224f06a 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -334,11 +334,6 @@ USBDevice *usb_new(const char *name) return USB_DEVICE(qdev_new(name)); } =20 -static USBDevice *usb_try_new(const char *name) -{ - return USB_DEVICE(qdev_try_new(name)); -} - bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp) { return qdev_realize_and_unref(&dev->qdev, &bus->qbus, errp); @@ -447,7 +442,7 @@ void usb_claim_port(USBDevice *dev, Error **errp) } else { if (bus->nfree =3D=3D 1 && strcmp(object_get_typename(OBJECT(dev))= , "usb-hub") !=3D 0) { /* Create a new hub and chain it on */ - hub =3D usb_try_new("usb-hub"); + hub =3D USB_DEVICE(qdev_try_new("usb-hub")); if (hub) { usb_realize_and_unref(hub, bus, NULL); } --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081769; cv=none; d=zohomail.com; s=zohoarc; b=fziIL+0ZADw6wP9OKCkDYSmfsp6x2Y/DQTVU6z1rdyQraoOBA5jS1UYuye1DcWGEiD5Rxnw5y2nEs+afxxggJSrkmqQvcz7s8cNOWY8r/Av4OWm2dhi5zckrVimGP3UPU5gKIZwOFxhv0+cL2Iu8qpYtSP8Pm31gF9eOO/FZC6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081769; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1f6J2H1K9VOhN8YiJnj6i61rwEdmxKhJYj3MwXMwmEA=; b=fruvmbXLi5sAEoeJWmRjxBpXzr6iP9NCLTu/lYFZRDCkNmYhLrC/dj8hIlMg7XeJ7gJwcr5PHULy9uyY8i4GXdcr4lSxQF31GMdANuNsaOGcmPDFHe8nNujW0QX8SJb85Ltq/vTcz1dN1SUP/BPm+pjygJplKVnVU3eSIL1cEx4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081769938535.7321450378072; Fri, 16 Feb 2024 03:09:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw18-0007Nn-DF; Fri, 16 Feb 2024 06:04:30 -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 1raw15-0007BI-2w for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:27 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw12-00013E-1b for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:26 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-33d14a711efso681771f8f.2 for ; Fri, 16 Feb 2024 03:04:23 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id az1-20020adfe181000000b0033d1f992ae3sm1275770wrb.112.2024.02.16.03.04.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081462; x=1708686262; 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=1f6J2H1K9VOhN8YiJnj6i61rwEdmxKhJYj3MwXMwmEA=; b=aklU6aCRgVVkS4G4qnszjyTTv5IvY/xbh8JwrkXQjUznalKUIvh7LMV/FuwUMv8qwT qPyUkgwuQ1RF9CgV5iEKCgtVjtHoPAghDMs3D4pegzbUspx9nnUV+1y/61YUCwFSelVr pYLGNo4POjhX1n7amesa143IGUtbKy3rPZOXozLnJ1wT54xkewGPjn4AGxart7IJ8GXg T2ErzLyQ8r9ZrxjweRz5e3yAncECGMHnbh60x6qWIIwnqXd0S7t0peR16jF5KOQZmffW IXfOV8bFpTjr50/2VFgVdUPx5Zwms1SuF6/KSqE9P0zCo4NisOwo9Vo66QVKuDon7uCd QTHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081462; x=1708686262; 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=1f6J2H1K9VOhN8YiJnj6i61rwEdmxKhJYj3MwXMwmEA=; b=cgkEdGwznHfFjPcId8wTg6JTaByRIhU7x1gP7Ey+gErROHLsypfX+ZgZFWgTkum0mR ETzS3j3vtHowNLLYPb8JC0r+Eu5x2ScQGUHebMYLUUaB9JJvz2oGY+3c67Vvc33uiv9p xpyHs0TmDxawsZPyAC1LOrEE3GtdR9/zDhuueJ+4NswWKTWMjMqnFMe+HHLeHAChFAio nMgi0BVoLHTqQX8LmCbuKH68E+TPv+jBtCRqrajvJBs6WGoygV/fteK10E9d1t3M6ZPD v7M+a+HceTIWE92x7mKoD7ou1iKfLfHjeNQRXVFMIjYMn/+Z1Qzu1/HyYHb5psu9e7rO Iipw== X-Gm-Message-State: AOJu0YzMF+WKQ7JMJmRv7b0HBAHSOSP+wOCyWzfjSkbY4G1nv/e/+1uq gxm72gwFoTv7CP4+o/H9ImM+LpsZxQ4ZMbVrkU+hppVmFMbY+Y6al38PWTmIqOiEx5JUI43Ufbv 3 X-Google-Smtp-Source: AGHT+IGd+K1Ye21x3B9/fikutK4pHA5/MV8nPoj9xvkFcz4dlQ3vDbllE3JsMEgnq7erpMjwDyfFKw== X-Received: by 2002:a05:6000:1e8f:b0:33d:2120:1011 with SMTP id dd15-20020a0560001e8f00b0033d21201011mr550180wrb.54.1708081462196; Fri, 16 Feb 2024 03:04:22 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Samuel Thibault Subject: [PATCH 10/21] hw/usb: Inline usb_new() Date: Fri, 16 Feb 2024 12:03:01 +0100 Message-ID: <20240216110313.17039-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081771205100003 Inline the 2 uses of usb_new(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- include/hw/usb.h | 1 - hw/usb/bus.c | 9 ++------- hw/usb/dev-serial.c | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2..2d820685cc 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -500,7 +500,6 @@ void usb_bus_release(USBBus *bus); USBBus *usb_bus_find(int busnr); void usb_legacy_register(const char *typename, const char *usbdevice_name, USBDevice *(*usbdevice_init)(void)); -USBDevice *usb_new(const char *name); bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp); USBDevice *usb_create_simple(USBBus *bus, const char *name); USBDevice *usbdevice_create(const char *cmdline); diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 148224f06a..a599e2552b 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -329,11 +329,6 @@ void usb_legacy_register(const char *typename, const c= har *usbdevice_name, } } =20 -USBDevice *usb_new(const char *name) -{ - return USB_DEVICE(qdev_new(name)); -} - bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp) { return qdev_realize_and_unref(&dev->qdev, &bus->qbus, errp); @@ -341,7 +336,7 @@ bool usb_realize_and_unref(USBDevice *dev, USBBus *bus,= Error **errp) =20 USBDevice *usb_create_simple(USBBus *bus, const char *name) { - USBDevice *dev =3D usb_new(name); + USBDevice *dev =3D USB_DEVICE(qdev_new(name)); =20 usb_realize_and_unref(dev, bus, &error_abort); return dev; @@ -693,7 +688,7 @@ USBDevice *usbdevice_create(const char *driver) return NULL; } =20 - dev =3D f->usbdevice_init ? f->usbdevice_init() : usb_new(f->name); + dev =3D f->usbdevice_init ? f->usbdevice_init() : USB_DEVICE(qdev_new(= f->name)); if (!dev) { error_report("Failed to create USB device '%s'", f->name); return NULL; diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 63047d79cf..6e79c46d53 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -624,7 +624,7 @@ static USBDevice *usb_braille_init(void) return NULL; } =20 - dev =3D usb_new("usb-braille"); + dev =3D USB_DEVICE(qdev_new("usb-braille")); qdev_prop_set_chr(&dev->qdev, "chardev", cdrv); return dev; } --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081539; cv=none; d=zohomail.com; s=zohoarc; b=TKk8iqACpzn13lQxjzh5hfAAvZBipEhOVYBc+vR0HfswCdMM0sHDJO2fF7VZxce6vBY4Fs9ZDZYZLu4BkfiAEAdgnfGYFzjCARI+6Ha7i/y78EAouDut+hfpaPp1oGsRh8a/7luDGaLBfcmKSjraLol/f+s3DuPXgYKxlGYVQZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081539; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T0y1oWRnInhsHqZm+cg/tsMm+PW5dK4fpoLCbcPyN88=; b=DxN71qvwyh4Guy68BRpebCVKH9N9ABR+bxcLAuKav2iIqGHHS9TQTSb1EnK+XgP04X7Jwmb8zY7kpctq31eUABVERD5B09auyHK/EOFXogse8cJEGzEhO7EETQuNtPa7WGqqhpMbf7TPIlsA4gnrrmhKJGLIpRQuMFCUkMzpmB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081539494857.3093973779438; Fri, 16 Feb 2024 03:05:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw1E-0007bb-N5; Fri, 16 Feb 2024 06:04:37 -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 1raw1A-0007RT-Vz for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:33 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw18-00014R-MF for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:32 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4125295ff94so1409265e9.3 for ; Fri, 16 Feb 2024 03:04:30 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id az9-20020adfe189000000b0033b7a2136a4sm1911276wrb.97.2024.02.16.03.04.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081468; x=1708686268; 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=T0y1oWRnInhsHqZm+cg/tsMm+PW5dK4fpoLCbcPyN88=; b=JH5nC58YOAe6murAf8Ji9d+hD94A2GIfXNBxOprWtySIRQH8TD+apJkRM61FcK4xiv 2PPZRvf7jkRlKW6op+KHRV6P0DCURkaM2CxVv67gi1z77zTUxdaz3lRv8y8NpWjwnBEy OKRbliYrXFW6jn+cU7/cgP4lEwe5DthLSuWMNUqoZHep72E9s34ysVjmuIsB6DwqiBGp EV1hk/b+mzPemEYZrp+OVejzOGF/rA7WBSa3hozafzPkMUlq6mI1ADoo6lAt/Vh5ORJP Kg093cEsMn7UsxNkyV8GbQPNWcnUNg+XE92W9Yg5a0boHXoYwJ2bUgCPz8H3BODx1u+t lNGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081468; x=1708686268; 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=T0y1oWRnInhsHqZm+cg/tsMm+PW5dK4fpoLCbcPyN88=; b=JTiIjHkVeECqLPR6nZIvsGzfvds+O9VcByZf42ZcWkqWE5iW7LNwQ0WPqXG0WjoQz4 a0JyTzPRdZMbhYB8J2jEcMB1ZahNOfPuoMrWQas6AzAsiB8DqauQ7WdKTPWmb0BqMmsV wjv27j5hCl96bRmhTDJqvtrbA6euT0hQMwULJhhIF0VR4WQ+t+TDa5VGLKlNC0Sv4R9u 4HRwyMFcceOX/02qUKA0//NGU686q3oc0FdG49Yv2S0qTBOJxCc1VNcbk2qcPQl9ec8O b5q6CPWoeB0fLng5J13GZWLiaHB17IG8oDJKCmT5pcfitkrl53AnQuvOZEnmKcqoteEm /ZbA== X-Gm-Message-State: AOJu0YwqS7vlSY+Qisdb1WvCjIF5DTDm0i5JT5+wcU7TMb6fWnIckLbt awtJw4SFfrB8qACedkMQ2EjHiWHI1azZZMroWMoPkaEY37Ld9BV5EjkQilYZvy4e6mTkRCVDpOm P X-Google-Smtp-Source: AGHT+IEV7SRh/XSnpo0zVpNk9x/dmBVF+PARN86d6zGPb4KFkBuHxKPmsNTU3xJItSyiBnpe0MiDIg== X-Received: by 2002:a5d:428c:0:b0:33d:2156:6da1 with SMTP id k12-20020a5d428c000000b0033d21566da1mr553594wrq.61.1708081468667; Fri, 16 Feb 2024 03:04:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Subject: [PATCH 11/21] hw/usb: Add QOM parentship relation with hub devices Date: Fri, 16 Feb 2024 12:03:02 +0100 Message-ID: <20240216110313.17039-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081540228100005 QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/usb/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index a599e2552b..baad04f466 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -439,6 +439,7 @@ void usb_claim_port(USBDevice *dev, Error **errp) /* Create a new hub and chain it on */ hub =3D USB_DEVICE(qdev_try_new("usb-hub")); if (hub) { + object_property_add_child(OBJECT(dev), "hub", OBJECT(hub)); usb_realize_and_unref(hub, bus, NULL); } } --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081537; cv=none; d=zohomail.com; s=zohoarc; b=PrpOiJRN3AcyDhsn734dvwoh3yhydoZmdVN1GvVpSpwoTgl6WgDurvoMrUidRDz92ta84Co+ak/w1CM2aARYx2etyoDtog0V/Lsxh57fxvsAaITojL49BGKxekkS/hfQ/k7Y9gA2z5Y7q0w4huJdY9gWNPePo8nYYEwOUF5guU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081537; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lSddd7wgwT+Aw6mIanqA0vHkbVR0NSdWvof0YaVRHNk=; b=ZejoqZVZugDOHpekTyfaMaS8aD4Jz/CKw7qXVD75bXBeGfYFjLnMwfp0+gDmy8xu8xQBWzZz6t5M0O4ZtApiDUSjmriMO+lj4ykvC0uSnro7EPG7fqyfAEbZCRSFY6tVhCQ79fH7JaCLmCEFMU0oEGwwojHSsdGnTVkXR2jT6ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081537940449.85410844874093; Fri, 16 Feb 2024 03:05:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw1J-0007vz-Ux; Fri, 16 Feb 2024 06:04:41 -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 1raw1I-0007ob-3R for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:40 -0500 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1F-00015c-3m for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:39 -0500 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2d10d2da73dso24658561fa.1 for ; Fri, 16 Feb 2024 03:04:36 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id iv6-20020a05600c548600b004103e15441dsm2036535wmb.6.2024.02.16.03.04.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081475; x=1708686275; 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=lSddd7wgwT+Aw6mIanqA0vHkbVR0NSdWvof0YaVRHNk=; b=WbTSvauYQUvypxaPw7bit1QwCQNsVWwbnLkc3pLQ68kU9yiuZL51QGjnbMpjGQgW/C ziDpm3zbxWJdm/MB1GDpF7+r6//ZHSuOvioOGfhD626hWVbYXbBQczQm7paG7LWidfVU zcWMU418X6f6M9AYr37k6OAcK+7gcUDFOqjWVHD7p5U4Can6PBstIius9Z5OcUbtV4Ar aVzZL2kIN32tUZqF9TncJ6EtMFOtw3wIQMy8C5g/IVxgTUbvnEiqa0BgTCmFXHdBvwly zmMfizwkmlqej5VHWsqe1U8xmd6pUurRXbrATufityGMy+RS30LWkOeXilgea0EWponF lRYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081475; x=1708686275; 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=lSddd7wgwT+Aw6mIanqA0vHkbVR0NSdWvof0YaVRHNk=; b=jGfMPCuY0Ix4gWJkApVq0mzmHlSRVetQnaYEn7k6YMUOg9ixRVXOoB+wfo2XYy2JqS A+i1kcjAoGmhBj8iE+Ea0adtBdOih3HYNqOxThR60BjYSnNVg0wpMXjqzM4LwXjQM/Yc 7f2rv+0wSZERWBwWF2hnBFDvoOebVHs621cjyhdPz7OXkcHl+UzfkfaInlsKeNwnO6f8 Uwi/C6Hf1x8sXjIeI2/qm5C+nj3SOu7DPfh+4nOw6Ce6rk6W+Oc0kq7iF5esyW0qUCQP Tg5gkaSnMNxfdt1lWkgv6ycqiKvQ1m0e8chjJdUOdvEGdoy5lrpByglBSpAxWlaqrn+j vwvw== X-Gm-Message-State: AOJu0Yze2d0ptQVrz331EovXJQBZER48r6EAziVtewcTkHKgK7QhwdGb u4BzJNQ/D9CHHvphsvHKdXl7Ib1QWtZ4lMrbVbhAwhs5CreJZXfI4430CMsAv6lac7X2LE20C7g O X-Google-Smtp-Source: AGHT+IGyXkQ0ouvPr+qbHCSb1OxQsk2lwXY11CCMwzwoOEGTC5K/SkLtqlf3Mj1gPHh6dxJSBguLZQ== X-Received: by 2002:a2e:9247:0:b0:2d1:1e31:c178 with SMTP id v7-20020a2e9247000000b002d11e31c178mr3333201ljg.17.1708081475351; Fri, 16 Feb 2024 03:04:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH 12/21] hw/pci-host/q35: Update q35_host_props[] comment Date: Fri, 16 Feb 2024 12:03:03 +0100 Message-ID: <20240216110313.17039-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=philmd@linaro.org; helo=mail-lj1-x22d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081540240100007 Commit aff39be0ed ("hw/pci-host: Use object_initialize_child for correct reference counting") replaced object_initialize() by object_initialize_child(), update the comment. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/q35.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 0d7d4e3f08..0eb1c7034d 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -165,10 +165,10 @@ static void q35_host_get_pci_hole64_end(Object *obj, = Visitor *v, /* * NOTE: setting defaults for the mch.* fields in this table * doesn't work, because mch is a separate QOM object that is - * zeroed by the object_initialize(&s->mch, ...) call inside + * zeroed by the object_initialize_child(..., &s->mch, ...) call inside * q35_host_initfn(). The default values for those * properties need to be initialized manually by - * q35_host_initfn() after the object_initialize() call. + * q35_host_initfn() after the object_initialize_child() call. */ static Property q35_host_props[] =3D { DEFINE_PROP_UINT64(PCIE_HOST_MCFG_BASE, Q35PCIHost, parent_obj.base_ad= dr, @@ -211,7 +211,7 @@ static void q35_host_initfn(Object *obj) object_initialize_child(OBJECT(s), "mch", &s->mch, TYPE_MCH_PCI_DEVICE= ); qdev_prop_set_int32(DEVICE(&s->mch), "addr", PCI_DEVFN(0, 0)); qdev_prop_set_bit(DEVICE(&s->mch), "multifunction", false); - /* mch's object_initialize resets the default value, set it again */ + /* mch's object_initialize_child resets the default value, set it agai= n */ qdev_prop_set_uint64(DEVICE(s), PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35_PCI_HOST_HOLE64_SIZE_DEFAULT); object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32", --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081621; cv=none; d=zohomail.com; s=zohoarc; b=PUCEsl9Q6PDz+yyejS6ZXgSMvGMcS8S1l51O4hsZ8xfautR1Yf4D2yXOx0GxJ3rryPW4QAa+WF2n50uKcOm/NeWyoAlkPh1cjfjPE5lNq6EjT07A7xCFSbISj9Pu6+ni01OOY3hnPd8sZrqzKQljOv/wOH/jXuWvnG9e1D550dM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081621; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SDE/2ozeILt8icMDCEMhs9DK4Gx3Yb4arama1t6dDAI=; b=XLzJWPACNTt/koNnuKYXof9pkhfRL8+rlvUHVRENkoZ8/Wi1ahXte7p+x4FmCeqgrcCubrTPmtkmiezSKq86dwahoHn9N5EVNc6NbdKpwT+pg7kV8rB6hzvPQ8FaisDihFgE8ReL/qQdoUv7JMinaSY35ElSQUX7dbyv2zvjlYk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081621621984.9319969604942; Fri, 16 Feb 2024 03:07:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw1P-0008Gz-Mb; Fri, 16 Feb 2024 06:04:47 -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 1raw1N-0008AD-GH for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:45 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1L-00017G-Qq for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:45 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d094bc2244so24396151fa.1 for ; Fri, 16 Feb 2024 03:04:43 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id p18-20020a7bcc92000000b00411a0477755sm1963807wma.9.2024.02.16.03.04.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081481; x=1708686281; 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=SDE/2ozeILt8icMDCEMhs9DK4Gx3Yb4arama1t6dDAI=; b=zRnddEaPVtVB3ljS8L4qwXg3FSFcOSNQNEZmwKN+dQ3hu6DVbC5oYtHoQ7atunkP+F sCmlXBhPEQPVjb4C2C+w/cGV8tO1aABftXwSMnQM0F3h7ky9mts1rzkmT6yRkepX2G1B jmHzrYz1ZREiP+ondn179HOmhdU+5xcPoZmxEUopslBQLVF1fdwbBQCy5Udtl6vLkfZx v3KOZq+F2/sni8rmSkKlGtfhb+l0fVyH2CmFNWDbUR9hH7G78+GxDbIf6tyP1T2A13rA d6DfZ1J3Z6l+/hjzZ1YG77ymj5pdx2XEE1O8t20ph21h1/x/LcELMWx+lnnJ6HiV29bo qLZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081481; x=1708686281; 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=SDE/2ozeILt8icMDCEMhs9DK4Gx3Yb4arama1t6dDAI=; b=vVbn84gZ+ZiJ1CMVHKQKWnlZ9MdLrZHK4vqGg+nuo9hJ1T1PeQMxaB35M8QDajovd7 4RghIaTff6HMS2VGD4deqpcLtIdJpvUxVGRK7NwYX60aXZBPvt8pTCAw9lwVc1SLCtw/ kJNW2/FUKTRxhpQT0KH8hLdJeBsCCNvMMVRAqsfaR40CiOvFGbDLz4nTANbsXkmIzHB+ 8V2L9i3pLdUd3gdyvo2cSzeHRIyRxoww0ORcCJZldIG2cZSkmUGcPp8LyKA/DUTzfmtE 3Z3xL2Z6LJw2vbMoMN1f+uePnw1DU3xjC6BbNbkz+AanQoDkNDAfz8n5kTyA9YmzDghn eWrw== X-Gm-Message-State: AOJu0Yzmh4i490FQJp/R6D3XeHGDDUjHmUzizrd7wsogDiwVG52exuGZ qU1uLnVxtcEIf0Cxuujadl69tR45ki8cvDmQLZ7lfSpZjjztFY2Bwb+isN1MQUHdYz7mJMeigbt 2 X-Google-Smtp-Source: AGHT+IFZNkHzLFZsRRmZmy29Ui82mj7wZIEzSZ0XA/O/0xcGEFo6EopzBMSekmatFRBZBkq2tUbraA== X-Received: by 2002:a2e:8950:0:b0:2d1:26f0:8167 with SMTP id b16-20020a2e8950000000b002d126f08167mr3170282ljk.35.1708081481655; Fri, 16 Feb 2024 03:04:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [PATCH 13/21] hw/pci-host/raven: Embedded OrIRQ in PRePPCIState Date: Fri, 16 Feb 2024 12:03:04 +0100 Message-ID: <20240216110313.17039-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081622758100007 Since we know the size of the OrIRQ object, we can initialize it directly in place with object_initialize_child(). Doing so we also set the QOM parent <-> child relationship. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/raven.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index c7a0a2878a..9e47caebc5 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -60,7 +60,7 @@ DECLARE_INSTANCE_CHECKER(PREPPCIState, RAVEN_PCI_HOST_BRI= DGE, struct PRePPCIState { PCIHostState parent_obj; =20 - OrIRQState *or_irq; + OrIRQState or_irq; qemu_irq pci_irqs[PCI_NUM_PINS]; PCIBus pci_bus; AddressSpace pci_io_as; @@ -249,14 +249,14 @@ static void raven_pcihost_realizefn(DeviceState *d, E= rror **errp) } else { /* According to PReP specification section 6.1.6 "System Interrupt * Assignments", all PCI interrupts are routed via IRQ 15 */ - s->or_irq =3D OR_IRQ(object_new(TYPE_OR_IRQ)); - object_property_set_int(OBJECT(s->or_irq), "num-lines", PCI_NUM_PI= NS, + object_initialize_child(OBJECT(dev), "or-irq", &s->or_irq, TYPE_OR= _IRQ); + object_property_set_int(OBJECT(&s->or_irq), "num-lines", PCI_NUM_P= INS, &error_fatal); - qdev_realize(DEVICE(s->or_irq), NULL, &error_fatal); - sysbus_init_irq(dev, &s->or_irq->out_irq); + qdev_realize(DEVICE(&s->or_irq), NULL, &error_fatal); + sysbus_init_irq(dev, &s->or_irq.out_irq); =20 for (i =3D 0; i < PCI_NUM_PINS; i++) { - s->pci_irqs[i] =3D qdev_get_gpio_in(DEVICE(s->or_irq), i); + s->pci_irqs[i] =3D qdev_get_gpio_in(DEVICE(&s->or_irq), i); } } =20 --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081703; cv=none; d=zohomail.com; s=zohoarc; b=RRhJWqeKuCiohLCaPi8L+ZrUIhjJR4vaaaQGZ5wWmej2Kuds+b6fRM58lq7ZoHb9Ks39esGv678AEniui5vAEEabicqjxR3Qvda9KRvuGI4sSOy8snUW8KJo25mECA/2MCxjGUSv3Njm4SN6mnpjw75Q2U9XU6R/kRY6KFMVZT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081703; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/zKKBP4rtXDo5bJMJS/mfNxVsCqCESb5cpbpX3cp4fo=; b=EMT3AhboRGU6UNb4kEXAiPooZssBGpGMFFWZW9UMDGIpIpvfWHnQC7S7H+K7kNar0dp3f1429IYeUa2rJNO4VikivtN9GrPnwp0dXNtwwxRMnmAUA8CHJ3FQNC11gBEBS5Nf1nsp/J3EqjWXUGlPZ0bGQ602/Kz7/VuUkb1YXd4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081703516723.7007336041221; Fri, 16 Feb 2024 03:08:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw1X-0008WT-5h; Fri, 16 Feb 2024 06:04:55 -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 1raw1U-0008L4-E4 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:52 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1R-00018S-U9 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:51 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-41243d19ecaso3270935e9.3 for ; Fri, 16 Feb 2024 03:04:49 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id z10-20020a1c4c0a000000b00410794ddfc6sm1951788wmf.35.2024.02.16.03.04.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081488; x=1708686288; 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=/zKKBP4rtXDo5bJMJS/mfNxVsCqCESb5cpbpX3cp4fo=; b=hgHoEzOTJE2GAUdiiRHOopema77vTDTSD4nbLnBygQ13j/5siddqlKYhgLWQMwuvpM HovwuaGJVjwV2RwJZebBlNkmH3ZIh2Yr3j/FPdNLpwePpUNcaxONY+ev1+puxcpta4ed zkXbvCaYzjoAzcsrFr6nfWNGihexkUPC5kRzLhWNY5HhegVUjHdLdKAMkKlWJX4vZlvs KtZwXjWB0Yck/8I50TABB2tH1t1maoOYUYZgDrkKA2jWXx+0/qDa9P91lqIdH656Q9CA wy7cTaLR1rXo2s9AuB43NiHqHuQ+FWQce4M1crAv/njIu/Rzv2KI/Vo8nZrZlU9XVzH4 HaSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081488; x=1708686288; 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=/zKKBP4rtXDo5bJMJS/mfNxVsCqCESb5cpbpX3cp4fo=; b=Hepvf3vzem+D1rCkBq51+gHDED1tgt4QYNebjbz92hrxubhEDfoL4kb/hoR+7TqycU NRINbGJ5iTSGjv9Tn8qcqhunRkSKGQhOdhlKcKyjRXMy2gZmVgxej5rjeWhvNydg+3WM kS/+fHO5UNkLknpsT7OC404YNc7oF3x0rRwuMkKY9rioLJkSIGkuAboLr8fbcul4e2AP MZ1hjml6uq9PsXeE39PN/xmMza+aMgZCrsaHWTkVUHA/49XRx/3G5CBeHN0v/zFkD8pK 6FzIFKDFLKAMgLNw36tzTBsP2N73xWAsPrzMHFrxJyzePYye/g7QdukXaJWX2B1ctp3v GFtQ== X-Gm-Message-State: AOJu0Ywpj9cuxTmi0T/HYAgaRM9m8GCOVantY246+L89pMP2d5307UYY NV/PzsEpWdjdi2BOhfCdV/k2nR1Q3Ho9ys7fMeyzC4nmD1fB/VJ0oZ5q/XrzgeMA8DT+SNaA/VT V X-Google-Smtp-Source: AGHT+IGgjyvWrYtBiVWbJH9Hd2fA/gQ7wfOAlbmp9eMz/Yvpo5y0Icg2z4i4a0EtIi38Vn2E7u28mQ== X-Received: by 2002:a05:600c:6a07:b0:410:ed9f:7acb with SMTP id jj7-20020a05600c6a0700b00410ed9f7acbmr3427466wmb.40.1708081488237; Fri, 16 Feb 2024 03:04:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [PATCH 14/21] hw/pci-host/raven: Prefer object_initialize_child over object_initialize Date: Fri, 16 Feb 2024 12:03:05 +0100 Message-ID: <20240216110313.17039-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081704900100005 When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/raven.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index 9e47caebc5..5ef25edba6 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -290,7 +290,6 @@ static void raven_pcihost_initfn(Object *obj) PCIHostState *h =3D PCI_HOST_BRIDGE(obj); PREPPCIState *s =3D RAVEN_PCI_HOST_BRIDGE(obj); MemoryRegion *address_space_mem =3D get_system_memory(); - DeviceState *pci_dev; =20 memory_region_init(&s->pci_io, obj, "pci-io", 0x3f800000); memory_region_init_io(&s->pci_io_non_contiguous, obj, &raven_io_ops, s, @@ -328,11 +327,10 @@ static void raven_pcihost_initfn(Object *obj) =20 h->bus =3D &s->pci_bus; =20 - object_initialize(&s->pci_dev, sizeof(s->pci_dev), TYPE_RAVEN_PCI_DEVI= CE); - pci_dev =3D DEVICE(&s->pci_dev); + object_initialize_child(obj, "bridge", &s->pci_dev, TYPE_RAVEN_PCI_DEV= ICE); object_property_set_int(OBJECT(&s->pci_dev), "addr", PCI_DEVFN(0, 0), NULL); - qdev_prop_set_bit(pci_dev, "multifunction", false); + qdev_prop_set_bit(DEVICE(&s->pci_dev), "multifunction", false); } =20 static void raven_realize(PCIDevice *d, Error **errp) --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081590; cv=none; d=zohomail.com; s=zohoarc; b=UozRonz+38tRzfZILR3ZIPNrImH92b2DcLQoaOyoET/zSgC+68lgV30uxvVGB7VMC7mbaO1nEY85S0MluMVZf8CGjBI+2nOwf0atfUDvLdKHmoBCcFHlo+ShpAVYVI03i7mm/O1MiUA63CRhI6OWI4AlCsJIzoCx45idrY1VJhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081590; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XbRM+bkgLot/ksoxAWBDVY0FT1QlycUiAAgPHWKXiwg=; b=kdKbsvnjmc3XF3PWdL5wyq82Tc/wxHz1ESRP3W0qKmLglhnMzV9NmxjL79mbU6Ld4q1EpgIunW1ncIoFyVQ9iXptvdDYCkDcElsuk03PgmRg5GsfIChcuzCY71zVxgP3u5lLMFvHkQPjl9QHC0YJO8I6raYNwzqxJTZniC30pi8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081590772570.1186748381056; Fri, 16 Feb 2024 03:06:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw1s-0000hj-60; Fri, 16 Feb 2024 06:05:17 -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 1raw1o-0000QL-M1 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:14 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1Y-00019r-G0 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:10 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-337cc8e72f5so464925f8f.1 for ; Fri, 16 Feb 2024 03:04:56 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id bp4-20020a5d5a84000000b0033d1739aedbsm1908351wrb.95.2024.02.16.03.04.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081494; x=1708686294; 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=XbRM+bkgLot/ksoxAWBDVY0FT1QlycUiAAgPHWKXiwg=; b=pKr1CCvUMUAtvcb60s5t/Y69MiuQng7NHnHq2uMqrdOxyXrhYMTtCDTLtbYxHoHtt6 S4j9dh9YbpdH9TZf9HAJkBsHZou/wRpyFZJ2q98SZLEhx0lU3woUL/2xcvkXTIpAMHxW WTJprwEvTEgFOl5lcQ97UtRmg6uV9tDb0FYwOtvYyfIooxkJRbnKu8B8yqIC6qFZy2t5 txjIBtC6+4nT3ZeYKnGG4lxQHUhqQuQ5RWI3NBAnfKSRpqrVBZddxJCbRwhr+AtqQnRP SGMQGIc2GFqCyQRpiWCrWkYJEZRyj1Jp4IIcZx/a04F/+09JqAoA5I0ieiLVKl6bTjtN Cecw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081494; x=1708686294; 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=XbRM+bkgLot/ksoxAWBDVY0FT1QlycUiAAgPHWKXiwg=; b=ixoHxUq2qIeuMqcMAn2A69/r4VFdBPGElgwlj4+TbFdfewmkdYn/VL2HavEe2v7Tqk VjBfqruPCM6AkH6kxzXrOCqatj7Kxd9Kf2dpwDM2IfnaLdAdnCxcGMb/t73rZSCl3rPW jsWIDAOJ/gAhJQCfb6aEfQSeI8WCByL7WNM3z6Zzni0qMjIZwHS7eIOKkzhF/6KpKVGL rAZZ3a/XTmgm6RUkDMjUQBRuDKVEvlWpRHLn2y6yIA+DZkkvT+R2GLboaN1LIzj5xBrs YQ3YAdEA7WLtjL9PUJWlgwpFvgcOJIcvnnD7uCgOACuEcj6IuAjqbgT7DHZW3qVU025A MlyA== X-Gm-Message-State: AOJu0YxusjZ/MI1Y3ML+vczyCW1ZsfHjzhtwM6bUf6VQIjJW5CtVTLNM U1UyTDrK0rk+xiFfnTUY0hEBjKROoeGI2wyhHH0DkDDo2rUDjmRwyhs3hapPYU87ZhTiMx++LPt q X-Google-Smtp-Source: AGHT+IFe5OliSyJibMBgUHdDNO7CMTrosWk24Qnw86AXIXN3utmz6AADxYEn2XgAM/uXtOR/i0Qhgg== X-Received: by 2002:a5d:4fc1:0:b0:33b:5563:3502 with SMTP id h1-20020a5d4fc1000000b0033b55633502mr3177267wrw.17.1708081494488; Fri, 16 Feb 2024 03:04:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis Subject: [PATCH 15/21] hw/core/register: Prefer object_initialize_child over object_initialize Date: Fri, 16 Feb 2024 12:03:06 +0100 Message-ID: <20240216110313.17039-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081592407100003 When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/register.c b/hw/core/register.c index 95b0150c0a..b6beca0e02 100644 --- a/hw/core/register.c +++ b/hw/core/register.c @@ -259,7 +259,7 @@ static RegisterInfoArray *register_init_block(DeviceSta= te *owner, RegisterInfo *r =3D &ri[index]; =20 /* Init the register, this will zero it. */ - object_initialize((void *)r, sizeof(*r), TYPE_REGISTER); + object_initialize_child(OBJECT(owner), "reg[*]", r, TYPE_REGISTER); =20 /* Set the properties of the register */ r->data =3D data + data_size * index; --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081736; cv=none; d=zohomail.com; s=zohoarc; b=HJbyZfpe1YoxkcuSQTAQqk8r1YwEuM9uRVUunh0e6IS9RJRr9djWHHeT3LoVZunpZRwn2fcw0S7sLmDsu17o8ZGr/0JSrSDvnOSgH14aO+w4+hd8cUsCOmSoR4bMYY7hL6yQK6nVa4SOjRzEa5+lwSkp2O5uo30FdcBiL/iYH0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081736; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=48d0wm1jd8E2EcPt+QBeCr00l3Febl6qelXBQC6Tkz0=; b=S/B69GlVqC4355n0aYV+MLe7fEPxdjGVqvavSoRpfDf6/3qzaYbrCpEi7b6avR7hvt4lO12JQIbluj3DtajejCmMcfwLkwqffVJi0EGCXSCKzfqkCc9Jo6JFM9UWn8mOasyxfrjVlH0/LDESWgyKW0O9CIXj/Gm4xwqzwSeTy84= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081736556133.39949820832226; Fri, 16 Feb 2024 03:08:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw1w-0000yl-1b; Fri, 16 Feb 2024 06:05:20 -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 1raw1s-0000jp-H9 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:16 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1f-0001C1-QQ for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:16 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33b28aadb28so1011208f8f.3 for ; Fri, 16 Feb 2024 03:05:02 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id i5-20020a05600011c500b0033cf095b9a2sm1872339wrx.78.2024.02.16.03.04.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081501; x=1708686301; 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=48d0wm1jd8E2EcPt+QBeCr00l3Febl6qelXBQC6Tkz0=; b=p8uKsUMA3UkpnF4XwBkE7tJapWa2ePRHGARhy3jA+bfHqxZKHz1pVa0Ow8w7HmwY6J tYZdkmvmTDJiP+kh/bUai9Sfht2Og6D9ZM7WAPhebwQAzVu+u5qOIHi6bLtwvnotnLys IoxPJHNHwfLiir4Ye4QjE0e7McEAzNZFPFR/WTlaAbH3NXIVQBGvQpH/DoqOzimKt/YY 3aF+/S8Jg8d+SDfFWiN4UGw7jcb1Kq33HgOXuJsSEf8AY0Y8xz27qyhUMtScmlE8AzcI vzWj37XV2C95kIkgcF0uWA/hQyr5C47IxL2uev2a8rEuGEPVvDA/qCp3CCQzXNvsnOc0 BRCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081501; x=1708686301; 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=48d0wm1jd8E2EcPt+QBeCr00l3Febl6qelXBQC6Tkz0=; b=uOjww+USZdVlx8lzxN5t9/Yh5t0ezjfGYFPbD0vkzB7GfmbdKo6TOEv6I0nuffQx7a GBMf4WwszUQd0t2I2sbE89YIC5yVWC6qvcjCpeTwLdr9O9eAkoTf2LPK6l5ncb2Dr+AK OMMAzGhZBiwSfQeeoGKi2l0qn0t6sLjZFPjDUg/7ny6O+T8Usm3cKIQTvqAkPEj+2PPG n+1zmdx1Jx9SYJFT+UAF5GcS6Kwz7zi+G2DMyypwJf2flJw4SM+SKBFcRs8y7CaGS/fP Sc7wHKKlmb9aAWPsNPLqH1gJjTAOyGjqXYSYZzhzQRCXulsxbyYlJvbXyO292iP6gWxU ueMQ== X-Gm-Message-State: AOJu0YyApFpcdbtNnjpCW3w9kKPOo42vMxjOt9nt1KLgzBVAaGdL8WUQ nQBylshABqYKooWH32XFD9pR8IkMYG++ps3l4q5lM1qdYQQ/Y7iHGzRjhEHo7M0298b26LWKr8d + X-Google-Smtp-Source: AGHT+IE414mhQNndxrGFebQrZkzATjJvXCu4SoPFbAYg+BjNJr7pqir1xZ7MIJ6MJ4hnVG5vxB285g== X-Received: by 2002:a5d:6a8b:0:b0:33a:e9dd:5b6b with SMTP id s11-20020a5d6a8b000000b0033ae9dd5b6bmr3133003wru.9.1708081501246; Fri, 16 Feb 2024 03:05:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pavel Pisa , Vikram Garhwal , Francisco Iglesias , Jason Wang Subject: [PATCH 16/21] hw/net/can/versal: Prefer object_initialize_child over object_initialize Date: Fri, 16 Feb 2024 12:03:07 +0100 Message-ID: <20240216110313.17039-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081738122100001 When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Francisco Iglesias Reviewed-by: Pavel Pisa --- hw/net/can/xlnx-versal-canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/can/xlnx-versal-canfd.c b/hw/net/can/xlnx-versal-canfd.c index 47a14cfe63..f8e4bd75e4 100644 --- a/hw/net/can/xlnx-versal-canfd.c +++ b/hw/net/can/xlnx-versal-canfd.c @@ -1900,7 +1900,7 @@ static int canfd_populate_regarray(XlnxVersalCANFDSta= te *s, int index =3D rae[i].addr / 4; RegisterInfo *r =3D &s->reg_info[index]; =20 - object_initialize(r, sizeof(*r), TYPE_REGISTER); + object_initialize_child(OBJECT(s), "reg[*]", r, TYPE_REGISTER); =20 *r =3D (RegisterInfo) { .data =3D &s->regs[index], --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081703; cv=none; d=zohomail.com; s=zohoarc; b=fhwaAkhQxiK7h157lP1NChMdUIaSa9v87c4YKNIfUkbvdesbzV3TtEFQ7/lzyKs/OZeyOPkHbaAVmZtXBlI409Ns969bl99Dy8ejAHqbMKp5IXBliBgsoRtneV4frdOG19RgAH4XnlGGDerbu/W8hDVf+5hfh5f3REBJMh2Gz4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081703; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wIiFm5Lc76s4egbopN+QwAc3v81IfNt4gHe1mB8rI9U=; b=b7Du33tp+4ZvCr8LNKm8gG0Cy9T41G7i7L1CrPgx6RQv/DxqFJqXYC3AM+I0NhjA+1wMZqCezHRXlEzXe2fbTRoh4Aa81VtepU0SAkK61Ji7CT2fw2RTpsQejy7eAKznS4E+gSSWqbc1hpbDY2C53dWoVreEqM2V0wFptVmPHbM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081703953325.1573973523143; Fri, 16 Feb 2024 03:08:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw20-0001Cx-QJ; Fri, 16 Feb 2024 06:05:24 -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 1raw1x-00013D-CC for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:21 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1m-0001DP-OA for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:20 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-33b4e6972f6so912362f8f.2 for ; Fri, 16 Feb 2024 03:05:10 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id b10-20020a5d40ca000000b0033ceca3a3dbsm1898621wrq.2.2024.02.16.03.05.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081508; x=1708686308; 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=wIiFm5Lc76s4egbopN+QwAc3v81IfNt4gHe1mB8rI9U=; b=JKl4ls6s30yDphvgFJqbet/DnKLO6hOugNHjlqBQM4MmoyrzpXxtYqCz9RU9iLq0Bb wxxWr8TuJ1s8kz+aRFHPxFmQZxg0Ewv7/J62aaaKGksrO7Bw9nUxL4N/1Yr/UVXRI3QP x7ksVuHBMJ0mmXYDvgx8bvDKgmNuCV5Bwk/ZM6bUpVcOIBKW4LFvKa7sDsdwraNHeELm 6vQysFkGoTrl+vurBUP5AA/THKiAx5FV8H5+qXIjp67ku1fqcXuuAOqwSbIbaNqR0BKO gnfb+qp45ne7y6GJLh6sOVYD1u37dTiEK/KJinW9BO3E7eVT+wN/AQG1LgJlET73ckth SPZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081508; x=1708686308; 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=wIiFm5Lc76s4egbopN+QwAc3v81IfNt4gHe1mB8rI9U=; b=mpFVVbJ5OpWlHQCTGbaDRg/jiqYARxSTGKzLefcTLs0h/+e2CXEmV5Sj75oKVfwriF feajiZQYa9Uju8ZdgG7ez8BTEiASt7WsvyVlFb1F6u/Xe2iT+FgVZRAt0I0uE9BLlpA1 Nw1OieR6ApcM+fimhW7UCxZhKC7X+Qn7+tWfMWLdRZrKtaJV8qfOdO4Nn39JbQ2IDszQ 1A1b+ueAjMShlVw//Vbt/lvMvEgdVwPNmna+qud7/uaSNwn8AHmLiawCxn0jO60FvmUo bnl1n2MwX9YCeUWULZx9HDL/7qtkqtXNoj73KqeYUvibaIRlt8ZauApi+XIqWP+YJDWO 5e0w== X-Gm-Message-State: AOJu0YxE31UApwz0VXytNQvtnedpAy+rUddYU92U4tnDwaXDEfiY5Iox eT8GFhCP1EKRCdC6Ym3sPu7TVTiZxD7zSe2upzh+6adIheDzCiyuz6/LUecV+TEg7WRF3Ubpb30 r X-Google-Smtp-Source: AGHT+IG6XP4dbGm68hmsfizv3Pfjes9DvZbgcYeGu9WzGNH+dZXsKbuIq1Wy3vt36rJT7bBRfGZByg== X-Received: by 2002:a5d:664d:0:b0:33d:157d:a7ad with SMTP id f13-20020a5d664d000000b0033d157da7admr1642262wrw.40.1708081507912; Fri, 16 Feb 2024 03:05:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH 17/21] hw/i386/iommu: Prefer object_initialize_child over object_initialize Date: Fri, 16 Feb 2024 12:03:08 +0100 Message-ID: <20240216110313.17039-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081704906100006 When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Rename the 'klass' variable as 'obj' since the argument holds a reference to an instance object and not a class one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/amd_iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 7329553ad3..c3afbc4130 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1616,11 +1616,11 @@ static const VMStateDescription vmstate_amdvi_sysbu= s =3D { .unmigratable =3D 1 }; =20 -static void amdvi_sysbus_instance_init(Object *klass) +static void amdvi_sysbus_instance_init(Object *obj) { - AMDVIState *s =3D AMD_IOMMU_DEVICE(klass); + AMDVIState *s =3D AMD_IOMMU_DEVICE(obj); =20 - object_initialize(&s->pci, sizeof(s->pci), TYPE_AMD_IOMMU_PCI); + object_initialize_child(obj, "iommu", &s->pci, TYPE_AMD_IOMMU_PCI); } =20 static void amdvi_sysbus_class_init(ObjectClass *klass, void *data) --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081871; cv=none; d=zohomail.com; s=zohoarc; b=GUApzxugaWL4HxGF20DNrvTF/oJr2RzutMSlz2vbg+CelfdL9E+lS2ltazFsjAVE7EOpRE1Q4iKXZYII4qgOPy5I+6407YRr15xnheVFRRQt6jkG2Tsh5jkwm33N88pksV8KdpXzXkeLhElKUVCDGzL0XcK9CVbC5H1HvpKxzGo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081871; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ELKUbUBr744bWbi9HHUFUd98mluSMaEj1sworCQzpug=; b=TaFQF0sZ6arciu4/rn9PNzei80b9bMGB36UZjPCh4ZJwnk/r8VMK81s/yoafQkMSoy8yRB+lSpxLqt73igFaAk8PYzSLr/EPPBbaaEBr3X82bDSz2Wwmc6FrfgAhfYq2qol0q3yZP8v+H2SN66YkUOErmgRXqRJPIfDDyeIdD4o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081871523206.42974569085686; Fri, 16 Feb 2024 03:11:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw2A-00023L-3p; Fri, 16 Feb 2024 06:05:35 -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 1raw23-0001ZY-VR for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:28 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1s-0001FM-Hx for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:27 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33934567777so1057476f8f.1 for ; Fri, 16 Feb 2024 03:05:15 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id x6-20020adff0c6000000b0033cfc035940sm1889460wro.34.2024.02.16.03.05.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081514; x=1708686314; 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=ELKUbUBr744bWbi9HHUFUd98mluSMaEj1sworCQzpug=; b=Hx/8fgPXQq5hg4OPgOcSzsfgVa+ySPBuLbXb6XoE6MpS5Qt3zWfpoMP4G9rBhVzLf3 holnO1KCNPid2zQheWFV+d3TSmLDlTkdoeX6tNHhk8LfMWXfNC2pmLOhKoxiSefimFcE DOXXH9E1XEz638rO60CAgUaIafpoVcPMWF697jVf7wRXNvjGteM8ouE1RYJChM0ibVy3 5waXu1msyJM4lwfvnAgMrtVWtwFv9oAFqWfq1JRPreIGSRklGvw664q5HRLogkYebKIW /v+VcW695zUrGewdh9BAtwEFFizcD86om7VEfTNNxwxEivGpBgTGwfqFa+UytEQ0c+hL ZRDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081514; x=1708686314; 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=ELKUbUBr744bWbi9HHUFUd98mluSMaEj1sworCQzpug=; b=EZOKFfryG9YKIZFW0pu1Y+F5jJ6Q0h25MI29GOUBs0pQp2eQqDx3EE4/2jdo3NKJMM WXiwBdW0FQ5VjQ6hBN8PylXZ1Y4aWIquA8jwzcyf74i+CqERqe4qhLX7xygMx5RXIEif OamxmroLsy8TpvaiYGXjVRL2fm4KDPOQ2QqMr4EXcyc4/H5oNFxjDIFnPK2wzRKca9Ii TDS02b1O0xoajW5ch5Uz3E/LIMnaiXJCZYJEqbNk5S/mJX0dGKarIGVSpMIiQCjHA9Lp niBHNhzLurVgJDo1TLPXI7KWU27vnGjCFO8f7JLMKQXOA/Gz2fUZRqgYEWjPXrBBu7VG R/Yg== X-Gm-Message-State: AOJu0Yw4/kwi0akbgR1mUtLQBMKl3IXV1qiQqoedQYRWFynnsqyED0vl B0yYPTRzHH6i8TWrBsB8rem0Xubcz62otwD2+Jy0Y0YiCIYXcSiLCFpQUscxJdrFdPRgZHT1NSn S X-Google-Smtp-Source: AGHT+IHLOkpd1E3B//Qhh6skOFM859/0GFEnyy22LpH6nRR/jpLF34pA2atSRcEoUH04EYIRGJGmiw== X-Received: by 2002:a5d:4a4f:0:b0:33b:5087:c913 with SMTP id v15-20020a5d4a4f000000b0033b5087c913mr3438284wrs.54.1708081514666; Fri, 16 Feb 2024 03:05:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH 18/21] hw/pci-host/versatile: Replace object_initialize() -> _child() Date: Fri, 16 Feb 2024 12:03:09 +0100 Message-ID: <20240216110313.17039-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081873559100006 When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/versatile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index 0e65deb3f9..5d1f9cc96d 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -410,7 +410,8 @@ static void pci_vpb_realize(DeviceState *dev, Error **e= rrp) PCI_DEVFN(11, 0), TYPE_PCI_BUS); h->bus =3D &s->pci_bus; =20 - object_initialize(&s->pci_dev, sizeof(s->pci_dev), TYPE_VERSATILE_PCI_= HOST); + object_initialize_child(OBJECT(dev), "pci-func0", + &s->pci_dev, TYPE_VERSATILE_PCI_HOST); =20 for (i =3D 0; i < 4; i++) { sysbus_init_irq(sbd, &s->irq[i]); --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081872; cv=none; d=zohomail.com; s=zohoarc; b=jOvoHTbnXbo+IFKzFl4QqKsMOsBio5z5NtZg/ifzVi3Eu+SyA/ovu4MbttpEwyWGmuAfqEJVJ/AleRpSIqVfeZT3CMbZGUHTOssXbZQphajVjsa5slVU7OsFnaLNhYRbs9okInHxcUQID9qDiwxjwwmQEPTXQcH85pfBdcwy9nA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081872; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EY92sY1OM6q6PT81SQkKCMEQr7lGvoIEo8ukB7aXD50=; b=IRY+62+tMalVyKdTcT9fipjJrzX+A0eyJAUdt0nhu77YHD/Y5NwZKgYPBy/nXMsdjF7TID54XDjzHr1wsEvbdkBeTnwk0HeNV71VctVeOF9vzYwSiezzruwVTd14Q3Z0pydRgsp6rki77atyrVu5xq3T2QwHVKNx05gcDBQetoM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081872218174.2337590232985; Fri, 16 Feb 2024 03:11:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw2E-0002Oy-MB; Fri, 16 Feb 2024 06:05:39 -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 1raw25-0001fp-8B for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:29 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw1z-0001Hl-Ng for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:28 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3394bec856fso1782605f8f.0 for ; Fri, 16 Feb 2024 03:05:23 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id i5-20020a05600011c500b0033cf095b9a2sm1873207wrx.78.2024.02.16.03.05.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081522; x=1708686322; 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=EY92sY1OM6q6PT81SQkKCMEQr7lGvoIEo8ukB7aXD50=; b=Y/ZcLL72CDJKL+5r2dO8P+wIpI7/77R3I3pQmRUqOH21HAHQjN59/1XuC0YIykgVv3 GZ8nNUws9Sqe5zvOMTgdzr9YcCXxHLHdk4CQhx1guMtQ0SPnUHHJ7mgKPRT8Kbz0av99 E6jGgkK2IW1uxLkQgGbyHB8C7KbTFQ0GZWtYHdGf7v2IPcX/mvWQR+ffdGteo2kk9RUz frb/Up2+gAy+Xf6vRXBTnr4BN6cO30tCboc4r/n4uPDSBp/7ydUDiGA7EKI2fDpQXFDE 6CDlpj3c+B679wRIOLafXInl+Q4EgGxcpdgCq7fe/n2z7mb6Hc+OuVFk8cXLMREWRNFM NdYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081522; x=1708686322; 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=EY92sY1OM6q6PT81SQkKCMEQr7lGvoIEo8ukB7aXD50=; b=Rm0ix+0ZR2cjxdCXe85v0ForcIn/nTAHZwzJR41mzpes3Qs24nHwkYCpofXPQOUUu3 YIF5LDdqzDB/OMkXH2O8qQyjKes4I+yAFV6F5p21kpDqY33EyeQ3o4jDgVHud8CHPQuq oj+DIgy8agRU0isFDOOEQc4vPKAg4dgd/WB+xjRaBZ2GOt6r/JyFg6ys914KCcgXeQeq djoIFfjeGANgxi16qBqqmNCW5ZLf6FlAYtI7h/Qrr7ltAtfGmyd4DzewpAou5f6QKzJR FqrY2sMeQPYqaD88jbDuGQN9y1xXQR1493Gu+LGR5BSGkgmBbo8U9WQfUsX1uPYW8yhQ p3fQ== X-Gm-Message-State: AOJu0YyUTV7pIuqMLNWTygWR5V4UKG499dB429zX4Rgvy6cORdJT8aWr InBD0hk4DJ8D4svyxm4gGx259ciRaDeNoujeKXGnzVUzaK9OIPGwU1zPj7uIikVHIvUzH7H+Bq+ c X-Google-Smtp-Source: AGHT+IFX3LRB9nE1Kt3bjiVuGKSJ0Ca66wmm/33ndnTNcwVDid+HlwyJnTfGDpIjNrYio+Brf+PD9g== X-Received: by 2002:adf:efd2:0:b0:33d:201f:ea9d with SMTP id i18-20020adfefd2000000b0033d201fea9dmr875165wrp.2.1708081521846; Fri, 16 Feb 2024 03:05:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Eric Farman , Richard Henderson , David Hildenbrand , Ilya Leoshkevich , Thomas Huth , Halil Pasic , Christian Borntraeger Subject: [PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices Date: Fri, 16 Feb 2024 12:03:10 +0100 Message-ID: <20240216110313.17039-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081873559100005 QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/s390x/s390-pci-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 3e57d5faca..6d07a7b530 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -934,6 +934,7 @@ static S390PCIBusDevice *s390_pci_device_new(S390pciSta= te *s, "zPCI device could not be created: "); return NULL; } + object_property_add_child(OBJECT(s), "zpci[*]", OBJECT(dev)); if (!qdev_realize_and_unref(dev, BUS(s->bus), &local_err)) { object_unparent(OBJECT(dev)); error_propagate_prepend(errp, local_err, --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081763; cv=none; d=zohomail.com; s=zohoarc; b=E/JhI6945VG3MqdzOGMj6nvToffGfsDWriQ8iI4+4R2xRTWCBon1/p6WWfrSDjqwuowl9Z99hUBEBCntlqzZ9eyHe4SRYPucsdH/wrj6nDIeQl8j/KFMsYebNI1FBK82MqkDSqoyfNua+Uu8GaSV95ofmUO9btEzPm7sBYZzaN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081763; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+TP1TJioczzc39Hx3iqthMm6LDPQbvhwTOiEAkO1gUM=; b=iyEORSfhzsl6Q0cRPZ3oM6qBSegCA3R7/1ctS8uIBakfZEfGMYanbgD1uxNsM0UM3rYLuh699o10DlFsvEXNFbD5WyrzdiB9KDQ5T2IvaJvn8Bkx+T9uQtaIfxfQYnws7c7C7WiSeirehj93UrWgw/ePZ15EyqRO7qbZmntFnu4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081763965182.10118911194206; Fri, 16 Feb 2024 03:09:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw38-0004YI-WE; Fri, 16 Feb 2024 06:06:39 -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 1raw2E-0002bV-Qu for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:39 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw27-0001L6-AN for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:38 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40fd2f7ef55so16816995e9.0 for ; Fri, 16 Feb 2024 03:05:29 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id l8-20020a05600c1d0800b00410c04e5455sm2031239wms.20.2024.02.16.03.05.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081528; x=1708686328; 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=+TP1TJioczzc39Hx3iqthMm6LDPQbvhwTOiEAkO1gUM=; b=YxW32De3ZsXwzJns1+dzJxJhcBFHYEb8tnw00Pf98GX+sR5gfeKz/H3vV8ezDDiDmN Vp7iT2hVTH/vhgcq0Zrzd3K1wFB6aA+HwgnbHY/X5FiiFwjHjC4revQ7rlIVkg7gwxnx 3uCP5OMjKl0is5y2Ety2xRPsrWsPB8LYEXR6hi3W6MV5DFzaS4sfVYqLENmRCUYq+/C9 ST7vnlkCbp5vBgMHS4El2ekn9fFvZBNUkaGQ3nUYfHLOZYaS0jpGCX8rQhg/9NHrS7bv ED6JuTxTNE8BcokPCcENyQDdh4B9spnhIuEp48xK8VNG1R0yvqlKve4ebn6UcB/Fjaly EcwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081528; x=1708686328; 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=+TP1TJioczzc39Hx3iqthMm6LDPQbvhwTOiEAkO1gUM=; b=NvERRj9zm9ydTlQTGux8r5v05i+7dJdcvKcJz9xXZ/bTE+jkZwJv6sllPfrWLgtjdI gxpr+C9X2w7y2GHvxDZEAM5NVlPjYHWK9I95yyjvv9HevOZ6P5eHiFWvDL3oDE9xRb4W HlgjfY4lspVyhReoYbOOJKujZ9ZQudFBpDQXnZ2rZYDXO9ooNTHupL8KvRu7tnOSr2n1 xU/FqWPetTnMLlnNFepaDADNlONaRiJMpmJkM2wueiZjEVqqXn6s2r5VyqnR0+8HRS+V IT/6slut4sDIOWgLNUcZOKqDjZuhF2kT02I/HT6c9jmVF7tV1l5KxFdro8Cb8MQ36huh imWQ== X-Gm-Message-State: AOJu0Yy7Q8jk87ObReJPyAzDiTb7mA9Wy39ivEFNLzTcY6zVdkExqelb b9GLV2CU0V/cjqBHo85kXrElM+Do5gcpf5FPuU7lk1jXs9LUvU5GYiz1Nr8PpO0cbx/11zbhMQM G X-Google-Smtp-Source: AGHT+IEuLhan8PMzjpoVk8iNDX+51J2TUk5ZsvY/EOaOL/amk+8mlPJ5ImdnALCtoNT5IeBwXzj7/A== X-Received: by 2002:a05:600c:3b10:b0:411:aa3c:128d with SMTP id m16-20020a05600c3b1000b00411aa3c128dmr7082597wms.15.1708081528391; Fri, 16 Feb 2024 03:05:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH 20/21] hw/arm/mps2: Add QOM parentship relation with OR IRQ gates Date: Fri, 16 Feb 2024 12:03:11 +0100 Message-ID: <20240216110313.17039-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081765193100007 QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Better would be to embedded an call object_initialize_child()... --- hw/arm/mps2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 50919ee46d..780f2adf0f 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -274,6 +274,7 @@ static void mps2_common_init(MachineState *machine) =20 orgate =3D object_new(TYPE_OR_IRQ); object_property_set_int(orgate, "num-lines", 6, &error_fatal); + object_property_add_child(OBJECT(machine), "orgate12", orgate); qdev_realize(DEVICE(orgate), NULL, &error_fatal); orgate_dev =3D DEVICE(orgate); qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12)); @@ -317,6 +318,7 @@ static void mps2_common_init(MachineState *machine) =20 orgate =3D object_new(TYPE_OR_IRQ); object_property_set_int(orgate, "num-lines", 10, &error_fatal); + object_property_add_child(OBJECT(machine), "orgate-12", orgate); qdev_realize(DEVICE(orgate), NULL, &error_fatal); orgate_dev =3D DEVICE(orgate); qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12)); @@ -333,6 +335,8 @@ static void mps2_common_init(MachineState *machine) =20 txrx_orgate =3D object_new(TYPE_OR_IRQ); object_property_set_int(txrx_orgate, "num-lines", 2, &error_fa= tal); + object_property_add_child(OBJECT(machine), + "orgate-uart[*]", txrx_orgate); qdev_realize(DEVICE(txrx_orgate), NULL, &error_fatal); txrx_orgate_dev =3D DEVICE(txrx_orgate); qdev_connect_gpio_out(txrx_orgate_dev, 0, @@ -425,6 +429,7 @@ static void mps2_common_init(MachineState *machine) =20 orgate =3D object_new(TYPE_OR_IRQ); object_property_set_int(orgate, "num-lines", 2, &error_fatal); + object_property_add_child(OBJECT(machine), "orgate-ssi[*]", orgate= ); orgate_dev =3D DEVICE(orgate); qdev_realize(orgate_dev, NULL, &error_fatal); qdev_connect_gpio_out(orgate_dev, 0, --=20 2.41.0 From nobody Fri Nov 1 05:38:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708081762; cv=none; d=zohomail.com; s=zohoarc; b=Y9Otws0dJClwcgNm/b9gRC792TaM6jIMVrbUKUFdwn+9GD9BNM/cjlFJIRNgn17B4O9wnskYt94xFwza0+mDDK5QF5pDpSbuZwVyUmugJ+KPUg7GNJnLBMlvZWvKvEX8aQDhJtrtvF6XpF0eQyBnkfhQs/cmXd5JoNH6Evpdm+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708081762; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F6ajeUmTQmKHExarjmIHQmgeLAwEfZL4L6fDKfFyi0M=; b=WGPxSQBg8Fch5s2kG7fr5F5f1t1TVTDzhz2EAKDGPHJv/7nzwz6KOCYvbW4zTnFc01aOjL0ski/CJWxBccd70vSGjCZnDrBvTSRrKQqbriiNcKCI3foAyxT3WgcXOckm4NDMj960VRdHktYRpAeHjsJI8oW2g/ppxx0CKcYubVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708081762843620.4398193075892; Fri, 16 Feb 2024 03:09:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw2M-0003Mr-SU; Fri, 16 Feb 2024 06:05:46 -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 1raw2H-0002kS-D4 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:41 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw2E-0001W3-4p for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:05:41 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41211097adcso13376235e9.3 for ; Fri, 16 Feb 2024 03:05:37 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id 13-20020a05600c020d00b00410dd253008sm1927267wmi.42.2024.02.16.03.05.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081536; x=1708686336; 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=F6ajeUmTQmKHExarjmIHQmgeLAwEfZL4L6fDKfFyi0M=; b=dWLtbfh1Gmr6bwIP2lCRTT6tGAslqKGAd5oAfkaSRPDMUCRyTqrHaOGoSpQq9ioStb Zo9NDQ0ilplfg58JEJ9G+W8gDEftqg10W9VITYfrbK25DD40K2bPSp3PxxMd9p2DOKTi 5zzyWXTpXBDo1MpFRnNRLiAI6AsdvhnaB0qVUMV72LrQ28NhRKR5SUgjSeGkLxxapIxr YxbG+y8RZW2ny7sivB4uNUYLOwlcXnr17Sc56bQYA+7CZ/XpoUaaCl6KUsGo5DqdP1cf Um63Hnh9nc7+vBnal5rnbsWfAr0KlvwWm4PMTM/9dDoQHcRTCRn0h6tl++kZ50gXV8Kw yP1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081536; x=1708686336; 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=F6ajeUmTQmKHExarjmIHQmgeLAwEfZL4L6fDKfFyi0M=; b=LCSpljAMvxZIgpStSfmAF7n0hTY/1uCiLWxuhGt8MAirGYQwO8GlepFg6+7Pimvqep I+Zmye2yUEOpoOglANa6VV1h5pDr+8dJF6xk0fK0fnJzxSECXpRsh+QwMiuw2QL1UugL WfNdyLZDAZd7dwov/RBrSuEdJBriCa1qiUNNlnIrtxqMcILwN/qG8UyppyEcXXEeBrmx pQmBLJQCUVWMb8EfATyMUQbdpZXFqKvDpF+KJAGVc6WyYfwBimeXSmpYUUCk4WWrGuLG 1HQFn1X2F48CrnrN17aE769Fb+Zc75dIFPmzWO/CPaP46lg94skT9uvx+RvVrYqaVxHy XR8w== X-Gm-Message-State: AOJu0YyWgYVbqyUAb9Roke0s9LtEc8PYhyC1xHGxqXw/5egr7okA57KS 2K0FoKaineQv0UpSRRrmWtpMpdyjsGT9xQunNwDOr0490bOZJdGjqJk826UZ/We5uYWHifUZIdR p X-Google-Smtp-Source: AGHT+IH7KB2yafp1Cdch5vIutGT7LSLUakLOWcYOmzNAq8g5xI+ojLUoPdGge2xdRTTfyXPRuNhppQ== X-Received: by 2002:a1c:7918:0:b0:411:a802:700f with SMTP id l24-20020a1c7918000000b00411a802700fmr3604707wme.39.1708081536016; Fri, 16 Feb 2024 03:05:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Edgar E. Iglesias" , Chris Wulff , Marek Vasut , Nicholas Piggin , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson , Harsh Prateek Bora Subject: [PATCH 21/21] hw: Add QOM parentship relation with CPUs Date: Fri, 16 Feb 2024 12:03:12 +0100 Message-ID: <20240216110313.17039-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708081763356100001 QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu --- hw/i386/x86.c | 1 + hw/microblaze/petalogix_ml605_mmu.c | 1 + hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 + hw/mips/cps.c | 1 + hw/nios2/10m50_devboard.c | 1 + hw/ppc/e500.c | 1 + hw/ppc/spapr.c | 1 + 7 files changed, 7 insertions(+) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 684dce90e9..7021419d91 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -102,6 +102,7 @@ void x86_cpu_new(X86MachineState *x86ms, int64_t apic_i= d, Error **errp) if (!object_property_set_uint(cpu, "apic-id", apic_id, errp)) { goto out; } + object_property_add_child(OBJECT(x86ms), "cpu[*]", OBJECT(cpu)); qdev_realize(DEVICE(cpu), NULL, errp); =20 out: diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_= ml605_mmu.c index 0f5fabc32e..dfd881322d 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -83,6 +83,7 @@ petalogix_ml605_init(MachineState *machine) =20 /* init CPUs */ cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); + object_property_add_child(OBJECT(machine), "cpu", OBJECT(cpu)); object_property_set_str(OBJECT(cpu), "version", "8.10.a", &error_abort= ); /* Use FPU but don't use floating point conversion and square * root instructions diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index dad46bd7f9..255d8d4d47 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -70,6 +70,7 @@ petalogix_s3adsp1800_init(MachineState *machine) MemoryRegion *sysmem =3D get_system_memory(); =20 cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); + object_property_add_child(OBJECT(machine), "cpu", OBJECT(cpu)); object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort= ); qdev_realize(DEVICE(cpu), NULL, &error_abort); =20 diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 07b73b0a1f..6b4e918807 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -84,6 +84,7 @@ static void mips_cps_realize(DeviceState *dev, Error **er= rp) /* All cores use the same clock tree */ qdev_connect_clock_in(DEVICE(cpu), "clk-in", s->clock); =20 + object_property_add_child(OBJECT(dev), "cpu[*]", OBJECT(cpu)); if (!qdev_realize_and_unref(DEVICE(cpu), NULL, errp)) { return; } diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 6cb32f777b..f6a691d340 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -95,6 +95,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) cpu->exception_addr =3D 0xc8000120; cpu->fast_tlb_miss_addr =3D 0xc0000100; =20 + object_property_add_child(OBJECT(machine), "cpu", OBJECT(cpu)); qdev_realize_and_unref(DEVICE(cpu), NULL, &error_fatal); =20 if (nms->vic) { diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 3bd12b54ab..77b7d2858c 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -956,6 +956,7 @@ void ppce500_init(MachineState *machine) */ object_property_set_bool(OBJECT(cs), "start-powered-off", i !=3D 0, &error_abort); + object_property_add_child(OBJECT(machine), "cpu[*]", OBJECT(cpu)); qdev_realize_and_unref(DEVICE(cs), NULL, &error_fatal); =20 if (!firstenv) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0d72d286d8..b6e5caa0d2 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2715,6 +2715,7 @@ static void spapr_init_cpus(SpaprMachineState *spapr) &error_fatal); object_property_set_int(core, CPU_CORE_PROP_CORE_ID, core_id, &error_fatal); + object_property_add_child(OBJECT(spapr), "cpu[*]", OBJECT(core= )); qdev_realize(DEVICE(core), NULL, &error_fatal); =20 object_unref(core); --=20 2.41.0