From nobody Thu Dec 26 17:51:26 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=1707416042; cv=none; d=zohomail.com; s=zohoarc; b=ZhW3UNhXPTrMEJnWDwrH8shdhTW2+rvxmWlGlii+xlGCweruorZWBRF7zNRTT1NlH1SmVM1pUAHEJDfQw6Vcew3RC8PH9XiNKeNYL17cMFDsuNTHg78C5iTA7MyyM0fR7rk1MGowvL6ugTRwpwWGaOOQ4K8t1LfvVKvtTuHwkHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416042; 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=w2MStSDCsStbLku+FFcB1QAt3hfE/6paGjBeMPhTa10=; b=UipvKfS18y8h89RHSabekkZ4bF3KOQP8Gou6Fr7/rh7dURagBOqnJFeJwonGWToqHjLa2zZY4Rsu7coygrMV4i8duh1JPKBWmyxe9g7cRXheuqUPz6InH9Ry9WyARKdn3zvMkyW2J+f1mKzinrbXkkB2hsO4yDYkBMDOGZlCVnE= 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 1707416042605306.35476314400216; Thu, 8 Feb 2024 10:14:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tT-0004BT-Bw; Thu, 08 Feb 2024 13:13:03 -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 1rY8tQ-00048N-4S for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:00 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tN-0006kC-SB for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:12:59 -0500 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a389ea940f1so6536866b.3 for ; Thu, 08 Feb 2024 10:12:56 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id y11-20020a17090629cb00b00a3af8158bd7sm297255eje.67.2024.02.08.10.12.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415975; x=1708020775; 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=w2MStSDCsStbLku+FFcB1QAt3hfE/6paGjBeMPhTa10=; b=gSyxdpNCl6XxdHLBYe6vCnGNmaBeQvS82kA8/OZskTbdeDm66Ogr7a4L8pjfjHq2oA nZlQoVkxQdlzsXiI+II0oMkVX5AZnQ2+0+NK+jYFyvH6r21XTQq6EABJwmy+W+kTYSvx oarYVpsX2lkN4e54oo1VEsUAD4kXO7wpVI8ege56EZdP3o7u+1qR/HX64VDkHfH1XUSb Fa/WMHW7xSIXyC8fJN4tJaFChJ+z9VHoLZItQbe8afOMcNnv70I8k6sJd1AKl7bs48id IsXH7yZ9geTW3yTToavejmm4oz42AQGKSBM+AFZz8SRKd9+MvtBENQXzpHuTMcXber5O otyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415975; x=1708020775; 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=w2MStSDCsStbLku+FFcB1QAt3hfE/6paGjBeMPhTa10=; b=IXZx7+4728IQB3iE8iS2woUy0eG5OTuLj/13q19P8cqLSLviAdXK9eHjs+lmVQ7LFz dHfqdgEICT+8kyC1nXOZLAY9Q0Y98K03aDqOVxWl1Xe5xN7kqtnOTm7XhQ5exAoT7nDM 18Qk+vIa4PwxfUPODZHzE4MEJOASMRnTa7jJ/8ArsHnF/NGGHO7iSgdJ7iD8hnRdc5xc jjrF1pCf81lOHfO/l/tHxoA93HZA8SA0hDAbnrlee9YhMWTNUJTWiXaJ1MtoDLV4Rrzp J4ZqpBZdS2bxP5iGNPF52VJ31OiP+467Gt/y5UZZByN89Jby304qDxNl3mQvSuUMKpDS Phuw== X-Gm-Message-State: AOJu0Ywz3//og4+llBF9s2xM9vaU4Xl6FdElhx1TJkf7AhAbIFMi8k7p 2r1XlILIclzacxVth/LBWTprPvzof3EKrYG4DVE68v0XuYeNups6Cdpb4nbEgrGbtUG15a7YVNE 4Tsc= X-Google-Smtp-Source: AGHT+IF4ZecCBlEKXGS2hW50rfn6SQDa007xmFWZa6LsRoOF2z1iEDxh8JK+DY6EF1ErEaNcOkktRA== X-Received: by 2002:a17:906:b2d3:b0:a36:2df:5ded with SMTP id cf19-20020a170906b2d300b00a3602df5dedmr77560ejb.72.1707415974678; Thu, 08 Feb 2024 10:12:54 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWvDhQpyJ+AI4o6GqNvSoUYNSlJubsBOjQg+Xc46YBKGB6fb5A4QPhJA8Qpq4ro7FWE+jJBo/TTBzS9jO0TY2uJVyx1y5bsi2oFIDF2dthoOQz7rFEY431l2Xx0kxYYWG/fMsd5kF+H0LpsPsd3FCMNkxgWpZUJqc0XChqwItk3ZKEJ4SJYuYMymuSs6V23wgts+eXBsxrhZXqysDE1NT1zUc9Foat5uXaQ1Ib0Xc2YGo+eeCEWiEeoIpYs8ETmK5fyvtV85ae6LE7IwbSBTH6vRE4NlFuP0IoJt7lgKZhBgs56J2HgI6XaHLiC6hh7bHiH4JjqyQ== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 01/11] hw/ide/ich9: Use AHCIPCIState typedef Date: Thu, 8 Feb 2024 19:12:34 +0100 Message-ID: <20240208181245.96617-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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: 1707416043750100005 QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- hw/ide/ich.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 49f8eb8a7d..048ea7e509 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -99,14 +99,14 @@ static void pci_ich9_reset(DeviceState *dev) =20 static void pci_ich9_ahci_init(Object *obj) { - struct AHCIPCIState *d =3D ICH9_AHCI(obj); + AHCIPCIState *d =3D ICH9_AHCI(obj); =20 ahci_init(&d->ahci, DEVICE(obj)); } =20 static void pci_ich9_ahci_realize(PCIDevice *dev, Error **errp) { - struct AHCIPCIState *d; + AHCIPCIState *d; int sata_cap_offset; uint8_t *sata_cap; d =3D ICH9_AHCI(dev); @@ -154,7 +154,7 @@ static void pci_ich9_ahci_realize(PCIDevice *dev, Error= **errp) =20 static void pci_ich9_uninit(PCIDevice *dev) { - struct AHCIPCIState *d; + AHCIPCIState *d; d =3D ICH9_AHCI(dev); =20 msi_uninit(dev); --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416018; cv=none; d=zohomail.com; s=zohoarc; b=K84L1MF7paQwNTqvggYatpraIC0GYUBbxGe+bKY+xEkRV2hQdBco8ViFmYojceoxzm1BFU4mJUZjsWpAZPot3e2G4xHJJuEbtLeIExFQ0YlrSHvwRtdHuAmlRvzkbA2N0pFIRmmmCHjghv8IpVuH+KC7iJBlwixWqe8cpUBTHL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416018; 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=qwWWw6/AhfeHezI8OBy+gdgG3eOQyHTGWWLFzL2P+Mo=; b=Fw0QGPCKCPCXADpZB6h1j87MkIoJoXXxI7geMXK3NsM58jAlSfDhtXjB1COKph2znkFR1h0B59jmB8ClBsz5F1XfeFWgPThWRRyev1FXn7FevRG+ihXnDTfFBimgKiPQfZskLGCyBCz4FLt/0m+sS85SBUYKKODPKoXcjuboF+Y= 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 1707416018506916.2071756586198; Thu, 8 Feb 2024 10:13:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tl-0004k4-4o; Thu, 08 Feb 2024 13:13:21 -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 1rY8tb-0004IS-A5 for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:14 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tS-0006kx-FZ for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:09 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-55a90a0a1a1so298488a12.0 for ; Thu, 08 Feb 2024 10:13:02 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id g12-20020a056402320c00b0056038077ffasm1078573eda.38.2024.02.08.10.12.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415981; x=1708020781; 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=qwWWw6/AhfeHezI8OBy+gdgG3eOQyHTGWWLFzL2P+Mo=; b=iMKrJTI5G89jKVELuig+jjr6KJxQTLPRDGbFEpqYrcJokMuCrcrYKnB4vV4+futlSd AfztfM4YrKz/jPU1mBoznwI90vR9f4l9ixkwyMuDuoHJIgbLgsLOSpdX/kwocQjb5XW6 Rbleb1BqVH9ndk1HgdNlkaAGr3+IVdzSigZfaKvYEoNH0RAMRDXN7O0gmJxbAufx8Dat 4zldWNgrrDH4YJNY1QuaJ0ODqHPfSwtcqsPWVBB+UZ9inBh0jIec9cvQ7qbqDUuUHFvp vHprdjTXdlcrCj3cKQcYeqhJSdpNdEPMODYFCng1ou/o/kedIGn9EnuQNhLW/slF6IC5 9+6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415981; x=1708020781; 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=qwWWw6/AhfeHezI8OBy+gdgG3eOQyHTGWWLFzL2P+Mo=; b=vTPLiD9emvkV5CVg2xpzEtujFtUEW7ffNVHUwgd0i0cz7uAlDXakEygzwDsLJliN1F pr2Qi5cacuVdT5YCD9ihOkSDjsZSmlguauLjg1647txXyVjWjYJhJmByjDrE8/76LRri aIDQwvFxOcAMjCKxMCm/xw/eV3fb0QMocrwkPbxwiLdY3IoiEnNQcKQWMpalh1tI32tD Q9WEG6+ramaf1LzZFhyivfUQ7z6e5HjpDX9aXwS4UW54dW6APnUdd/Ko/0pJ/ZXzkRqd rpCrhrtjAaZokNZl9+1AOXuAgGGjRcXLhl97miAqRIjWbzupN2IaC1TehhxfME8YniID OJ8A== X-Gm-Message-State: AOJu0YxxA1NGyiCJQNHvG9Ffs5gOt8zzRlE4HHkN4foh8dKeUc1GqNuy Ogug4bzWVXKHdbVvjSJ072oBWxqD5VIR0uMloPJZ9ZIql3UKWuuiFc3F5jcWia9EQx6mErlqEbB HjuA= X-Google-Smtp-Source: AGHT+IF5BMfalEYcgl7odqRt1Gb2Pbj2dtl8y+1R9W7ZiWQ8kHZE0N5X8QNCNNRvPFGcacejFRkYbA== X-Received: by 2002:a05:6402:1a48:b0:55f:e493:33b4 with SMTP id bf8-20020a0564021a4800b0055fe49333b4mr28068edb.15.1707415980948; Thu, 08 Feb 2024 10:13:00 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUxITh5WgxpxEnE0pCbPY+mJp69t0QXA6TXFqR3rOI55w+MctTFXycjLSOQV0oK20G6Q8pwA6IyIzSF0PWJhHplV7PODdE7gA//sj4lq3tN7D0I64VCJZZFbCWac5qdp1foL42qazV6gwWXDoczLime+0ZH57fSVsTlYJssXJXSfZn7fleQ7MnqTc0PUYpIjtTh/kMPOUP9O4Fl1HmRccBGyGcPmHUIiwGh1ytQuNtJRghivWX5u6f2UFuvkXFuVp7xj+ZcWE06qln9AkN6fV5+Hrsqczc8xcrqcDGyNr2lb/wjdeCp6eUQTghyLrHxBbe68Q7+xH7uXqyd3it8CvUpHrdk2itJvytCTUYjJXLEPEk= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato Subject: [PATCH v3 02/11] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h' Date: Thu, 8 Feb 2024 19:12:35 +0100 Message-ID: <20240208181245.96617-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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=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: 1707416019721100004 "qemu/units.h" is not used in the "hw/rx/rx62n.h" header, include it in the source where it is. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato --- include/hw/rx/rx62n.h | 1 - hw/rx/rx-gdbsim.c | 1 + hw/rx/rx62n.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h index 73ceeb58e5..bcda583ab3 100644 --- a/include/hw/rx/rx62n.h +++ b/include/hw/rx/rx62n.h @@ -29,7 +29,6 @@ #include "hw/timer/renesas_tmr.h" #include "hw/timer/renesas_cmt.h" #include "hw/char/renesas_sci.h" -#include "qemu/units.h" #include "qom/object.h" =20 #define TYPE_RX62N_MCU "rx62n-mcu" diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c index 47c17026c7..bb4746c556 100644 --- a/hw/rx/rx-gdbsim.c +++ b/hw/rx/rx-gdbsim.c @@ -20,6 +20,7 @@ #include "qemu/cutils.h" #include "qemu/error-report.h" #include "qemu/guest-random.h" +#include "qemu/units.h" #include "qapi/error.h" #include "hw/loader.h" #include "hw/rx/rx62n.h" diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 4dc44afd9d..d3f61a6837 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -23,6 +23,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/error-report.h" +#include "qemu/units.h" #include "hw/rx/rx62n.h" #include "hw/loader.h" #include "hw/sysbus.h" --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416040; cv=none; d=zohomail.com; s=zohoarc; b=PSnCJWE2vWFtuGza4qh8hAxOvzfbAk41musFPmWUgtnEQXf6fzJu/Jf1QBYDmEWGKtiDvjaP9LbMDxOBpTO6pGeEbmKUQx9xZwQjvQXutgH1KMjfhnjsL6VAb2ac+3A9PeFzqHdeJfLY8juf0zyelpPaVTFodMoemUSpTI0h/zY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416040; 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=L0ogzzUtX0pA4ogtPPYPzAFnKo2sHz3gs+YB0BMu1oo=; b=asN5y+ZXlyLLxno6BDQXjlG6ACxKRHoM0VWnsfhIuD99rAZaU55UECN+BXsMZBO48+6V0ZOpvTbTFzWyUk02o9/e5S9omLGt89VEaCUfvqSIhmgmDz0oPDWOIgns3iUCG3oPtgwS5hNOYOlrl/+5nBljmKXNEAB3sc1JMqtWEJU= 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 1707416040728207.6714244993218; Thu, 8 Feb 2024 10:14:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tj-0004dB-TL; Thu, 08 Feb 2024 13:13:19 -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 1rY8tb-0004IW-Gs for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:14 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tY-0006lP-Qr for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:11 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a30f7c9574eso9509166b.0 for ; Thu, 08 Feb 2024 10:13:08 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id s18-20020a17090699d200b00a3ba3d8af9bsm296233ejn.136.2024.02.08.10.13.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415987; x=1708020787; 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=L0ogzzUtX0pA4ogtPPYPzAFnKo2sHz3gs+YB0BMu1oo=; b=MNaP1E22rrBn2bXQkGF3n0cl51UKSFaGT9lmlFuI0mjYDoY7/Eb2l2QTCWkY6YFe8a Ts/MAVviCTFhBwvhWE4YuAABTpYHpOBuW//GikOQBp+52itomLOnMQrKy/6JJth4VIxc +YFLk+ntc7fakgIEh2/Mzd73ObaMN4yjXx5SDgsRZfFkD/VBVdOw7gm4+kOL5EHgUWtD W6oA9SkHvMb1iadMTrrZz4ImXab/uthPNAJJX5lUflp/+KQn+by35Meu4BOzhL2jybU1 sZd4TPC5RrtJPKlJTVvYwAus3Avc2MWRmWHKW6Owf3U96lrUYvt2DAN03WYSmOewRH8k k0JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415987; x=1708020787; 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=L0ogzzUtX0pA4ogtPPYPzAFnKo2sHz3gs+YB0BMu1oo=; b=RkVJL6CgP9vbYOnfvM0PnDDaYtRr33g7HvkvteZoYNr9l4Sf2tPqngp8aPd7jhZBek JNVzmbfilul7nEHpeEFaEvtmaiDL3Ypa6cz7IDCzyS/xV/sH6FKPmoLjHgXKtNP13qDO JtzoLiXd/DkoH88FL3NbPR40oTjt9E8SJKCGiHhT//mpsbD9MDOEPaN8sDE7Z5en84fJ CkAKWsMYPS8DYC1FeqI0lfeZ+3KcHqCZwWq/7xAaPdPpR0+Ej37h9xnEwsNI4+HMJbrL ZA8iArbiqPWy/POyUCfZ8lmbcYT8gE6CKhyyMyPCVbB45luBEf448co/oKVfUsLhaOXm 3+wA== X-Gm-Message-State: AOJu0YxcOVj2gpOR+k1TrxI4z4tMK+9DJE/04+uiKC8jLtVmJX15qfoU piZVyCzS+/ITjImvlx8p5cNRPw/fScLwUvBXPTJfAi9j/Mdhy2U18E9hrd7A/iFi2Rdp88VyGPx jFEo= X-Google-Smtp-Source: AGHT+IHyu/cESW6qice2GNeILv1kJM/2jk2Swiu+ja3faVKE6PfaZkcLe5hD06+8ZqvV3Y//7KfclQ== X-Received: by 2002:a17:906:5794:b0:a38:8d35:c8b4 with SMTP id k20-20020a170906579400b00a388d35c8b4mr75914ejq.46.1707415987030; Thu, 08 Feb 2024 10:13:07 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWjPzvlEHE4oYPpySgAkE7/zjy3goOzi3NwSHkTTSWlgD0P6yoQ7k0sJB/Q+d4MdKul1AdEsOjJ0yOyR5lATAxU26+mLETi+tasJrtjM4E0kNlJUWJallVGABAm/WxVLT0rdhX8OxFjS976Yrati9OfnDRZ8n3oA8FM4o17D40f5o8yahIwdA7uc9KjVQCyKqv5CBpzdpIZAXfveZ9LXPnJoyjMR1iKzNKzYh9orktB+3cJEMhQAnmhP28LE4N/2xVV48MCHrB6hhWyNgPQLP4cqAFjwJWXkj+AJ8D6NNxO8xQbLB7rkutceBzmeQwAKRTRywrejh6Tt7O4XguPzLl99oH/sCNH1dCB/jweM3JeDjA= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato Subject: [PATCH v3 03/11] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary Date: Thu, 8 Feb 2024 19:12:36 +0100 Message-ID: <20240208181245.96617-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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: 1707416041892100003 Instead of filling an array of all the possible IRQs, only call qdev_get_gpio_in() when an IRQ is used. Remove the array from RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato --- include/hw/rx/rx62n.h | 1 - hw/rx/rx62n.c | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h index bcda583ab3..766fe0e435 100644 --- a/include/hw/rx/rx62n.h +++ b/include/hw/rx/rx62n.h @@ -67,7 +67,6 @@ struct RX62NState { MemoryRegion iomem2; MemoryRegion iomem3; MemoryRegion c_flash; - qemu_irq irq[NR_IRQS]; =20 /* Input Clock (XTAL) frequency */ uint32_t xtal_freq_hz; diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index d3f61a6837..560f53a58a 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -148,14 +148,11 @@ static void register_icu(RX62NState *s) qlist_append_int(trigger_level, levelirq[i]); } qdev_prop_set_array(DEVICE(icu), "trigger-level", trigger_level); - - for (i =3D 0; i < NR_IRQS; i++) { - s->irq[i] =3D qdev_get_gpio_in(DEVICE(icu), i); - } sysbus_realize(icu, &error_abort); + sysbus_connect_irq(icu, 0, qdev_get_gpio_in(DEVICE(&s->cpu), RX_CPU_IR= Q)); sysbus_connect_irq(icu, 1, qdev_get_gpio_in(DEVICE(&s->cpu), RX_CPU_FI= R)); - sysbus_connect_irq(icu, 2, s->irq[SWI]); + sysbus_connect_irq(icu, 2, qdev_get_gpio_in(DEVICE(&s->icu), SWI)); sysbus_mmio_map(icu, 0, RX62N_ICU_BASE); } =20 @@ -172,7 +169,8 @@ static void register_tmr(RX62NState *s, int unit) =20 irqbase =3D RX62N_TMR_IRQ + TMR_NR_IRQ * unit; for (i =3D 0; i < TMR_NR_IRQ; i++) { - sysbus_connect_irq(tmr, i, s->irq[irqbase + i]); + sysbus_connect_irq(tmr, i, + qdev_get_gpio_in(DEVICE(&s->icu), irqbase + i)); } sysbus_mmio_map(tmr, 0, RX62N_TMR_BASE + unit * 0x10); } @@ -190,7 +188,8 @@ static void register_cmt(RX62NState *s, int unit) =20 irqbase =3D RX62N_CMT_IRQ + CMT_NR_IRQ * unit; for (i =3D 0; i < CMT_NR_IRQ; i++) { - sysbus_connect_irq(cmt, i, s->irq[irqbase + i]); + sysbus_connect_irq(cmt, i, + qdev_get_gpio_in(DEVICE(&s->icu), irqbase + i)); } sysbus_mmio_map(cmt, 0, RX62N_CMT_BASE + unit * 0x10); } @@ -209,7 +208,8 @@ static void register_sci(RX62NState *s, int unit) =20 irqbase =3D RX62N_SCI_IRQ + SCI_NR_IRQ * unit; for (i =3D 0; i < SCI_NR_IRQ; i++) { - sysbus_connect_irq(sci, i, s->irq[irqbase + i]); + sysbus_connect_irq(sci, i, + qdev_get_gpio_in(DEVICE(&s->icu), irqbase + i)); } sysbus_mmio_map(sci, 0, RX62N_SCI_BASE + unit * 0x08); } --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416057; cv=none; d=zohomail.com; s=zohoarc; b=PYtmNFovZBCZ3cflGXYQkcjg7D781KobeRFdscnIjRc9lopHEgIksJkC1w1SSJ4ZO5PTK3cPn9UVaKJfsrwqgEcOA2MffLzV5HHZaSHPAwBwpyyFK20KduY5zryoxTZBBSd18T+tjPp5GKjc02Fi9tU1tfSBYWPX3HNvU7+X+dM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416057; 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=/LcvVs02z5wCqQ7/8i6+yu1iXa6S9Xb47UoWtCZNINM=; b=dTFh12DKvkZBlzXVs3NQbuzRhobjCyd0rKu6SAZd35ctEEQI7IlDh9Ayle7nA1a1RWXR/XPJDLthFtCYjluHxuz8BPpm4ptf9yIVDuOqvZoKEtAvDz+zOQVKkMY85X7d+gRknivADYXrcN3ajZlhnXhlwGs1RVt2s95MCWXlPi4= 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 1707416057641899.4269490210097; Thu, 8 Feb 2024 10:14:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tk-0004gS-CH; Thu, 08 Feb 2024 13:13: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 1rY8tg-0004P7-KJ for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:16 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8te-0006mP-FV for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:16 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a3bbad234feso12490666b.0 for ; Thu, 08 Feb 2024 10:13:14 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id cu12-20020a170906ba8c00b00a397c2ab4a5sm297011ejd.120.2024.02.08.10.13.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415993; x=1708020793; 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=/LcvVs02z5wCqQ7/8i6+yu1iXa6S9Xb47UoWtCZNINM=; b=kLChST3MpqAINYSWIKQ7SvZsfDAj4eCpLU11rm+axmFfvUj7LaHPCR4t/qmeAjWGrq mBOB9jsrAcSGK6OsZXaiqPewx0VjnuxewG/OI9vyn2MCwA3s8PeiKNdouphtuxd28kON 1sD5+5YepU0/e2ovZbQcB5zRayxRxEBcGTgXsPCRls/3TOwYZSRDBV2/mNRIXSx8rhjz qh9HHkv/acwSNwjQm2nx4HOIWAGwb9MAFu5f7yIpIcba6EpTvPwLqXvzGI06KWFqLTc8 x+g+Y7oIt9A+Im4769VpNx5dJ8hkJD5pixXB+bsTcNkENJiCmWkTSLCWZ+e6pt3bSj4X 7XAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415993; x=1708020793; 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=/LcvVs02z5wCqQ7/8i6+yu1iXa6S9Xb47UoWtCZNINM=; b=mlUTLnp4YWSBBeEkTpcGOs78dLfCh2JRrmqKRpVJ1nEu4tgllHmnldT4fSXmFhZW2G j+QQRK8KPbu20s/tXnV56mvSOssZBS/E2jBltCuwS4e8bKjjWXNSI+BUyC2+bqE3z+Xe MzVsBCL5BJ3PGj9KPo0YIezIG6spRYGaMgdJoumAUyylX5/654RZC3418KQ8mqJAroyx 3S1s8cpDw5guvsZBv3EOBZlZG4rHmkXMWzRxiEtQL3tyZjnSXcp5EdK88v6x7rB0Ntrd zMa+FMqKyG6um2NhEt8IzK5ip87iFJfN1PyDppNmLhaEIyJP0y/SPqy/2gtxAV9Sr0iS oVWg== X-Gm-Message-State: AOJu0YzwXkLOpU7ZBLOTvHsw0Ce5eVlgQQzLOC+RIAWMttlN+BOrBq+c kNZSxSTAnmbz61m39XG0iWL6z7SwGWiidEp3E71dU0Hgu6RITiAXocEXzZtoAK7TRRZ6PTFVnZl /Sco= X-Google-Smtp-Source: AGHT+IF9oGbnvDl4+VyGCQIuejjirp+ANIadCNr6qvOWURsIzMZTFVNFqsnhNDl65/uRZRDtVNRy2Q== X-Received: by 2002:a17:906:35db:b0:a37:5bf7:f64a with SMTP id p27-20020a17090635db00b00a375bf7f64amr86361ejb.41.1707415993010; Thu, 08 Feb 2024 10:13:13 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUZfWjveanJQ5aK1sWpJZqar0gAVGSp61K9g/bixFm0BOrX7dgH5vTaB5OvNGW+/SnuYXSKAt6OUtxnBup2L2Rjq3Z0Akmmd526UHBN1ZC4i46OOstrEDooU4Cm+WmoI5FHAk8cMrg/qWOcctApmm28cbxVfMUPxqYFIiUvaa5v7Lzw1ZyeeoE0Zpbi5OV8bqeoJFuKmqlkC3f22Q9I3McCVYr04T0PwmSfcP9YQOyCGRV9VskMzRoT6is3d9fi5ktgcv7p4J1gpUEv2IuJzk3+/djLw1+/SglqTQ06alvFjIAG7zQ8aIReGY9o31bIvyrKYUHCcVtu4/Sr7o/XV6zFN5GhlPaHtStglkU/0ei44duEijInvEoeHqkJbwDHeSaC From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v3 04/11] hw/i386/pc_q35: Realize LPC PCI function before accessing it Date: Thu, 8 Feb 2024 19:12:37 +0100 Message-ID: <20240208181245.96617-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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: 1707416059776100011 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7ca3f465e0..f67e5a55df 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -250,11 +250,11 @@ static void pc_q35_init(MachineState *machine) TYPE_ICH9_LPC_DEVICE); qdev_prop_set_bit(DEVICE(lpc), "smm-enabled", x86_machine_is_smm_enabled(x86ms)); + pci_realize_and_unref(lpc, host_bus, &error_fatal); lpc_dev =3D DEVICE(lpc); for (i =3D 0; i < IOAPIC_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[= i]); } - pci_realize_and_unref(lpc, host_bus, &error_fatal); =20 rtc_state =3D ISA_DEVICE(object_resolve_path_component(OBJECT(lpc), "r= tc")); =20 --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416052; cv=none; d=zohomail.com; s=zohoarc; b=Mn+hSwB9esUa3E60NWj328It78VeiIZU/V0fFLJrk8mXLYyrFgB/cjXF5PVSQrBcJWV9Ew5b4KDc2CEpxTW6waH7A9KhGeqA+bD9VS+LggTegsCQfMaCOMwbl/xbY5lnoU44RdWmni5/2CdtBF8uQiQ/ErFve9vvKwWixaiGkg0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416052; 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=oP+Zl7qTTxZCu2Jq0yM9dMIapLtMm8swkthsq2XPVBs=; b=nysFOpSM0vOVPlTW822wX+C7XYG5ItebtfSu90fauC/0jbsTp58QL4+6rsYhjMvRyUQvbfngWth5fr7i/UbgAQyGH8t/m9z9tTR8jidgzPHwmEHwKkZBRuOJfuVsHp8maqdxxr5U5kYuw3hluuSq1s2LK/cXt1FJ8fHkqi0yyE8= 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 170741605283763.909519312369866; Thu, 8 Feb 2024 10:14:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tq-0004vE-CE; Thu, 08 Feb 2024 13:13:26 -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 1rY8to-0004nb-3t for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:24 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tk-0006n9-PF for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:23 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5601eb97b29so315540a12.0 for ; Thu, 08 Feb 2024 10:13:20 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id x3-20020a056402414300b0056058f2603asm1071801eda.3.2024.02.08.10.13.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415999; x=1708020799; 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=oP+Zl7qTTxZCu2Jq0yM9dMIapLtMm8swkthsq2XPVBs=; b=q8cpAV8vsMGa4v7NOjgzmsS+/pS+sXYH2xx9nErwIH3c2pYXpuiQgEPanqVCTbz+iL Fvu3bWo/P2etA6N/MhVCD91jdiq6LZNulQ14mzG9gPIcYyQtewhoshULxNO/WO9rMo+n 25B9ZruI1kUzM7tLw3khLQxttvBtr5jrNRPUK/9fTAmmtSNskDjg217kMsCn3+9XcnMp OaAk0t/HkxOZKnS8ecXk4C1ku63we8etVVesa16AlY9IZt4kRU/5w4C5QZo8wGOi4b6F lN5c9bI5dJOBOQMFNQqvJQrWvAKx83o+BNAnIYcPPuE4m12yoljNEnz1C3XL3KSpZhhE U8Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415999; x=1708020799; 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=oP+Zl7qTTxZCu2Jq0yM9dMIapLtMm8swkthsq2XPVBs=; b=u7FN9t3j/i6HSkj81nEgvieV1j9KDyHp6snJKJW4NEBS1c/kT4RzGe1voyIIFFXuxF 5p4lbZnL3GFmHQ90uRe9MiKV5nvj5AbxPnl7V3PTCepCa3EuUcd8iCtTFnga91V+5EP+ 0hAdEferxn4K9u/szRm6wmUndk8bNoyLLwJmhkQpw95EsXuORxxUDvBN7gSD/LINPN3t ISw5vrtCSWS85PoQcC6Hr3oZGbk/7Upb3Hl/LG/l5QQ0RtOJ2TnOjXgE0tthHHPSv4Ne 1u9sjhkJs3sTWycWKUfLTIoZPdfzpsfLOwROGvGNN5Kh096WxjW3JX7n7RJPZ9laeFAA wEMA== X-Gm-Message-State: AOJu0YztpIu8coCZdoYgqKunX6RWws2cU32nAl4rQXt1dETvLSH7CDgo g0AXRwTSAicAWwM/f1sDMvuxSGGXgEu9RIjd5Xa0QNTG7atjZfRZ7tCnJ38aRwHnAeO7R+H0OP0 vGEs= X-Google-Smtp-Source: AGHT+IEItETvPITckNcl05+wO1c4FcwbwLkJLQQ4FDCJmqkncAx3B7CXqNG/NfXDz6zcmS3iTQlRZA== X-Received: by 2002:a05:6402:8d8:b0:560:ef1d:a9e6 with SMTP id d24-20020a05640208d800b00560ef1da9e6mr318752edz.15.1707415999180; Thu, 08 Feb 2024 10:13:19 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXQV6J/JY3fLcszotp40NVy3j7JppsbUHNDxnA1/uudNIpeBG3fM9u4JPS3GVW4p+PbeBc9Z2h66ceTx+abSJJmYx/h9HxdSDwfYTy4POyjIXsTHNkoXzPNidaLvQrc3KVrX19xYfBDE9Z0+D+4OfLVCUuYV6p63+P2xc4ukkXJu91u9wvtBlWxcmxE7sXO4zhcRIJigOfLVFl/Kd6vH6sno7A623F7B9IT1ybBcjZxNaNkv02FNNC0O/t9vWz9eRiAXnhvBF6w51SEs9N4Y4+RcLonARwLAPHCcPJk2ytVy8ZUj0oe5iyBxjcQQL5G5ZrlwzPhCp/fxcK2nttamhJhhkSQVxSX2ShGrAI= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [PATCH v3 05/11] hw/ppc/prep: Realize ISA bridge before accessing it Date: Thu, 8 Feb 2024 19:12:38 +0100 Message-ID: <20240208181245.96617-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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: 1707416053773100001 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -278,9 +278,9 @@ static void ibm_40p_init(MachineState *machine) =20 /* PCI -> ISA bridge */ i82378_dev =3D DEVICE(pci_new(PCI_DEVFN(11, 0), "i82378")); + qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); qdev_connect_gpio_out(i82378_dev, 0, qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); - qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); =20 sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); isa_bus =3D ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0")); --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416046; cv=none; d=zohomail.com; s=zohoarc; b=P79n6r9TgAznhcZ7EDz4WmQRz6h7BJusEJweqKEjh7tgUvMZMjkSZXlbX1Z3g/5XPuGKQRjTKDkFSJh9JiqCnbBDAjRFLX9hUdeOFDAKXR4CjFilQaQOik9ZqDU/0xOPYDD0fyKaCB2/eB9S3fwvTqfRyYYJvSEutvOPUxzYrT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416046; 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=ARLLZN1q9jOO5ilFbs0xhNVpC6mVoYo93eKHvwmo3rg=; b=g/qzseIRUS4XTeTnCyy8N3ncsNn9RJGD8bWf7GBGPvBWxwLeAuzVduYQSOk+AQq9OG+XodoIqiLb0+P0pmn1cxndhfJYbMlpVsWq2JtavuMw8NX1ZF+Po5M5OglajCiMYKDWeMzIXOahX5sPI2hW9BgENKgUkT1uCmLbQJJAEwI= 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 1707416046050978.5044733083126; Thu, 8 Feb 2024 10:14:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tv-00055i-Ud; Thu, 08 Feb 2024 13:13:31 -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 1rY8tt-0004x6-0x for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:29 -0500 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 ) id 1rY8tr-0006o6-5L for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:28 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a293f2280c7so10569366b.1 for ; Thu, 08 Feb 2024 10:13:26 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id vb5-20020a170907d04500b00a38103ab710sm298607ejc.125.2024.02.08.10.13.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707416005; x=1708020805; 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=ARLLZN1q9jOO5ilFbs0xhNVpC6mVoYo93eKHvwmo3rg=; b=BzItl0TNbV4E0X7V0XOnMZ7urtn+gtlgFpoTFPRJ1NJ5VU6tLcQqtPDV4sUfSaOo23 k6ddd4bp+gRU1jj4Z8F9I9R235GQ/gm95sHD5KUaB7GCbJibLqH3BGemRQ1rruRt050I 3SkpMn1B2XIA/e+DzRgJ/RiNLbRJ9+7qpk2eCnNRzvYJszndfRtipvFVWVxBQMYMC8Wp 1XEpHmp7Iw7PCtnkivcDk94cO/uG99PoE3zMyd7EKwbb4TDqUS3h7ZVV3lHyQcRGnLWs jewIrUuNzNTDrUMKME4/LGuvg9iUOp0E3qlERButSOtdWdqyF5INfu5KEuYr6Bwr3S8S MRMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416005; x=1708020805; 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=ARLLZN1q9jOO5ilFbs0xhNVpC6mVoYo93eKHvwmo3rg=; b=iJFa83rZZ4zuKkpN80rgeGIWtTSgdJC/+QBoM7tnM2jx9oIOV3gvq81g/3W3fJkKth RcGGl2hVDVdWkUCKNCG8QzdNiYUYRGoR1sS+7F6X4he6L45LYVLsvpG5UzEtgNYmKnY4 Jw4/4zolkXnI1bvs81uDHaA4yUyjYVbnePhPa90t9Z1EpWzOpaty0s9yWjCq9CrKH/ms KT6JORh5kcynlXwWcaMAGWcUYVlYeWA8zu2RVNiuVgcVWtRHR2+wXWJbY6AsinVhQsBv buwz0MqoGGUX0lJgf8MfbEIALd0pKNuqRy6xfzlICphCayKPxvPK4tN6SHv0dMwK93dO R59A== X-Gm-Message-State: AOJu0YzCMxtQwNUiqRd4iYz7nFSrDrAygfQj0sXt/c6RXSPM26ae8aya hsIR27POv1/j8+QOhtRhyEP+EIBjl06hzXmmt4EvjrxICkQghw7no8i0AH54FF4Hju21o8iCZZ1 kKTo= X-Google-Smtp-Source: AGHT+IFNJmzKp+Nd6YSYk5g8osOTKPbq5lQ123BcB5EbAp/PILwUbhYygEwBBRtx0q770AkE0FLs8w== X-Received: by 2002:a17:906:6d55:b0:a38:4cd:7e13 with SMTP id a21-20020a1709066d5500b00a3804cd7e13mr76621ejt.35.1707416005261; Thu, 08 Feb 2024 10:13:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVKe3bkGBFJH1vsY8ebsqIn9hao/dFktYpQkK5HaFuys/YJBAzFebHkOxcimAX7Go3ZEvuRwo1u+NVl8xiGCMRpmSTYos5UyKpbUY237ApkQjomiiyhLZT1g9WAR0YpJWsQ8CIAYWYK1eBJvxE5+VrRY6E3zorRYGmg6MQpuVwKVpOfQJlmDrkZL8eW1aFHU+0zYxpo8nYEMEzlyeUcXzv+Nj1M1YgJYyDFemp9WeaPn18/yTyxs3+t3NdlFDYKbr9YugckyonlUDvRz60Nc3LM+Hr/ESOJ1SNUeRxGUcwgmwNLEKTJmCPv0AqB0aw96EJdzCUm4A== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 06/11] hw/misc/macio: Realize IDE controller before accessing it Date: Thu, 8 Feb 2024 19:12:39 +0100 Message-ID: <20240208181245.96617-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::62f; envelope-from=philmd@linaro.org; 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, 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: 1707416047783100003 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland --- hw/misc/macio/macio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index c9f22f8515..db662a2065 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -122,15 +122,17 @@ static bool macio_realize_ide(MacIOState *s, MACIOIDE= State *ide, Error **errp) { SysBusDevice *sbd =3D SYS_BUS_DEVICE(ide); + bool success; =20 - sysbus_connect_irq(sbd, 0, irq0); - sysbus_connect_irq(sbd, 1, irq1); qdev_prop_set_uint32(DEVICE(ide), "channel", dmaid); object_property_set_link(OBJECT(ide), "dbdma", OBJECT(&s->dbdma), &error_abort); macio_ide_register_dma(ide); + success =3D qdev_realize(DEVICE(ide), BUS(&s->macio_bus), errp); + sysbus_connect_irq(sbd, 0, irq0); + sysbus_connect_irq(sbd, 1, irq1); =20 - return qdev_realize(DEVICE(ide), BUS(&s->macio_bus), errp); + return success; } =20 static void macio_oldworld_realize(PCIDevice *d, Error **errp) --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416054; cv=none; d=zohomail.com; s=zohoarc; b=IKeNSvQnmMWNU3qAHcOCVKQ70hftwCp091aG9ekg5JFaQd37aQfs0Daj/KE4LSrlPE3kRxt2g7RCedhfRuMpIu6p3JUscQNJBWUVAqEtuH+BPLgSCdJrd5DZ01+Vco1Jrws08/9ZiDwa7K1Tzg5xwOYWoUqSa3Wwy+sRI7D2Yjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416054; 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=49ud5Yjb30rn8SP9Mr5OVYTkrS5yFB+17IJ/cfY04ss=; b=cnkOoB5LsVwZ7fR4+orza82rluAKIUi3eZ7KyqwQ7xpZ4HdIwymKGIErFNB9htDn+ZE6yl8Xruhkzbrbmhr+8OvPP6TyL8/np0GgBETEocXgya6dERoFOpEKVQTHLJjSqzn8QXlVndYgIey70iD9Hq2oSP8ZAZUXMyl0iReBRnw= 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 1707416054983513.9375075114882; Thu, 8 Feb 2024 10:14:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8uK-0005ZZ-UH; Thu, 08 Feb 2024 13:13:56 -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 1rY8u1-0005Me-71 for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:38 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tx-0006os-Qx for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:35 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a39e31e1aa9so12210066b.0 for ; Thu, 08 Feb 2024 10:13:33 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id e3-20020a17090681c300b00a3826937a33sm292715ejx.211.2024.02.08.10.13.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707416011; x=1708020811; 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=49ud5Yjb30rn8SP9Mr5OVYTkrS5yFB+17IJ/cfY04ss=; b=LIMfBEEIRCYqMVNfECDt9W/Oy3qom2pvaKtrUCP2zzx/dfbyupZbdvTiFl5XZODU// /lqR4op+YrNaoB5XhpFaskWz8qTo+Ff5rOyq78BSIhrCmLU07+uGvJOKVTzAHeVFg8Ly RY8RK2HJFa5XE+F12yZ1yJis3fai+trNMAIot4gQDR/eNIXDpUk72kfHIXRHgWGIJVWI gq8Y7I804gASPjdwVKgn/PDVbCjcvW2KuZhXS3gNfliPtj8DDVsUwrf8/IgHV2sSfa8Z Nt24uHzHJV5SNHnvwl/LT4O6oWLC3h5kklXRjN3l3+QHP3M2dOvbYKS3eFPqn/Dn1PfB MrRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416011; x=1708020811; 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=49ud5Yjb30rn8SP9Mr5OVYTkrS5yFB+17IJ/cfY04ss=; b=adr/9dPLNU0dX5W3r9sHpFR04fghqKAjeThLd5HVTW7La+iEEvp4S0Kfvne73LQuA/ MzOsMXcWsJBqNwCCBI3Uwn1YXNt23sKNjLkWAQzBZBXnBAKzseFgFlyMLWemCF5o6MhP MxRy3jXwC0hivMug6o3yReFFqn8KUXis0h8Q0yZ+e2NtuZBmQncsTh96oq/OMF/z5oCl DjuWoD2+Sj+uH2Nj+wmIU/DJQkJTiVP/aMUe23ZFx6DBsuULmw/V4oj1+jdeEwSREf4r 6Uxc40paqJU7U0M7hTKBBKSfGX2M8Vr0DGVEPOsExsejE8Q8Z645zIHPUhFTFbQgVtSD 4HdQ== X-Gm-Message-State: AOJu0YwGRDSxMVUNnr7jp80vKKtrkkKsrl8PWfjMgtn5ng1T8xzzjlbf zeJZ5iDReEz/JdMk/2ZA8dvFPttOJ6cqbp1p4SyC3VskugtTWcPJ1hNDH6bcyJEwSkSzhNlERM/ YOhY= X-Google-Smtp-Source: AGHT+IElKnKnfr2w+uv+DJybwknWUt2WS+hrduCNrzndqBMvy8oa1xWESV1rOzmK5yYbgzhIAsV8yA== X-Received: by 2002:a17:906:1cc3:b0:a38:6b3e:8bd with SMTP id i3-20020a1709061cc300b00a386b3e08bdmr93193ejh.37.1707416011498; Thu, 08 Feb 2024 10:13:31 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWu2EbPuE4dOdkSp7nul+FpNq+9PE8jv5D0KfYqhDgArRE57ave53OHf/heI6zT4eJVrEkTNtyt8x4aN5C8rpwpzxSAv30Klpc+CgZqcaiftxlryebGJ8pjHyG8tT6XHnkoJecs+aHlKKLCxaK116PUB3ASLy7jpH9MVM3oSvV5BEy7HyJu8p6NmBwvotGQxRETSqJzIGXSGfKdfM155VlEXgpmzOkeHd4yt1ptNA7svbf5rnhIc0mNhetgZIFJFJTAxcTlXvxH/7ioqra/jiOUh0uxs0d3v9rEOGgpDLS1gfqpHD1/Mj1Wuey+PrIaLqJZTnSLSrHzX1++NMw91yJOnHQGB+aB7TriTyefKhM4eaMBoKvo4jANJQv/RTvFp+2tS++EzcPAmg== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato , Magnus Damm Subject: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it Date: Thu, 8 Feb 2024 19:12:40 +0100 Message-ID: <20240208181245.96617-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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: 1707416055751100005 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato --- hw/sh4/r2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index e9f316a6ce..c73e8f49b8 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -285,9 +285,9 @@ static void r2d_init(MachineState *machine) dinfo =3D drive_get(IF_IDE, 0, 0); dev =3D qdev_new("mmio-ide"); busdev =3D SYS_BUS_DEVICE(dev); - sysbus_connect_irq(busdev, 0, irq[CF_IDE]); qdev_prop_set_uint32(dev, "shift", 1); sysbus_realize_and_unref(busdev, &error_fatal); + sysbus_connect_irq(busdev, 0, irq[CF_IDE]); sysbus_mmio_map(busdev, 0, 0x14001000); sysbus_mmio_map(busdev, 1, 0x1400080c); mmio_ide_init_drives(dev, dinfo, NULL); --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416065; cv=none; d=zohomail.com; s=zohoarc; b=hGdeJu989JfGiyiUC2Xhhgph/9MX7xI8dDtCmd84Dq/xA1R8qkMODmPR7M/G9Ntjof0Y3AxS2Ydg4TQyARNQ2wXLOhqFkTgifftlOWG7fTkq+KdQcipqTxMrXqBpfgj9ZYoQ3DHnzUggh1J65ES8I68+8w3IEmaHI0A28wbIB38= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416065; 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=Bt8SkwfuTwRhmfpWk+aV3Q70u7eITNuY2Qk9HyWSpOY=; b=GAezqZexOZ2S6TkQHpegE74+pp5itLpEdIAPZbJTAtuFb0AVlBmA/bnODLjtBU094aiDT0etzWWMdPqUHP1mo3c+6ipfazgS4FFMCYYtN8Rr5nrrgHB83mdMX3E43HoqCrO9XtnLH7jI7rJUVSZ1roWxtDWACJn/w2Dz+LwleK0= 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 1707416065214180.45835772103362; Thu, 8 Feb 2024 10:14:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8uL-0005fh-BK; Thu, 08 Feb 2024 13:13:57 -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 1rY8u6-0005Tx-4E for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:46 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8u3-0006qv-DL for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:41 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-55f50cf2021so264889a12.1 for ; Thu, 08 Feb 2024 10:13:39 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id g19-20020a056402091300b00560dbcd61a8sm1059949edz.94.2024.02.08.10.13.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707416017; x=1708020817; 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=Bt8SkwfuTwRhmfpWk+aV3Q70u7eITNuY2Qk9HyWSpOY=; b=GkEu/7x+LhvgzxvFrsBqg7xz3XLOIbH/ygPjY28GJMXoLCQh6bO52acPOf9bL0yyKj vJZauE2fIz6VOSkuwgU65o6cn61M2FZ3yZu/OPfKoRd8Onh4W3rVR0D1Fxo+wIQ72Lsl iPNtLBgZkGJrJjElyLNAzXAtJTwXvJCBqkZntuVrlThXccdh5ETmm0mvvP3BANvcj+jL kqbKpE7ri3CVm/pvZCj2Hl5OKA9Bvg1WcMS6aN5M1UXDE/5vZrkaHF8lmNrdCAiY9xBy gp7yN8dsYZheUaZvw1QOFSFW3xSef9M4B6zxGN/1z+nyOn948Lz82q5X8UyHCSPu2riG muTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416017; x=1708020817; 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=Bt8SkwfuTwRhmfpWk+aV3Q70u7eITNuY2Qk9HyWSpOY=; b=qWm7hbts1FCW7pEWzTyemdtbfikb+hWCdGlcf7HpCr1vl/MaVnGADBAhhOKE4MCNos 5sRsZ142XjwOZaOcQJjK8ZEQypoK0W5Yt62Ta1eSfG1f0X8UeA8qXyD6PNdMGHBqcM8H xM96EdRP/yGjLedY5/uCFLVppAk/cH+U9teJrF0p9zsL4JkchKmWT556YYZgyplYdIUq FA5FoJPjY2GUVVXXq2n52azG6iSCzBhtHRMeUBdEfstmft/dpQn+b1il6fsxT5S4SEqh LWbgeaG8R3jJyrCoUsEopWqqT/UdyEzapDsWFpEoMenj+6inwywcYrxreDxEAe8yXQmu WqIQ== X-Gm-Message-State: AOJu0Yz/qXQLzLReTvMUOXAKdutknuT+cloQxMFhz7sarIKVFJ38a+0I pOwqpJEbYyjOv8tWRpmVwT2CxU3IveW359o3KsRzPZklDNIc1BRWkVcJb/GqUfl1nipeyekFcJT G2SU= X-Google-Smtp-Source: AGHT+IEO9hvP8BoYbCyHzDXzQraYCBWkEIwgd3aORT/MjaRQ6yDlfWlwQOA1/E+meaN/XOHZ1OSlyQ== X-Received: by 2002:aa7:d8d9:0:b0:55f:6b8:b2fb with SMTP id k25-20020aa7d8d9000000b0055f06b8b2fbmr37282eds.1.1707416017744; Thu, 08 Feb 2024 10:13:37 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUpB0LftIgS+0pSlh5T06px9JNZoGmicjknWgOUCNyXDg3pA9Cl5j1vOEGW0J0cCxOWON2wrXxumcpuuJlDciXXTO17pbGNqwun1BY+A3KhPilgtsdTOSmnpJ/2NwvB90kZ4LnWogY0Mfz1PlLcXc2gz8YN/4pLIZnvq2AD6XXnb7eEoj4Y+FoB+AncOnWHNRhGIEUz1vTejgWw0K89MX9Oz2E/VZkafWyt4e9CNNUzqDt1JO1QEbafSZHyjM2mQiafWzcFIQs5iwa8EPCW8CCZ7MSCciBnca1vQhiGPUwXHJRTVMMS8AHYmizeUJE8rK7SjdhoFqL3EYk1L8C4ykwr9/+0cWrzYuWA9A== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko Subject: [PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing it Date: Thu, 8 Feb 2024 19:12:41 +0100 Message-ID: <20240208181245.96617-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.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: 1707416065927100009 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/sparc/sun4m.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index e782c8ec7a..d52e6a7213 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -312,13 +312,11 @@ static void *sparc32_dma_init(hwaddr dma_base, dma =3D qdev_new(TYPE_SPARC32_DMA); espdma =3D SPARC32_ESPDMA_DEVICE(object_resolve_path_component( OBJECT(dma), "espdma")); - sysbus_connect_irq(SYS_BUS_DEVICE(espdma), 0, espdma_irq); =20 esp =3D SYSBUS_ESP(object_resolve_path_component(OBJECT(espdma), "esp"= )); =20 ledma =3D SPARC32_LEDMA_DEVICE(object_resolve_path_component( OBJECT(dma), "ledma")); - sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq); =20 lance =3D SYSBUS_PCNET(object_resolve_path_component( OBJECT(ledma), "lance")); @@ -332,6 +330,11 @@ static void *sparc32_dma_init(hwaddr dma_base, } =20 sysbus_realize_and_unref(SYS_BUS_DEVICE(dma), &error_fatal); + + sysbus_connect_irq(SYS_BUS_DEVICE(espdma), 0, espdma_irq); + + sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq); + sysbus_mmio_map(SYS_BUS_DEVICE(dma), 0, dma_base); =20 sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base); --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416102; cv=none; d=zohomail.com; s=zohoarc; b=C/POpJCP7xobEJfzuTUSkk+O50Ngq9x8PzuEnU1qKqzKKNU6UUkdDJhj+pP3lavClir88pU5dqmoBbppjbPF27AHm31ZzVoGVy/AAC4BgaZaE1BCm2H9pq6RFaGyGJ2y8/CZy0wL3cuo4jJvOICmWNlZmGvLaYdwfzJj8/HOP/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416102; 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=h2BaaqYtSB0f7aHxoF7miID3EmqxQDE1kM5wTAvRNjM=; b=K9Yq76FkMAtaUPaQBXWHWcJ9bpzZFa4HCh9pT4wbuL2CJsgexokue0oqv06mLa0Cm2JS42FkanYAgeoc55/ERQrmYUbUkSrs1OypUw/2+SVYFtIdlplkMR88UfeGjs9yxFE9+kyUfUPOoE26C8LFHSPMRU6Jm1aETrnivKCBnq8= 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 1707416102018566.25097620074; Thu, 8 Feb 2024 10:15:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8uM-0005xe-DZ; Thu, 08 Feb 2024 13:13:58 -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 1rY8uB-0005VB-JM for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:49 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8uA-0006rK-3V for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:47 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5602500d1a6so233246a12.3 for ; Thu, 08 Feb 2024 10:13:45 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id cs16-20020a0564020c5000b005611d0f7339sm409781edb.41.2024.02.08.10.13.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707416024; x=1708020824; 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=h2BaaqYtSB0f7aHxoF7miID3EmqxQDE1kM5wTAvRNjM=; b=GeQjWD0hwrVNlRHZmxEPTP6tyQcIhdu7ThSmsg3JuAQyfhnZ/iBw0jXKD5WFZfuLhN vea0W1fmtIOccNqdYvLjUIloC320gDzXEMHwHYMVlZLhOTBBbuJAmEiOYjEEqFE0StM6 AhKztkdodNRCBgmHt/SSPbbm3XPYAiPOisXftLvJ1VPBRrClj5WVXik5w1uwObDrcjFX mWF6AviTpDKxZcEhBGhmRuLiX9igkG/9Hqy90nbcQ5cU8e4FEca4GwbrqrcWrUTTw8WL QL1AUT/vI7ZYBq7SXIayileKeOx2hTo5TN9OTv9GT7hmCxlO2+vycmPjtH+JWBh99xBL gMIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416024; x=1708020824; 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=h2BaaqYtSB0f7aHxoF7miID3EmqxQDE1kM5wTAvRNjM=; b=dGh2iMObraasJTsHgSJ/joTvQiodALVnNZCdpuuIUUQ1ZzYO8JGImbZ1k69ssFJlD0 TTKH9/ckLJV5GMxMYx9HlYWGPGnxcDs8kRUdk79csv/FDtjaxeydAO+jFtP/I460iiZO qBYiZZ89qVv+l/gl+asJX2tzjtvy/wg9ERzARcBRDtgzA58ac1BHxjnu8gyAfH5zbmwF Djxp9GfRzVWFZ133NRQhuHEqbBULNWWmYg4Riah6L+o4fR2Ymsb9ooiEwKrbng7hYqm0 8QPRYrNqoiz7DAGluSrk8CuSrrImuUuGGO3NK64yV6L3l3NGI88w4Vj1mIJ+kqW/Dcaa b9BA== X-Gm-Message-State: AOJu0YwDthDnunGz6cTDN5SHFPD0Oa1rTO6vPTNp+b3ZCxWMaQqbDnIH n7MTPwJDaxyrFmGWNN8m+7XKHztQXz86eALTygKyH7IzwtXNSvUE6SRtKlyM/Fr91xR1IY4OlgW 7Sqg= X-Google-Smtp-Source: AGHT+IGxwoi74fFBhOMg2OjuBbKBODTBB9ePImyMtyF+HtSx56zbCN5dGJwNT9kE+q4vc2QyV/e2PQ== X-Received: by 2002:aa7:cfd1:0:b0:561:1602:949d with SMTP id r17-20020aa7cfd1000000b005611602949dmr30642edy.24.1707416024131; Thu, 08 Feb 2024 10:13:44 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWicqgbrRVVwmt+MjebO7v6rOOJM9EID8Ep0AD2RCmrZjRuPz/y71P7YBizYQkNbJCycYmDF50cJxHGydKsrrdguYSifoUEX87Hm6345qbhm4JJFsFTd//9NccnRs9w7q5aPE6NjpDk/3kXPcVY7oOiFZ8JFtF/peJGt/xfc4KL79ws8OuNzkKYkiCrb6+dvnefJeEOu1yXCiPRn0YW2xB9I6Ln7ng6rqVI9EkR8RYm9ViEkseqdEPTQmzJX/mytTS9Av2VqT9JbDIREFmbdrUDMF9yeq7QERypi46BCw5cIHMTPO2UGE/NqjCBHlLY52unYWlY8HXzXSw5mJNcXMH9IA7GLjSAdcB1e4aGms7zXd1FCx28TZHQgrbPmmma7zf8oONO/rNaEuIIBz5xN52d8WBkLp0JDts/Mw== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabien Chouteau , Frederic Konrad , Artyom Tarasenko Subject: [PATCH v3 09/11] hw/sparc/leon3: Realize GRLIB IRQ controller before accessing it Date: Thu, 8 Feb 2024 19:12:42 +0100 Message-ID: <20240208181245.96617-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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: 1707416104092100003 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/sparc/leon3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 2dfb742566..0df5fc949d 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -263,10 +263,10 @@ static void leon3_generic_hw_init(MachineState *machi= ne) irqmpdev =3D qdev_new(TYPE_GRLIB_IRQMP); qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, env, "pil", 1); - qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, - qdev_get_gpio_in_named(DEVICE(cpu), "pil",= 0)); sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(irqmpdev), 0, LEON3_IRQMP_OFFSET); + qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, + qdev_get_gpio_in_named(DEVICE(cpu), "pil",= 0)); env->irq_manager =3D irqmpdev; env->qemu_irq_ack =3D leon3_irq_manager; grlib_apb_pnp_add_entry(apb_pnp, LEON3_IRQMP_OFFSET, 0xFFF, --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416062; cv=none; d=zohomail.com; s=zohoarc; b=RGRUim05WATR9IKKKow5wMB9IRrzCcd8jlV+mIt/aiz+/HB37SfN3GcFLdSh+iIRheAKf/ABWVcJuFIhTUtTZsDHVYJBC2raPpFPJP3Qg9MhaV9544akcQ98lnnTLDqtC8jOwJrYytcfI9+9/o2pVIm0TxsGv332JjAWpUB1T6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416062; 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=rJDi0dase1u+UxugeaCpuJyBUHrq46IwKZeWRl/RxT8=; b=mt5vPci1v5LzYG2epzGYZmzj3SAlHRjvpMroctE0fIEYyy9OMIMZ87uj19tl7Zz2PA/SvTbktwNWJS2TChdFEVni4U+1M8AvdbB4r3uzXZeCNZOY4EJqSQfg98YLfWnYq0DnDN80L534+ceDATysJ1SKbwf88daK9yqXuCcjgsU= 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 1707416062443550.9778607766125; Thu, 8 Feb 2024 10:14:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8uO-00063b-1U; Thu, 08 Feb 2024 13:14:00 -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 1rY8uK-0005lS-Iz for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:56 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8uG-0006sB-Pn for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:56 -0500 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5116b540163so125114e87.1 for ; Thu, 08 Feb 2024 10:13:51 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id o16-20020a17090611d000b00a384365e3b9sm294221eja.195.2024.02.08.10.13.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707416030; x=1708020830; 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=rJDi0dase1u+UxugeaCpuJyBUHrq46IwKZeWRl/RxT8=; b=b5iOrIJBrx0d3LphHmsNbMqIXL5Cu9pjxlAbg5Wxy6/lgaZdy6qWxE9FBEPLijregP O1BdnAm9TY0GtdMo9tIxSvt+4LOrNoMxx7Fr+M1CcPfxu5wz9YnhHcImhFaArerJBI1Y 6cUIUagq3uTHcrxVZWjiPcu7C1KvsNMYBM63QfFyIRhUV8EBIgKFr1u5OrFn9+1Typr9 JD2zCejnffkIiR2t2WpqbuHMEthgRWgRXsh0dEvqDmyWr9gh+m8U5yN/Z8SVbFQpT/j6 KpggL8rNrbgQmZ0N9TX0hQ7TOHMyxkn/Dhi7koALbJpfJAW+iD1z8lRwxrH1+JzccYaI wqEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416030; x=1708020830; 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=rJDi0dase1u+UxugeaCpuJyBUHrq46IwKZeWRl/RxT8=; b=JgLqn/6GXL0T20DZ6l9k22qTstWBglGMYKj5SZ5KBeN1T9lAWlwZvkUFv3YKKdCPeo ulhjlv4Rnc868fiBDUqag62S5oid7xk/qIw+RlNfabrcq45+ZtEm5JBsIYRgaBbnopqp 8Sl7GiIWIT6SvV/ZZhlSNRg7IbpUSu8wb5pivEYA2Aol9PnOrvOjtS31M6N8JwhmI5pm /V0kTFT73wGf3dwkMjNbwORl+E8YtTpxzGLWWPsu8B6CZDbTR4/YyXVi5Xu2qF8X3+lv 99x8HpJ0hcyuDrQ2gtAV9APcRmDvf1T9MWW4zMZoQWTJLg25c93bxLITXdupZfkHhaBJ zevQ== X-Gm-Message-State: AOJu0Yx7gAD+2lv9wrsfPUYsmYyHmW1DvffDm2zCz/cldMlqHNYDLgvq EL5Bt0DxLPFsdwQgkW8UP2QJgwzaOgx3RqhVciE3Q1z3P82rxsJBdIoFcWsnEWS1Conj1WVbkrM fwzc= X-Google-Smtp-Source: AGHT+IEkVmvMfcfNh5vamm5BWwJBPCzSIs/S3TwSJqgfO4sKWTIUVH+xR5fjd0f6T9t7D7ohMuiyww== X-Received: by 2002:ac2:5f4c:0:b0:511:5361:20df with SMTP id 12-20020ac25f4c000000b00511536120dfmr22799lfz.13.1707416030376; Thu, 08 Feb 2024 10:13:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUaNaNjjnd3A3FmgNXUAOALmF0y5Wed6rvoAqmHZVw8V9mWBT5tTxeXyhPJtOFh3R0TWOFH2eqahfLI4U/tO0mo0kIc03uGZfeiQxbNWycH9X4O7jfRFhEukTu0zDFXZf672jNufRhplQSJivw5uhRE0cbuvV/6b0KqT2dOWxfAOwCfd8ygOGcRB/opX0GJWhMLGzTlggDFvw5azjf1RcrBVnPjXUiqsJhypTnwNRybfUXzkW+uQZGHietvkvRuI+JzQOTeVd77gQqczAxr/IgeENoojH3NM3Amt1e/Xyrr3CfZKCxnzUNLD5mwPyBmJBdUr4txR9KwNsNA+JOt/nSxEJ9WzLtUFG0BZhbd5pPp1vxyooL14v0q8VVxXzjvLP0487/YKjHlyF3cP4P1YyTg1oZIz02IyPa7/w== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabien Chouteau , Frederic Konrad , Artyom Tarasenko Subject: [PATCH v3 10/11] hw/sparc/leon3: Initialize GPIO before realizing CPU devices Date: Thu, 8 Feb 2024 19:12:43 +0100 Message-ID: <20240208181245.96617-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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: 1707416063903100007 Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/sparc/leon3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 0df5fc949d..0e1d749306 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -234,8 +234,11 @@ static void leon3_generic_hw_init(MachineState *machin= e) APBPnp *apb_pnp; =20 /* Init CPU */ - cpu =3D SPARC_CPU(cpu_create(machine->cpu_type)); + cpu =3D SPARC_CPU(object_new(machine->cpu_type)); env =3D &cpu->env; + qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, + env, "pil", 1); + qdev_realize(DEVICE(cpu), NULL, &error_fatal); =20 cpu_sparc_set_id(env, 0); =20 @@ -261,8 +264,6 @@ static void leon3_generic_hw_init(MachineState *machine) =20 /* Allocate IRQ manager */ irqmpdev =3D qdev_new(TYPE_GRLIB_IRQMP); - qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, - env, "pil", 1); sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(irqmpdev), 0, LEON3_IRQMP_OFFSET); qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, --=20 2.41.0 From nobody Thu Dec 26 17:51:26 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=1707416061; cv=none; d=zohomail.com; s=zohoarc; b=NmgbORMbDQBXooJp1YrMymPJWXyBryi6sKhdKv8AIWZ2IOaDtj+m/yJQmFwvNhPQx8IiAzpa6ryoq72bjrOIqZ57Bo9rkRmfOLwJ3istbIfASBn7O8l6Ghci19ZEzoPIC2CiOUZ230fsW8wyzkF19m7vkNNi7NUZb9yMIYHW/CU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707416061; 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=e0Ufl9fqBfA4JrpwEmiN6ER59zmqlqLsBKlzkxxHoFQ=; b=G+1NMpTip2qRChyvguDgfYlb6aSZxt90sHaFmpjWnPfKSBOlWeEjZ5qFT2NN7HyKgf1Vt8XBnkcwI8tVszdgkOZnBoy/aqIZuLptYnjqtnz6hrdR9vV5Yb7Dn/F48VY3Mpl73PgymgcuwREgJ3nsEN+RFkIGNlL841+R7s0BsMg= 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 1707416061026900.9473662462277; Thu, 8 Feb 2024 10:14:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8uP-0006Hp-UW; Thu, 08 Feb 2024 13:14: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 1rY8uO-00065A-9E for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:14:00 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8uL-0006t9-Ub for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:14:00 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so12022666b.0 for ; Thu, 08 Feb 2024 10:13:57 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id lf4-20020a170907174400b00a3bbf725080sm303160ejc.55.2024.02.08.10.13.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707416036; x=1708020836; 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=e0Ufl9fqBfA4JrpwEmiN6ER59zmqlqLsBKlzkxxHoFQ=; b=DRtKoL7EEoO49IUAU6sA7DmmTc7syfWoRA+317qbBESw2ezVfDpoOZ0a7Ko5MO0jjz pONop6zedD8lgkZTPNAMyiWUmRmUytkgUkgtrQmzMDz8wPgIV9oLYktajXKk1VBtviio lgjgvvokfd+Jw+Wq9C964pNgKTtNSUpLmI0U6g48QSkaKMM//4ElGQTCC37jE5jNNko/ KTiTR4R6GvnJ6upD9+P86+qk5VqkLqgf0JeoSKqMZSGpJs6FaiuRkwT6yAXiF6R9y/gz lgnNomn+hsdWVyI2zbj1gzuzzXjYg4ML8zgPUfBZZMBDgvF+PG/cEEimqXoKeBa5OWzj LWVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707416036; x=1708020836; 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=e0Ufl9fqBfA4JrpwEmiN6ER59zmqlqLsBKlzkxxHoFQ=; b=Y8smPFC5ZH4RrPxEn6kJaUSpehTxPxZb8LJ+WkVoMMUXxE5uv3Okt6WA81lJY43sEs zEy+zzwQxNxPKDS95kHdYK5MDrjw3c7J7pdjP3maicut68bzpHdxE5I4QlFGNlOGqAH4 /pXSlrCitXYB3wn3ziFCFaJJa5xuEybuC/5Tk4eYFvAx2A3kCNONW2AfMlr104PVRQxd dgpnzsAfcQUjupoXnJYFN5X3VwzHoKkQxF1n96ZiIrTFJzXP+bBrTrRBiyZO5dPdZzMS QnI29AJifzz6qVAxDfY5bBPhE1milYeJNLhJderlYHkmVSlZSitq+LDRbqFlg+dNK/x8 aNwQ== X-Gm-Message-State: AOJu0Yzy35VDQESI0rdt+b80WBmxvQXVulL/NY1Yc9bbgo14JRaQlpHS VqEehv9musxmBVUAJm6AvqrbVEznILhMdeM0gbucFOXJnr5cIVaXm7yD9td4K/pFXs9LB/F1Ksw SEFE= X-Google-Smtp-Source: AGHT+IHgsm41GzCMAivOTWSCsERp8TnKsaHIUDvbsNKZ5OjpWc8oL+u+lZqR8inKZ+TF6z5irvJqSA== X-Received: by 2002:a17:906:4808:b0:a37:aa3b:f56 with SMTP id w8-20020a170906480800b00a37aa3b0f56mr82482ejq.49.1707416036295; Thu, 08 Feb 2024 10:13:56 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXC+04nAVm0zyDOUEvv5ti6R/jvcT9j+VXkU7fy1k21yTDd5UCfYql7jILgh0hcpandaqeRv0O0R/1WVHUnsvAqmFlwvbcEE1uhoAjRyaeRgRiqFTzJ1WqJ3TUhyVcNCgyuSC9SkTIJDR/wJBAwRviEbeGHsI1rvoyl7bm0EVu+dlCKrjGrxS7s4+Gx8ZmemLTCVrJyGdDxPTrPwBQ+Fl+J9MAXoImiERssDSpUcRVvIIzWGG+euB+MBHPl4k5L8prV1rRAlLdi/9P1tSeN0YEv0JVWRINaoHWd5DQXOqdYTquUmlgnmCqNK/bweD+0KQkywwGLI15QFNq1IaYghDe+srVdmKydBEYP+w== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko Subject: [PATCH v3 11/11] hw/sparc64/cpu: Initialize GPIO before realizing CPU devices Date: Thu, 8 Feb 2024 19:12:44 +0100 Message-ID: <20240208181245.96617-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-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::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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: 1707416061902100001 Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/sparc64/sparc64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index 72f0849f50..3091cde586 100644 --- a/hw/sparc64/sparc64.c +++ b/hw/sparc64/sparc64.c @@ -24,6 +24,7 @@ =20 =20 #include "qemu/osdep.h" +#include "qapi/error.h" #include "cpu.h" #include "hw/boards.h" #include "hw/sparc/sparc64.h" @@ -271,9 +272,10 @@ SPARCCPU *sparc64_cpu_devinit(const char *cpu_type, ui= nt64_t prom_addr) uint32_t stick_frequency =3D 100 * 1000000; uint32_t hstick_frequency =3D 100 * 1000000; =20 - cpu =3D SPARC_CPU(cpu_create(cpu_type)); + cpu =3D SPARC_CPU(object_new(cpu_type)); qdev_init_gpio_in_named(DEVICE(cpu), sparc64_cpu_set_ivec_irq, "ivec-irq", IVEC_MAX); + qdev_realize(DEVICE(cpu), NULL, &error_fatal); env =3D &cpu->env; =20 env->tick =3D cpu_timer_create("tick", cpu, tick_irq, --=20 2.41.0