From nobody Wed Nov 5 23:44:29 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 1538432689205384.71981841323736; Mon, 1 Oct 2018 15:24:49 -0700 (PDT) Received: from localhost ([::1]:40934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76cS-0000Al-1j for importer@patchew.org; Mon, 01 Oct 2018 18:24:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76XR-000442-Bb 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-0007RY-Ij for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:31 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:43489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g76Oc-0007Np-7C for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:30 -0400 Received: by mail-wr1-x444.google.com with SMTP id n1-v6so5502724wrt.10 for ; Mon, 01 Oct 2018 15:10:17 -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.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 15:10:15 -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=Ab1RF85KO97chDtaADEve8jBUgos4p8KjNxdBKBchjs=; b=Ue14AnFC6/fIrPvYS1Q3DOPl74dgzjD+D4w4lZs0rMPy4OrRc739pCmqT1E2YiJAIh qIlXyMvPrGJju+Pu6vHCnsHQltph/CFhMJLB1T7vRqSKGF2zqoa4tUlXd49KFxmZR2YE 3oi/hj3/7XfrQeXdniDLPeujUP2vr86qEg0zAvOHUdbJM5rEtPcxv6R+W4vhlyWIiUOe k5vhIyN6jdt2Kf1su4XRM6gsLxpedCEYFBhUrxUo6GsaN4CkjEE4Qs2NwXFLedaFBvmB 5jske3kRsOVP9P5GHmxzawv/E1JBVNb0gp9nIaCe43CIodHUB1G6rZJmq3UgCS5nQu22 ZTHg== 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=Ab1RF85KO97chDtaADEve8jBUgos4p8KjNxdBKBchjs=; b=gLOmEnTuU3qi7T3YGPNQhHZjEZUJGw+dXcAvK1qY6iN6JR82SZcLRoFnvj+YLpXOG2 cP65YvVnWigcZ14jhmnfW5DaCcVTaNxyciAS6M0S2lmddOSVxHPQyRSk/ix4sbpWNPKE w/JgXLKDkUhX8Mz0xSSMzfCvDNS93ymIrMOgTsYL9d8bcMnj2WB4lUMQvdYv0lCjbloT hb5UDnam/PuyBPUq8j6eGI7BMQGvfto0hBBSDvFRCoKcf8Y3HRrHY8JJxR5LnZGaAV9P GdrGRoH/6ycVfBvwRCXlONmpe+9J3KvHCKSArhBPx1eR1xYEuIMuTYfTbEA0m50KrdLR Xytw== X-Gm-Message-State: ABuFfohs1vwhJod6SMeS+ir031kUIQdYrB4Nm9MNspwVIGKchVbsLFnq ZB4u/2TaZDTChDYhx7j3qbHmW9qS X-Google-Smtp-Source: ACcGV60pYR1xZTR/p06vB+z5EOF49FJNpDZsO9E2kxb0dfYc6QIcFac73B0A0g4XGnKOikT4DtavDg== X-Received: by 2002:adf:b71d:: with SMTP id l29-v6mr9021255wre.115.1538431816298; Mon, 01 Oct 2018 15:10:16 -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:39 +0200 Message-Id: <20181001220942.2382-13-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::444 Subject: [Qemu-devel] [PATCH 12/15] hw/core: Remove the 'empty_slot' 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: =?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 All previous users of TYPE_EMPTY_SLOT now use TYPE_UNIMPLEMENTED_DEVICE. Since TYPE_EMPTY_SLOT is no more used/referenced, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/empty_slot.h | 7 --- hw/core/empty_slot.c | 103 ---------------------------------------- hw/core/Makefile.objs | 1 - 3 files changed, 111 deletions(-) delete mode 100644 include/hw/empty_slot.h delete mode 100644 hw/core/empty_slot.c diff --git a/include/hw/empty_slot.h b/include/hw/empty_slot.h deleted file mode 100644 index 123a9f8989..0000000000 --- a/include/hw/empty_slot.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef HW_EMPTY_SLOT_H -#define HW_EMPTY_SLOT_H - -/* empty_slot.c */ -void empty_slot_init(hwaddr addr, uint64_t slot_size); - -#endif diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c deleted file mode 100644 index c1b9c2b104..0000000000 --- a/hw/core/empty_slot.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * QEMU Empty Slot - * - * The empty_slot device emulates known to a bus but not connected devices. - * - * Copyright (c) 2010 Artyom Tarasenko - * - * This code is licensed under the GNU GPL v2 or (at your option) any later - * version. - */ - -#include "qemu/osdep.h" -#include "hw/hw.h" -#include "hw/sysbus.h" -#include "hw/empty_slot.h" - -//#define DEBUG_EMPTY_SLOT - -#ifdef DEBUG_EMPTY_SLOT -#define DPRINTF(fmt, ...) \ - do { printf("empty_slot: " fmt , ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) do {} while (0) -#endif - -#define TYPE_EMPTY_SLOT "empty_slot" -#define EMPTY_SLOT(obj) OBJECT_CHECK(EmptySlot, (obj), TYPE_EMPTY_SLOT) - -typedef struct EmptySlot { - SysBusDevice parent_obj; - - MemoryRegion iomem; - uint64_t size; -} EmptySlot; - -static uint64_t empty_slot_read(void *opaque, hwaddr addr, - unsigned size) -{ - DPRINTF("read from " TARGET_FMT_plx "\n", addr); - return 0; -} - -static void empty_slot_write(void *opaque, hwaddr addr, - uint64_t val, unsigned size) -{ - DPRINTF("write 0x%x to " TARGET_FMT_plx "\n", (unsigned)val, addr); -} - -static const MemoryRegionOps empty_slot_ops =3D { - .read =3D empty_slot_read, - .write =3D empty_slot_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, -}; - -void empty_slot_init(hwaddr addr, uint64_t slot_size) -{ - if (slot_size > 0) { - /* Only empty slots larger than 0 byte need handling. */ - DeviceState *dev; - SysBusDevice *s; - EmptySlot *e; - - dev =3D qdev_create(NULL, TYPE_EMPTY_SLOT); - s =3D SYS_BUS_DEVICE(dev); - e =3D EMPTY_SLOT(dev); - e->size =3D slot_size; - - qdev_init_nofail(dev); - - sysbus_mmio_map(s, 0, addr); - } -} - -static int empty_slot_init1(SysBusDevice *dev) -{ - EmptySlot *s =3D EMPTY_SLOT(dev); - - memory_region_init_io(&s->iomem, OBJECT(s), &empty_slot_ops, s, - "empty-slot", s->size); - sysbus_init_mmio(dev, &s->iomem); - return 0; -} - -static void empty_slot_class_init(ObjectClass *klass, void *data) -{ - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); - - k->init =3D empty_slot_init1; -} - -static const TypeInfo empty_slot_info =3D { - .name =3D TYPE_EMPTY_SLOT, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(EmptySlot), - .class_init =3D empty_slot_class_init, -}; - -static void empty_slot_register_types(void) -{ - type_register_static(&empty_slot_info); -} - -type_init(empty_slot_register_types) diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index eb88ca979e..fd75172a21 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -8,7 +8,6 @@ common-obj-y +=3D irq.o common-obj-y +=3D hotplug.o common-obj-$(CONFIG_SOFTMMU) +=3D nmi.o =20 -common-obj-$(CONFIG_EMPTY_SLOT) +=3D empty_slot.o common-obj-$(CONFIG_XILINX_AXI) +=3D stream.o common-obj-$(CONFIG_PTIMER) +=3D ptimer.o common-obj-$(CONFIG_SOFTMMU) +=3D sysbus.o --=20 2.19.0