From nobody Tue Feb 10 14:33:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.48 as permitted sender) client-ip=209.85.221.48; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f48.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615664918; cv=none; d=zohomail.com; s=zohoarc; b=aNNLG5lZEVyxLHGqMtA85Ug+d3TrYSIGi5RnQfsW0AGnCRVic6qRKH6+q/rri68uAUmIo/17q1Dcj+oOeYWMJFtSsb7BTFAxDxeGTnJvhy0xQO2ArY0zMJBJmjtg5orxljvvT0toOsR0EdfC7cz/XdZs/36QQFTPeRU4OtWTAFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615664918; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NdWkTYFq4CcNFJEVWCc6s/+3/xKpysVoHg6G3a/oBtM=; b=ZylCLZ06Ll4k2LDzfCiiUEP4oroJR4Ml2wLLfHUxqMoBJtih+kwLAlXQiRa1icCon4ol3TXEUKddOnnzEAmTzqLDurWWwla62/P6Hl7hfD6cRTJ5ID0w+clBr/cPc5Vod4SvO+e5pOla1QtdjJTPRIT2dVNvTaqDakTcHVIvEMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.zohomail.com with SMTPS id 1615664918667481.1602800042099; Sat, 13 Mar 2021 11:48:38 -0800 (PST) Received: by mail-wr1-f48.google.com with SMTP id e10so6604914wro.12 for ; Sat, 13 Mar 2021 11:48:38 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id v18sm14511057wrf.41.2021.03.13.11.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 11:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NdWkTYFq4CcNFJEVWCc6s/+3/xKpysVoHg6G3a/oBtM=; b=dFvUMEYf1j1/Wrw/e6nUs3LozpmXPldk8DDVFe93AoggoMniod8Z1lopJ87uSQShxv UnQtExh650xd7SEiPX1Cn3AKRFkBR0lBTxPdZfnFbh0onty6v99Afm6Izz9yuTBMnFn+ KiszKVqoNYSg5qPsiCDSfgPI8HOSBCH0iOefSHGx+rX0oja10Jgz0jRMeqAqGAYDmMte TKADyjfjTlZqxqwATQUHNfT8Hrc//vPFnXODKFNqfizeNFse5HMObVWE2Z8+gQbBe2p7 uoehjXx486IdFM3PFsHevtelwV5UM72vN2fB23CxGPJ/p5xyQUGmhQwcvNSnKPzxkjQh k7+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NdWkTYFq4CcNFJEVWCc6s/+3/xKpysVoHg6G3a/oBtM=; b=NjBGODeoIYyuwZJPH0MZ9InlLnU/YJdVr9a74ZHHFRLzd57+szqcMQJTTTIHJwTc9+ zM8hHUUvmdAfWIZcvXkgFIajlWCQQZxJn63K5oGiGln7htSym9OrS1pGkTDjb97SC092 y0BiBLobuuRNNKGI8blZd9Ot7e+hBJRdgFVa4z8c9Ye6WIrbHD54XY35rv/JWvNtCfBt SU7v/WYpKOANtxx3QJkX3BnRrBFZppBIQCjGd32K8Gw8AmJJyt4Us4AHUfZGhmk3Fdhj C6UQ8YFZcs67KLXuPS0q7h91mznQUQRUg3TELKqJrQf1vIMow9NyIj9JGQH+KkK1OOOX yJZQ== X-Gm-Message-State: AOAM530H8cINQwQqCDc3Qu8yskoKHZx2l66Bv4hN8jileaBOeYkSNnBb LByK37FJncL0bp8hjH+KZv0= X-Google-Smtp-Source: ABdhPJxQAeIvP1o92Kti5erMo9ukbM96BO1lIRiTQLdJLcWjWuYzb//x0xKRFFI6cE+zyrLaubzSCQ== X-Received: by 2002:a5d:5256:: with SMTP id k22mr20684883wrc.162.1615664916929; Sat, 13 Mar 2021 11:48:36 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Aleksandar Rikalo , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , BALATON Zoltan Subject: [PULL 01/27] hw/mips/gt64xxx: Initialize ISD I/O memory region in DeviceRealize() Date: Sat, 13 Mar 2021 20:48:03 +0100 Message-Id: <20210313194829.2193621-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210313194829.2193621-1-f4bug@amsat.org> References: <20210313194829.2193621-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) The ISD I/O region belongs to the TYPE_GT64120_PCI_HOST_BRIDGE, so initialize it before it is realized, not after. Rename the region as 'gt64120-isd' so it is clearer to realize it belongs to the GT64120 in the memory tree view. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: BALATON Zoltan Message-Id: <20210309142630.728014-2-f4bug@amsat.org> --- hw/mips/gt64xxx_pci.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index 588e6f99301..6eb73e77057 100644 --- a/hw/mips/gt64xxx_pci.c +++ b/hw/mips/gt64xxx_pci.c @@ -1196,6 +1196,14 @@ static void gt64120_reset(DeviceState *dev) gt64120_pci_mapping(s); } =20 +static void gt64120_realize(DeviceState *dev, Error **errp) +{ + GT64120State *s =3D GT64120_PCI_HOST_BRIDGE(dev); + + memory_region_init_io(&s->ISD_mem, OBJECT(dev), &isd_mem_ops, s, + "gt64120-isd", 0x1000); +} + PCIBus *gt64120_register(qemu_irq *pic) { GT64120State *d; @@ -1214,8 +1222,6 @@ PCIBus *gt64120_register(qemu_irq *pic) get_system_io(), PCI_DEVFN(18, 0), 4, TYPE_PCI_BUS); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); - memory_region_init_io(&d->ISD_mem, OBJECT(dev), &isd_mem_ops, d, - "isd-mem", 0x1000); =20 pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "gt64120_pci"); return phb->bus; @@ -1270,6 +1276,7 @@ static void gt64120_class_init(ObjectClass *klass, vo= id *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); + dc->realize =3D gt64120_realize; dc->reset =3D gt64120_reset; dc->vmsd =3D &vmstate_gt64120; } --=20 2.26.2