From patchwork Fri Feb 15 11:45:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14842 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D990623FD6 for ; Fri, 15 Feb 2013 11:45:11 +0000 (UTC) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by fiordland.canonical.com (Postfix) with ESMTP id 918A2A18892 for ; Fri, 15 Feb 2013 11:45:11 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id fs19so2108132vbb.30 for ; Fri, 15 Feb 2013 03:45:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=Lk7TV+VxKlNrrUryl5/0fbLz+vN8aD3giKncefJYjAc=; b=KN/pfqA0SPVxJ2ihm64mpNIpMjurun4PXhkwf9kP6J+1V911eFty0qOqs8S3hXbi/i rp6Ym/tUXHdlLOsYhsJsI/9Z9oz0of8ro19q0hj1Ix78p4zs8mHKNPhIaJFD31hbaZuk yn9qTEHKE3rWBVunOjTEKiVB2MH8GdkLMbL+uQgFznunV9tj096/aRPEYekWfMijyTeV iMR9DnjyoLOQRg1OKEjTFp4bKCRNmVY4jij5Wz7HkwYMNEmavpy6vV2AcxK+GKYPGKtC gIulkIq3R35+UI7UYY7c54jpGPqIG3FCPP3FKp62dOt0Z/cKM4e+iUab1UAPPG0bDjwU rv7Q== X-Received: by 10.52.175.66 with SMTP id by2mr2414747vdc.53.1360928711045; Fri, 15 Feb 2013 03:45:11 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.221.4.5 with SMTP id oa5csp8007vcb; Fri, 15 Feb 2013 03:45:10 -0800 (PST) X-Received: by 10.204.147.145 with SMTP id l17mr670416bkv.100.1360928708771; Fri, 15 Feb 2013 03:45:08 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id jd3si39217981bkc.164.2013.02.15.03.45.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 15 Feb 2013 03:45:08 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1U6Jj0-0003Ow-HY; Fri, 15 Feb 2013 11:45:06 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Michael Walle , Jan Kiszka Subject: [PATCH 5/5] sysbus: Remove sysbus_add_memory and sysbus_del_memory Date: Fri, 15 Feb 2013 11:45:06 +0000 Message-Id: <1360928706-13041-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1360928706-13041-1-git-send-email-peter.maydell@linaro.org> References: <1360928706-13041-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQki1v3jxdG07eBWuV9krf3oA7gdChff1yCHCf8xiRl86hkpUq01znndZ+Ku9LtXIXOqcvzg Remove the sysbus_add_memory and sysbus_del_memory functions. These are trivial wrappers for mapping a memory region into the system memory space, and have no users now. Sysbus devices should never map their own memory regions anyway; the correct API for mapping an mmio region is for the creator of the device to use sysbus_mmio_map. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber --- hw/sysbus.c | 18 ------------------ hw/sysbus.h | 5 ----- 2 files changed, 23 deletions(-) diff --git a/hw/sysbus.c b/hw/sysbus.c index e9a16ac..980f31c 100644 --- a/hw/sysbus.c +++ b/hw/sysbus.c @@ -217,24 +217,6 @@ static char *sysbus_get_fw_dev_path(DeviceState *dev) return g_strdup(path); } -void sysbus_add_memory(SysBusDevice *dev, hwaddr addr, - MemoryRegion *mem) -{ - memory_region_add_subregion(get_system_memory(), addr, mem); -} - -void sysbus_add_memory_overlap(SysBusDevice *dev, hwaddr addr, - MemoryRegion *mem, unsigned priority) -{ - memory_region_add_subregion_overlap(get_system_memory(), addr, mem, - priority); -} - -void sysbus_del_memory(SysBusDevice *dev, MemoryRegion *mem) -{ - memory_region_del_subregion(get_system_memory(), mem); -} - void sysbus_add_io(SysBusDevice *dev, hwaddr addr, MemoryRegion *mem) { diff --git a/hw/sysbus.h b/hw/sysbus.h index a7fcded..25c3ff2 100644 --- a/hw/sysbus.h +++ b/hw/sysbus.h @@ -56,11 +56,6 @@ void sysbus_init_ioports(SysBusDevice *dev, pio_addr_t ioport, pio_addr_t size); void sysbus_connect_irq(SysBusDevice *dev, int n, qemu_irq irq); void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr); -void sysbus_add_memory(SysBusDevice *dev, hwaddr addr, - MemoryRegion *mem); -void sysbus_add_memory_overlap(SysBusDevice *dev, hwaddr addr, - MemoryRegion *mem, unsigned priority); -void sysbus_del_memory(SysBusDevice *dev, MemoryRegion *mem); void sysbus_add_io(SysBusDevice *dev, hwaddr addr, MemoryRegion *mem); void sysbus_del_io(SysBusDevice *dev, MemoryRegion *mem);