From nobody Fri Apr  4 13:35:12 2025
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=gmail.com
ARC-Seal: i=1; a=rsa-sha256; t=1742331523; cv=none;
	d=zohomail.com; s=zohoarc;
	b=bD82Xa5VpaoynnZDqizc49t0MbdTVNlxrphK7NCz28J/c6V7Adlpq9pJARa+n7LEoHCYsdYgiH6CysaNQqRcMvd3mDzUUbNrDK+nuOP8aB9ceCEtYkLMBfhQJPicCLEl94jopVAWUcl6EXeF3n5/4p9exH8Hi7AvAiNQ1lYmNpY=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1742331523;
 h=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=IM4ZcQUq5MBFapzEpSJQJJhlG2IDJZ/Gi2d4Uwee6ek=;
	b=bwruB3D/8Zg9uqUtjLfdTkQLuw5b2VwrB8VfjUziHeIMbGIHLW+yypgSffvultdSyHKz3vDZWUozS+rvD0Oe3Y9J/S2JYdsmq04iboea6D1HmYlZg2X1xqc58Z98V2UVsjMu0M7Ga6QiHctlnSylyrUXtieFC45M5hbdMJl8Xz4=
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=<shentey@gmail.com> (p=none dis=none)
Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org>
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
 mx.zohomail.com
	with SMTPS id 1742331523424897.4630002295477;
 Tue, 18 Mar 2025 13:58:43 -0700 (PDT)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <qemu-devel-bounces@nongnu.org>)
	id 1tue0S-0007Km-TB; Tue, 18 Mar 2025 16:57:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <shentey@gmail.com>)
 id 1tue03-0007I9-BC; Tue, 18 Mar 2025 16:57:24 -0400
Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <shentey@gmail.com>)
 id 1tue00-0005ld-Ms; Tue, 18 Mar 2025 16:57:23 -0400
Received: by mail-ej1-x62f.google.com with SMTP id
 a640c23a62f3a-ac2dfdf3c38so1118159266b.3;
 Tue, 18 Mar 2025 13:57:19 -0700 (PDT)
Received: from Provence.localdomain
 (dynamic-2a02-3100-19c6-0d00-0219-99ff-feb2-2458.310.pool.telefonica.de.
 [2a02:3100:19c6:d00:219:99ff:feb2:2458])
 by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-ac3146aed4fsm895944266b.26.2025.03.18.13.57.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 18 Mar 2025 13:57:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742331438; x=1742936238; 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=IM4ZcQUq5MBFapzEpSJQJJhlG2IDJZ/Gi2d4Uwee6ek=;
 b=A8vgcL2Objnq3NXfscVPijfBp9yVHstYaPVkNC0+sOwl49NE3RL00mYOKR+6Egl22V
 B8Tao/IecPoa8/F2tJnyiDhHZv55ebxnig519nEBPERXxgmfgwQ2PYwFAzT5H3DHcKN7
 ZKNJ8rdXffgtYWP1HCftJC20LVn/YCUaBj+Z5maV5rofFYG5uBwhG7Gl+jORSLiA5zS3
 re53qecvkRFRypZs9jd9EabX7FjPUmwL4IyUbBCqMUW2990UgdMniqv+grkhWoEt9FHy
 c526dJhqIfu6gXZGAREsIOlOQ8n7pChXbK1yG/sevd8SIw0CXxpJKWKtiaqHttthWm1U
 mp/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742331438; x=1742936238;
 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=IM4ZcQUq5MBFapzEpSJQJJhlG2IDJZ/Gi2d4Uwee6ek=;
 b=AmyGdErGrw/C9Ag7lGIF2nhLf8gBohe2RftR4z8J6h1046iP/uwWHrE23hFQFbH4+Y
 dEZq0rjlCX0JbyczJiaqE0MZqHhyWemRWcGAN1Q+/m21ZdVA1o30GtWKzSU/FKdf8oBV
 iTI+o+sb9uhzlb/WRQrZhJZdTsj2xgYzBeKmV9vbNU3uvgwuBHJipAp3UEHLhEDlM0+L
 87rHEZuSrGFNLSnd+2st8p0yc5/gYvUuInVfGr35SzR7PC31b3/VIpIMtGYs9exbqE/W
 0ThD/z5CkDqdz7/LJELuUL416yAVaRzUKXNJ6oXEHcJBqxjSlAkImOE0+Y8kUHRSEoI7
 7FdQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVlwlODjuQSMqgMhQe/L0shIpmXjuj9YDlPwlPGo4ntuOA+dMtKxs68vNk5XyGQ7he0G1hnX57x9A==@nongnu.org
X-Gm-Message-State: AOJu0Yx3N2QPXHQjj3Rpek+t0aTsSekOQcQGubdbgJfj5gy5ZovxztCj
 6pBy230xr+GjKSaS6JNXnTqm6iPWNMrbd8L/NCU2fGxaf7+FOLIwylGkZQ==
X-Gm-Gg: ASbGncufetebVzZIHibss2QEtZ6KaFSl0JAQJC/uWzroflBXrEAk5Vi7ovi0PIQnmmc
 Gs6yrHPBfYhzRvzQ3BL0ROkAHnC3Gc+iJ9eUi+a18rfOMuodQ4IybJocbF7llsrKH8WCn+N5HbU
 2Lse+4gMJJ+dS9U4Hlx24aJwpr5MJb/SbvFhtRhHCPouvqKL+PzVvQsd3VudvjvdTolsksIXPEX
 GbLHwWqQ3BgY1rG2Vse00Uk03940ppIW6k2yXOUJ4NlrHXWplVkQzrpOdc7r9wMmjGLjO1FJVBJ
 xnFFBuu1fiBAcRILgP0q0EAmrPVuiOivDA/xb9C/TTi9WNVuY90PVGM3dEg4QtHdvUZhs/qRncR
 Iet/sfXy6GFyyZ6QSRa7adi7PvlOuYfnXBUFxz9+iKhFUDZfGItcYrAgz3PcJuHw=
X-Google-Smtp-Source: 
 AGHT+IHdgTFgfZxnQ0vkyo4JzL6PmFRkXZ2pwFEIAr3CwwEGMuftnN+ojRlEUvYrrIfvhABsTjroOg==
X-Received: by 2002:a17:907:3e12:b0:ac2:b086:88d5 with SMTP id
 a640c23a62f3a-ac3b7d9a70bmr8481166b.18.1742331437575;
 Tue, 18 Mar 2025 13:57:17 -0700 (PDT)
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Bernhard Beschow <shentey@gmail.com>,
 qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
 =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>
Subject: [PATCH v3 1/3] hw/arm/imx8mp-evk: Fix reference count of SoC object
Date: Tue, 18 Mar 2025 21:57:07 +0100
Message-ID: <20250318205709.28862-2-shentey@gmail.com>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250318205709.28862-1-shentey@gmail.com>
References: <20250318205709.28862-1-shentey@gmail.com>
MIME-Version: 1.0
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::62f;
 envelope-from=shentey@gmail.com; helo=mail-ej1-x62f.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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <qemu-devel.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>
List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel>
List-Post: <mailto:qemu-devel@nongnu.org>
List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=subscribe>
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org
X-ZohoMail-DKIM: pass (identity @gmail.com)
X-ZM-MESSAGEID: 1742331525777019100
Content-Type: text/plain; charset="utf-8"

TYPE_FSL_IMX8MP is created using object_new(), so must be realized with
qdev_realize_and_unref() to keep the reference counting intact.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/imx8mp-evk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c
index e1a7892fd7..e1a21e52f9 100644
--- a/hw/arm/imx8mp-evk.c
+++ b/hw/arm/imx8mp-evk.c
@@ -37,7 +37,7 @@ static void imx8mp_evk_init(MachineState *machine)
     s =3D FSL_IMX8MP(object_new(TYPE_FSL_IMX8MP));
     object_property_add_child(OBJECT(machine), "soc", OBJECT(s));
     object_property_set_uint(OBJECT(s), "fec1-phy-num", 1, &error_fatal);
-    qdev_realize(DEVICE(s), NULL, &error_fatal);
+    qdev_realize_and_unref(DEVICE(s), NULL, &error_fatal);
=20
     memory_region_add_subregion(get_system_memory(), FSL_IMX8MP_RAM_START,
                                 machine->ram);
--=20
2.49.0
From nobody Fri Apr  4 13:35:12 2025
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=gmail.com
ARC-Seal: i=1; a=rsa-sha256; t=1742331569; cv=none;
	d=zohomail.com; s=zohoarc;
	b=aRBKTGMzUFdjOvHLjg5PrTjQtXxx4wFLakv27BSQeZcMsCwzo7U5F2SdkAvRyAi3JhK30s1MEHOeDK+ovTmBVLKKInthZ8BTb0pQi5Uov0BUIlkbhNLZDexdjckOAfOKPWullFSvaM5p+PgEkMMOJudRWF5a9B9qvd/kSIhnqD0=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1742331569;
 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=ouCa+Eml7mMwIDg1RqIgQDV+HuA/gplHpdTZ+ngI3Vg=;
	b=njwEyRHmUao3e/Uy25J/1zD8uMpjspgawoP/FlbNC1rstihUfpzM5pUeB/q2T8HhNrwFHklCuhutVsqHC/wbmJVIG+elM0WUhuwXxvHDVjk2V1rHbTXZ2O3puQXYGsEfrp+8FO3mJuE9/YkHF51ig8vXDVAZcDD614I8nRD5hJ0=
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=<shentey@gmail.com> (p=none dis=none)
Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org>
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
 mx.zohomail.com
	with SMTPS id 1742331569170654.0419258239515;
 Tue, 18 Mar 2025 13:59:29 -0700 (PDT)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <qemu-devel-bounces@nongnu.org>)
	id 1tue0X-0007Ll-9J; Tue, 18 Mar 2025 16:57:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <shentey@gmail.com>)
 id 1tue06-0007IJ-6P; Tue, 18 Mar 2025 16:57:27 -0400
Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <shentey@gmail.com>)
 id 1tue02-0005mB-Bv; Tue, 18 Mar 2025 16:57:24 -0400
Received: by mail-ej1-x62a.google.com with SMTP id
 a640c23a62f3a-aaeec07b705so955983266b.2;
 Tue, 18 Mar 2025 13:57:20 -0700 (PDT)
Received: from Provence.localdomain
 (dynamic-2a02-3100-19c6-0d00-0219-99ff-feb2-2458.310.pool.telefonica.de.
 [2a02:3100:19c6:d00:219:99ff:feb2:2458])
 by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-ac3146aed4fsm895944266b.26.2025.03.18.13.57.17
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 18 Mar 2025 13:57:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742331439; x=1742936239; 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=ouCa+Eml7mMwIDg1RqIgQDV+HuA/gplHpdTZ+ngI3Vg=;
 b=ghnr/JWzwCPXy93ybnju7kGRVIqVDQT+o4hUv32d93nA3O5uM9V4BTmxrEcPQ73Ytk
 Jq+OZNfH/Drp2KsTsd0umaHIzlmQaJ9o+wS8Rm1jBrE3kylN3vKIIWsHnoqwOS0zgR8Q
 0rCEs8f78KvLbVnIkx9M6TIITH+S3vUe3fSIWZO68hmu69Zw6haKG6HfiyXSVtZvcuah
 Vf0zxMeLWivWT76rV17vfQZpAlfhj89m39EgUJKXXvIWrY0VFSTKH/og4ymZsc20oYtc
 BWo9hsdyHpAJxOFcDRgeIUffNxsEDczBsyx8+rxr9hNpJ4Fsn54FEk/rg1Btc95YiaYH
 unpw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742331439; x=1742936239;
 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=ouCa+Eml7mMwIDg1RqIgQDV+HuA/gplHpdTZ+ngI3Vg=;
 b=XURCcsGhGNSug95ThfbH1HFscrM8VrUluPAxpSlGsmldc5DrWhYrzogd5cwb4opiss
 2AWGoW5Vo/hZjtlUNw/aCNTYr9uMpeGPhaMgvsFcqJvggl0OW8YYO2C2m7/eXujjBDgs
 iWVCC/xvRdHUOg4roWKEaZILzazT/9AdRUpEQMEk05p74DpjkGIBCfV2yziXgZGMDBr8
 vjnbTlLuAxFUYVyZcrids9S+IfTVX+0tWbUWr3yQslXPejEsjESJ5PjYQVsa3wOOOIRK
 eo7BCpEw3Q4aO+Xa41p8kp6x3+2X9CVlyz9YpOG1udR+7tWYiZO8ZT/v2wDo2k63RKtw
 +oGg==
X-Forwarded-Encrypted: i=1;
 AJvYcCWo1PzkGi5aom56PUiRdPWNEFrtYfu+i6nWtaQFQiylUh8EvhI9J18Cqr+SUUSJ/o9hg7+gfxy4Sw==@nongnu.org
X-Gm-Message-State: AOJu0YxM8wMlHEuxAobAjL1Pvk5qLsG5dBG6HiXq+tFca61Oi83unShX
 gmCjdWQx7meegCUa+ibEEM0IOGVpGLwzTpypxSRs7zibiQy+IPNxZs+mTw==
X-Gm-Gg: ASbGncsjGE1CbKkeqRxK+MbYhy6PYxZz6dYRkdBMDlKEBSU41icWA7uwFQaVwHnP018
 hSW/gpQU4VCVX6HM96ogjFvW2GOtHdOucMSDVjgRqf6MdItnzARCEteR+u8nlz770kyWwQ9GzTK
 KInBgWiM2T4AlKUcqZER3RZmK5I6pF9PFrUGcCyPcR5lxTmmGJRI4nLM8pzhXu8ZGYlYO3Y8oKy
 Akv/ikD5ePhmuzSukOvV0SRkjq42KbTK1XDqY51oWR12Pe8LDUSsNEPVKg6eAneP8wjcQviM6SR
 ir8xwGm3KcCijaTMfwl5MYgMIva42P/kZpFI6QEUTrQ20eEIsM5WAmerfdnfCUW6wt9w4pcdRRq
 QPyGUlJ53ykdNl2Ek4aBUNcSrARwg9zVjtMm9gBhuMKjETkbG35qcCJA46AMwlNs=
X-Google-Smtp-Source: 
 AGHT+IHHJCMpHtkudSP1FMVMOmf2M1JktsCFiPiU3Z1PtY1EDjDOQGsdsZgsC7P4cvlyBMhBv1rF/Q==
X-Received: by 2002:a17:907:96a8:b0:ac1:e1da:8744 with SMTP id
 a640c23a62f3a-ac3b7ed0692mr6405266b.38.1742331438895;
 Tue, 18 Mar 2025 13:57:18 -0700 (PDT)
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Bernhard Beschow <shentey@gmail.com>,
 qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
 =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>
Subject: [PATCH v3 2/3] hw/arm/fsl-imx8mp: Derive struct FslImx8mpState from
 TYPE_SYS_BUS_DEVICE
Date: Tue, 18 Mar 2025 21:57:08 +0100
Message-ID: <20250318205709.28862-3-shentey@gmail.com>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250318205709.28862-1-shentey@gmail.com>
References: <20250318205709.28862-1-shentey@gmail.com>
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::62a;
 envelope-from=shentey@gmail.com; helo=mail-ej1-x62a.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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <qemu-devel.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>
List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel>
List-Post: <mailto:qemu-devel@nongnu.org>
List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=subscribe>
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org
X-ZohoMail-DKIM: pass (identity @gmail.com)
X-ZM-MESSAGEID: 1742331571022019000

Deriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon mac=
hine
reset. It also makes the SoC implementation not user-creatable which can tr=
igger
the following crash:

  $ ./qemu-system-aarch64  -M virt -device fsl-imx8mp
  **
  ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread: assertion fail=
ed:
  (n < tcg_max_ctxs)
  Bail out! ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread:
  assertion failed: (n < tcg_max_ctxs)
  Aborted (core dumped)

Fixes: a4eefc69b237 "hw/arm: Add i.MX 8M Plus EVK board"
Reported-by: Thomas Huth <thuth@redhat.com>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 include/hw/arm/fsl-imx8mp.h | 3 ++-
 hw/arm/fsl-imx8mp.c         | 2 +-
 hw/arm/imx8mp-evk.c         | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/hw/arm/fsl-imx8mp.h b/include/hw/arm/fsl-imx8mp.h
index bc97fc416e..22fdc0d67c 100644
--- a/include/hw/arm/fsl-imx8mp.h
+++ b/include/hw/arm/fsl-imx8mp.h
@@ -26,6 +26,7 @@
 #include "hw/timer/imx_gpt.h"
 #include "hw/usb/hcd-dwc3.h"
 #include "hw/watchdog/wdt_imx2.h"
+#include "hw/sysbus.h"
 #include "qom/object.h"
 #include "qemu/units.h"
=20
@@ -49,7 +50,7 @@ enum FslImx8mpConfiguration {
 };
=20
 struct FslImx8mpState {
-    DeviceState    parent_obj;
+    SysBusDevice   parent_obj;
=20
     ARMCPU             cpu[FSL_IMX8MP_NUM_CPUS];
     GICv3State         gic;
diff --git a/hw/arm/fsl-imx8mp.c b/hw/arm/fsl-imx8mp.c
index c3f6da6322..82edf61082 100644
--- a/hw/arm/fsl-imx8mp.c
+++ b/hw/arm/fsl-imx8mp.c
@@ -702,7 +702,7 @@ static void fsl_imx8mp_class_init(ObjectClass *oc, void=
 *data)
 static const TypeInfo fsl_imx8mp_types[] =3D {
     {
         .name =3D TYPE_FSL_IMX8MP,
-        .parent =3D TYPE_DEVICE,
+        .parent =3D TYPE_SYS_BUS_DEVICE,
         .instance_size =3D sizeof(FslImx8mpState),
         .instance_init =3D fsl_imx8mp_init,
         .class_init =3D fsl_imx8mp_class_init,
diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c
index e1a21e52f9..f17d5db466 100644
--- a/hw/arm/imx8mp-evk.c
+++ b/hw/arm/imx8mp-evk.c
@@ -37,7 +37,7 @@ static void imx8mp_evk_init(MachineState *machine)
     s =3D FSL_IMX8MP(object_new(TYPE_FSL_IMX8MP));
     object_property_add_child(OBJECT(machine), "soc", OBJECT(s));
     object_property_set_uint(OBJECT(s), "fec1-phy-num", 1, &error_fatal);
-    qdev_realize_and_unref(DEVICE(s), NULL, &error_fatal);
+    sysbus_realize_and_unref(SYS_BUS_DEVICE(s), &error_fatal);
=20
     memory_region_add_subregion(get_system_memory(), FSL_IMX8MP_RAM_START,
                                 machine->ram);
--=20
2.49.0


From nobody Fri Apr  4 13:35:12 2025
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=gmail.com
ARC-Seal: i=1; a=rsa-sha256; t=1742331573; cv=none;
	d=zohomail.com; s=zohoarc;
	b=lK/3IxfjP6V/EktygQ9dkbC5zm0XGnzQRPY+XQpnwlSd6bt1gHpELGESITMKKA07MVx+1IG9jrLffxKJkfIjzFChEul97Dy/eqzV+JHt/TGrl5CDfA6Ylb4jgg3hFf7e7ehZPmblQhS43i+nKlxudwCgrcSk/v7s4mIit9OLL+Q=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1742331573;
 h=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=IOrNiTqjVFTUhCSRr6mCNcgoHeGlKxIWCFhVKGQ+JvA=;
	b=FNoVSCu2W3sox+11QMB+Qf1edJtn4HMdqhD2MsgVu3DtcmvVMdrdVwSKovoeygHo+qonTw6cp8peLTo452/xASPxmDDDYA2EOpBfH+MrO2hdtcqau24ty0g+kIhgevfr22NGEy9+OiO9OmGa2xZD1D69XxbhNFLPJiea/2nG41s=
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=<shentey@gmail.com> (p=none dis=none)
Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org>
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by
 mx.zohomail.com
	with SMTPS id 1742331573865878.3875388115976;
 Tue, 18 Mar 2025 13:59:33 -0700 (PDT)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <qemu-devel-bounces@nongnu.org>)
	id 1tue0W-0007LA-Fr; Tue, 18 Mar 2025 16:57:52 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <shentey@gmail.com>)
 id 1tue04-0007ID-2z; Tue, 18 Mar 2025 16:57:27 -0400
Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <shentey@gmail.com>)
 id 1tue02-0005mN-DF; Tue, 18 Mar 2025 16:57:23 -0400
Received: by mail-ej1-x62c.google.com with SMTP id
 a640c23a62f3a-ac345bd8e13so584534466b.0;
 Tue, 18 Mar 2025 13:57:21 -0700 (PDT)
Received: from Provence.localdomain
 (dynamic-2a02-3100-19c6-0d00-0219-99ff-feb2-2458.310.pool.telefonica.de.
 [2a02:3100:19c6:d00:219:99ff:feb2:2458])
 by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-ac3146aed4fsm895944266b.26.2025.03.18.13.57.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 18 Mar 2025 13:57:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742331440; x=1742936240; 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=IOrNiTqjVFTUhCSRr6mCNcgoHeGlKxIWCFhVKGQ+JvA=;
 b=cHSu2QtDIqG3l+vFC+aH/YSxTbPJtjI8V+hWX8Zb5hfrdPltylEFZpxe1LPm8B5+ol
 UzNCH8qHHxWsJ+vnFTuxOYxaipWpK84jDRrR+VJimfl997IK/r78RaizgY6t84NF26wQ
 Il7ncpt7k7+tAil7//+VWZwrGN0bH+Bhq+t0DkIrQCkWAstcE4M6qlX5aCmp/n+YXatB
 N13IkG399JkKyNRZxNZRR2e8i2ReL0ipHcEuq/R7zmg0MJjYy01gcKJtJMakZXvjbspc
 LN1Qk7sqFQXOo4gmOk5/cg5jLA3+wqps1NWTq2nzE5Ox2Y+bR36cQ1vIL7aeyxUTba0t
 3A6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742331440; x=1742936240;
 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=IOrNiTqjVFTUhCSRr6mCNcgoHeGlKxIWCFhVKGQ+JvA=;
 b=UqcqiUl0aBRoGwwrVq74+TmIhoTxlD4ScdCSrQQL3piCTEaC0gJ/jKuxCZN52p1hfH
 hGNOsWqaCqu4zxxc0/iCNw3miugBJYZ/bmIFYdFhFuDrE0+wN3Sb+12CdqZgw301fvkt
 Vk+3Nx2qkHxC/tC2thGtu58SkgF+ipQT+9ThSZcLqJ+dWTg7b3y1Z+pjHu4ZYTVKoPOW
 YzJGIRy6sUzxivCBrEZ6GHC8SypZC6vZAEkcNsfDnJcP1304blgL0DkS/727utqCNmW9
 sHkHf3PGAVzqQ7yzkhOrEy8MIDl5Zg6TMfOmKESWEbGTSbJjOFzG/u8fsnKkl4tlweWT
 gd5Q==
X-Forwarded-Encrypted: i=1;
 AJvYcCWI9Q75W0pcbiXuLGU4vClbQcYyPjGZhXSCqLaHHQrovyJcKJeBU9OUJxWoZmsYE+hRJBlAo/82Ug==@nongnu.org
X-Gm-Message-State: AOJu0YwX9YDVrGc85XUPMR4wvvD0DzvJ5GmkEFEuJIVzms6Nm7P5uC5t
 EMnh6HEGxam5btVW0MFLbIzcO5cEf4gMlcOPHXRtmjnI3D2LVgIP33BkKg==
X-Gm-Gg: ASbGncvJGdMQkXrGfZj6D0IieOU9bukwelecDMSIjEtB04F3lALvOQ7v+LPMfFk6s2X
 VVwEdLQV746zvUAB5I3p6vlxZ77wGls2k3S2iARXUVm7GGvTiPcA5xZU6GPNShal0CnUhRgeXe6
 Bvtyqv2183OjA9dQLkqqnHKmDOg9q3KUl/BmslzfV+rM72iSR0rTlwPmVwpaJjTrorZgmiA/xi4
 mGTC/D4dvmaYuEWJoQx1VkDU/BpfUFpXYJklJO9L1+9BScF4EW1klnPucTTVZKyMqfCbLqI0+eW
 sw5/Df7kgneUAnm6bXxzEuUtWM8XSJe7lmYUz54u+Gr8v8tF0ptfchgQ17RST2d1hiXS9mY9POM
 kAklUkD3czv9zavAlZ6EYG7fThooBtLqPpIUNkiR2Z10FHAhrhQWTFxnxBTUsJhg=
X-Google-Smtp-Source: 
 AGHT+IH49vvidLTAnEJQav8tz1+H3ZztnkmkQqcDG3uq5ymAV5UcXB7sxG+i0PDCqO8aDPAwn4lEmQ==
X-Received: by 2002:a17:907:6d07:b0:abf:7406:a5c3 with SMTP id
 a640c23a62f3a-ac3b7f275camr8228266b.51.1742331439783;
 Tue, 18 Mar 2025 13:57:19 -0700 (PDT)
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Bernhard Beschow <shentey@gmail.com>,
 qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
 =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>
Subject: [PATCH v3 3/3] hw/arm/fsl-imx8mp: Remove unused define
Date: Tue, 18 Mar 2025 21:57:09 +0100
Message-ID: <20250318205709.28862-4-shentey@gmail.com>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250318205709.28862-1-shentey@gmail.com>
References: <20250318205709.28862-1-shentey@gmail.com>
MIME-Version: 1.0
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::62c;
 envelope-from=shentey@gmail.com; helo=mail-ej1-x62c.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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <qemu-devel.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>
List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel>
List-Post: <mailto:qemu-devel@nongnu.org>
List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>,
 <mailto:qemu-devel-request@nongnu.org?subject=subscribe>
Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org
Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org
X-ZohoMail-DKIM: pass (identity @gmail.com)
X-ZM-MESSAGEID: 1742331574985019000
Content-Type: text/plain; charset="utf-8"

The SoC has three SPI controllers, not four. Remove the extra define of an =
SPI
IRQ.

Fixes: 06908a84f036 "hw/arm/fsl-imx8mp: Add SPI controllers"
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 include/hw/arm/fsl-imx8mp.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/hw/arm/fsl-imx8mp.h b/include/hw/arm/fsl-imx8mp.h
index 22fdc0d67c..d016f7d337 100644
--- a/include/hw/arm/fsl-imx8mp.h
+++ b/include/hw/arm/fsl-imx8mp.h
@@ -238,7 +238,6 @@ enum FslImx8mpIrqs {
     FSL_IMX8MP_ECSPI1_IRQ   =3D 31,
     FSL_IMX8MP_ECSPI2_IRQ   =3D 32,
     FSL_IMX8MP_ECSPI3_IRQ   =3D 33,
-    FSL_IMX8MP_ECSPI4_IRQ   =3D 34,
=20
     FSL_IMX8MP_I2C1_IRQ     =3D 35,
     FSL_IMX8MP_I2C2_IRQ     =3D 36,
--=20
2.49.0