From nobody Thu Nov 6 00:36:47 2025 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15384326917301018.4765962136051; Mon, 1 Oct 2018 15:24:51 -0700 (PDT) Received: from localhost ([::1]:40936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76cU-0000DO-9j for importer@patchew.org; Mon, 01 Oct 2018 18:24:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76XS-00041Z-23 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:19:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g76Oc-0007RC-Am for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:31 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36962) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g76Oa-0007Nb-I5 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:29 -0400 Received: by mail-wr1-x441.google.com with SMTP id u12-v6so15633251wrr.4 for ; Mon, 01 Oct 2018 15:10:16 -0700 (PDT) Received: from x1.local (11.red-88-24-160.staticip.rima-tde.net. [88.24.160.11]) by smtp.gmail.com with ESMTPSA id 185-v6sm13554914wmy.38.2018.10.01.15.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 15:10:14 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=RsAOrTX/E33kPVDfEgsIsccgiosWT/pbvFuZcYuKJ44=; b=aua27wVUaC68rlD0lvpYHl+rM9cESjySXmBP6HYpubD9CjX13hi4YFfyIw02GdTF41 6b3T2ikJjEGJo8L4mG6PGu8YeP7UK3QLYO8nFhf0jPhLnPcAekp10Ey5C3h8OiXVJ0EX qCoV8Fj4kHsakTQJCBNZCIfshkUQODkencq+ag7G4ts1epuxQjebVjkIsrmrWqpL4vdR YBOACBmVDGvz0xBmd8c5lylwpZLoyjRIXHIEfs4MnUpbrmMcXh+SSJ3eAsA8vqnTpW0/ B/EuFDpJSvBjtKpHk+m4Ivs3VAlsr8sFDrTCU49J4/gAqtTcETOvYqSLaCU0ls7/eX7z bSzA== 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=RsAOrTX/E33kPVDfEgsIsccgiosWT/pbvFuZcYuKJ44=; b=cb4RtRpshw5U8Mo+rG5AURJXs1TMJwFkXmybGVvBYT829Ko7ikTgJ1cHHej8w6kDxd 4xfXEhYCq9tzWLwoC8F8lK281neoCeYx7mVkoeIIA16uABKZ5/16OeaMjogcN7dpcPbS xhXDFH+eGCiPo8cwv5h1sHECy68/FpxXiozBipAgFrThquS/GNUV4JKbVuesznwCByfF BAmP52JZkKnfIvLvw7MOrnRj1nPb02IKsJ1loRydY8R2Dcr1vWwkNlnnBGJ1r4tfbITq lxifau5Ax6iBAUdHvTD9jLj5nRpRhomr0iEfZKRkVCQARg4h6kf2fF6v7mteZ3Yp6Lcn AsdQ== X-Gm-Message-State: ABuFfohtJ5UB0gu9jGjXst47aESRWg3CVH15WNXJX+JadMmoEioBueXe JUQvFL+PxfX/LDfpWwxRzjA= X-Google-Smtp-Source: ACcGV60fU6qxt7zNjoA8OYYa2TJHxTRBiO+duqZIjT5qt/D3eNEGFxbKEXtvWQonqiQ8sBOAF7w59g== X-Received: by 2002:adf:92e6:: with SMTP id 93-v6mr9005742wrn.124.1538431815152; Mon, 01 Oct 2018 15:10:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Tue, 2 Oct 2018 00:09:38 +0200 Message-Id: <20181001220942.2382-12-f4bug@amsat.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181001220942.2382-1-f4bug@amsat.org> References: <20181001220942.2382-1-f4bug@amsat.org> 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: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH 11/15] hw/sparc/sun4m: Replace 'empty_slot' by 'unimplemented_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: Artyom Tarasenko , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , 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 The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, however the later use more recent APIs and is more widely used. Replace 'empty_slot' by 'unimplemented_device' to simplify devices code maintenance. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- default-configs/sparc-softmmu.mak | 1 - hw/sparc/sun4m.c | 24 ++++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-soft= mmu.mak index 12f97eeb20..7369b54467 100644 --- a/default-configs/sparc-softmmu.mak +++ b/default-configs/sparc-softmmu.mak @@ -8,7 +8,6 @@ CONFIG_ESCC=3Dy CONFIG_M48T59=3Dy CONFIG_PTIMER=3Dy CONFIG_FDC=3Dy -CONFIG_EMPTY_SLOT=3Dy CONFIG_PCNET_COMMON=3Dy CONFIG_LANCE=3Dy CONFIG_TCX=3Dy diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 3c29b68e67..ca37acf7af 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -42,7 +42,7 @@ #include "hw/nvram/chrp_nvram.h" #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" -#include "hw/empty_slot.h" +#include "hw/misc/unimp.h" #include "hw/loader.h" #include "elf.h" #include "trace.h" @@ -863,7 +863,8 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwd= ef, ram_init(0, machine->ram_size, hwdef->max_mem); /* models without ECC don't trap when missing ram is accessed */ if (!hwdef->ecc_base) { - empty_slot_init(machine->ram_size, hwdef->max_mem - machine->ram_s= ize); + create_unimplemented_device("ecc", machine->ram_size, + hwdef->max_mem - machine->ram_size); } =20 prom_init(hwdef->slavio_base, bios_name); @@ -892,9 +893,10 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hw= def, if (hwdef->iommu_pad_base) { /* On the real hardware (SS-5, LX) the MMU is not padded, but alia= sed. Software shouldn't use aliased addresses, neither should it cra= sh - when does. Using empty_slot instead of aliasing can help with - debugging such accesses */ - empty_slot_init(hwdef->iommu_pad_base,hwdef->iommu_pad_len); + when does. Using the 'unimplemented device' instead of aliasing= can + help with debugging such accesses */ + create_unimplemented_device("iommu.alias", hwdef->iommu_pad_base, + hwdef->iommu_pad_len); } =20 sparc32_dma_init(hwdef->dma_base, @@ -944,12 +946,13 @@ static void sun4m_hw_init(const struct sun4m_hwdef *h= wdef, for (i =3D num_vsimms; i < MAX_VSIMMS; i++) { /* vsimm registers probed by OBP */ if (hwdef->vsimm[i].reg_base) { - empty_slot_init(hwdef->vsimm[i].reg_base, 0x2000); + create_unimplemented_device("vsimm", hwdef->vsimm[i].reg_base, + 0x2000); } } =20 if (hwdef->sx_base) { - empty_slot_init(hwdef->sx_base, 0x2000); + create_unimplemented_device("sx", hwdef->sx_base, 0x2000); } =20 nvram =3D m48t59_init(slavio_irq[0], hwdef->nvram_base, 0, 0x2000, 196= 8, 8); @@ -1012,14 +1015,15 @@ static void sun4m_hw_init(const struct sun4m_hwdef = *hwdef, if (hwdef->dbri_base) { /* ISDN chip with attached CS4215 audio codec */ /* prom space */ - empty_slot_init(hwdef->dbri_base+0x1000, 0x30); + create_unimplemented_device("dbri.prom", hwdef->dbri_base + 0x1000, + 0x30); /* reg space */ - empty_slot_init(hwdef->dbri_base+0x10000, 0x100); + create_unimplemented_device("dbri", hwdef->dbri_base + 0x10000, 0x= 100); } =20 if (hwdef->bpp_base) { /* parallel port */ - empty_slot_init(hwdef->bpp_base, 0x20); + create_unimplemented_device("bpp", hwdef->bpp_base, 0x20); } =20 kernel_size =3D sun4m_load_kernel(machine->kernel_filename, --=20 2.19.0