From nobody Tue Apr 30 04:50:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508280730143424.03850608571145; Tue, 17 Oct 2017 15:52:10 -0700 (PDT) Received: from localhost ([::1]:41797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4aiF-0002GA-BL for importer@patchew.org; Tue, 17 Oct 2017 18:51:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4ahD-0001si-QJ for qemu-devel@nongnu.org; Tue, 17 Oct 2017 18:50:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4ah8-0007SK-VT for qemu-devel@nongnu.org; Tue, 17 Oct 2017 18:50:47 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:50056) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4ah8-0007R8-Qv; Tue, 17 Oct 2017 18:50:42 -0400 Received: by mail-qt0-x243.google.com with SMTP id k31so7069517qta.6; Tue, 17 Oct 2017 15:50:41 -0700 (PDT) Received: from x1.local ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id h36sm6952451qtd.69.2017.10.17.15.50.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 15:50:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2WQe5bbeeieIBL77DuJ1diozXnZqzRaSKuEgiNu8aNw=; b=vAlsAg1a6G7frJo5Xr86G2MrPRh5QN5t00DJZrXG1xPCgyruePR8eCjdzWQA65dItQ uUZo+a+mtcis1CmqACDoSBeyZXFDQwSgaEqZrONC0U+wZk7Hp1aKqczcrKkM8jkqs+Dt a/pu2nUgsFdcwXhA65Jvx6yrhEUK7G+tf2a/VtzwvFhWH6HsGKF285BztyNXC3jkEIkX kCjuVnrHSMMXPqUjQ3478nrPPAUiOaVmeSy0c3xc8pPh9IyKiNChKubf9SInxEeSqMmo +lW8o9BwaSXp8ZXij14uGm4Wkg6C1q3hfqGqMRrl9PCTV+okpCR0IXpYzuPp9a+clJXo Y/jA== 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 :mime-version:content-transfer-encoding; bh=2WQe5bbeeieIBL77DuJ1diozXnZqzRaSKuEgiNu8aNw=; b=jCmlbfAJNfSlWBt53nTK0BijQ6pDSNSDffj7UKOX5KBBmDlqqN0BYMTVACfle/BkDz qArzc/HAr5IndWuGzYL2c8Xa1q19iwSznvXtdDhmg44TnhdmwGRgLKk/Xhxa1EZMTiUc E8k4oYHx5QLgMLm08YjKnlMG71nj6yLKwcNfC0Yz1td+pY2Ecxgm4Q3H02ZyMx0tdxLC CgvDCtL1c9lu7q7Ez4924uUaBxdtj5Zm/bEURT12J2brjC40oOqQ+fGcxjN9Mh/cDxgm 8nk2fJjdGpWg+zHCZGMk5EaiZ3p0N2MVaJ2LI+dqtfMccsUUNAepBUllMsPN7pkgoKtf gRlQ== X-Gm-Message-State: AMCzsaUmBYona65VBzzECQXp2MD5Um5j/WgZu+fYGHfNb1LxHkECv6KI kxwL2qbuMf6frnhyVWfHwYo= X-Google-Smtp-Source: ABhQp+QFBJGWkq/IIuu24Dd6Fszq5cq+4pPs23bdm3F8/FlF77d8puvIioNbBHm5bIYdYbGR9TKkgA== X-Received: by 10.200.15.118 with SMTP id l51mr450288qtk.181.1508280640944; Tue, 17 Oct 2017 15:50:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Richard Henderson , Peter Maydell Date: Tue, 17 Oct 2017 19:50:25 -0300 Message-Id: <20171017225025.25451-1-f4bug@amsat.org> X-Mailer: git-send-email 2.15.0.rc0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH] hw/alpha/typhoon: simplify using the "unimplemented" sysbus device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/alpha/alpha_sys.h | 1 - hw/alpha/pci.c | 26 -------------------------- hw/alpha/typhoon.c | 6 ++---- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/hw/alpha/alpha_sys.h b/hw/alpha/alpha_sys.h index b6d8369ed7..9e67f78c60 100644 --- a/hw/alpha/alpha_sys.h +++ b/hw/alpha/alpha_sys.h @@ -15,7 +15,6 @@ PCIBus *typhoon_init(ram_addr_t, ISABus **, qemu_irq *, A= lphaCPU *[4], pci_map_irq_fn); =20 /* alpha_pci.c. */ -extern const MemoryRegionOps alpha_pci_ignore_ops; extern const MemoryRegionOps alpha_pci_conf1_ops; extern const MemoryRegionOps alpha_pci_iack_ops; =20 diff --git a/hw/alpha/pci.c b/hw/alpha/pci.c index 8dde637bfe..e0bcde9f70 100644 --- a/hw/alpha/pci.c +++ b/hw/alpha/pci.c @@ -14,32 +14,6 @@ #include "trace.h" =20 =20 -/* Fallback for unassigned PCI I/O operations. Avoids MCHK. */ - -static uint64_t ignore_read(void *opaque, hwaddr addr, unsigned size) -{ - return 0; -} - -static void ignore_write(void *opaque, hwaddr addr, uint64_t v, unsigned s= ize) -{ -} - -const MemoryRegionOps alpha_pci_ignore_ops =3D { - .read =3D ignore_read, - .write =3D ignore_write, - .endianness =3D DEVICE_LITTLE_ENDIAN, - .valid =3D { - .min_access_size =3D 1, - .max_access_size =3D 8, - }, - .impl =3D { - .min_access_size =3D 1, - .max_access_size =3D 8, - }, -}; - - /* PCI config space reads/writes, to byte-word addressable memory. */ static uint64_t bw_conf1_read(void *opaque, hwaddr addr, unsigned size) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index ae11e012c7..5852d6c582 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -11,6 +11,7 @@ #include "cpu.h" #include "hw/hw.h" #include "hw/devices.h" +#include "hw/misc/unimp.h" #include "sysemu/sysemu.h" #include "alpha_sys.h" #include "exec/address-spaces.h" @@ -876,10 +877,7 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa= _bus, &s->pchip.reg_mem); =20 /* Pchip0 PCI I/O, 0x801.FC00.0000, 32MB. */ - memory_region_init_io(&s->pchip.reg_io, OBJECT(s), &alpha_pci_ignore_o= ps, - NULL, "pci0-io", 32*MB); - memory_region_add_subregion(addr_space, 0x801fc000000ULL, - &s->pchip.reg_io); + create_unimplemented_device("pci0-io", 0x801fc000000ULL, 32*MB); =20 b =3D pci_register_bus(dev, "pci", typhoon_set_irq, sys_map_irq, s, --=20 2.15.0.rc0