From patchwork Mon Feb 25 17:09:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15073 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 AAA9923E24 for ; Mon, 25 Feb 2013 17:09:08 +0000 (UTC) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by fiordland.canonical.com (Postfix) with ESMTP id 5727DA18AB8 for ; Mon, 25 Feb 2013 17:09:08 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id ft2so1803920vbb.37 for ; Mon, 25 Feb 2013 09:09:07 -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:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=qgtXO1SGgk065rG5WyZVWnpMAw3L7X3Z/gCR5/DNXT4=; b=in9oNS9QgrN2FjJOam/jFZbNP0KfgJ1HmYUoe6O6uQO3CJeqCNEBC0kGzv5uIVkmib Y6W8ZCLRezx1q1hJkXXBI0O5uLq9czqEps8W8X7hszc8A1yn9u7I2LZzkh5ngZyPqdGw 76t7HGyOyiTfuB9MeoZRhR19cFSoYIkda4wD7u42IUb4gGF3N07tytfVChnV9Esz37nc CJ3AeLLSn0NSuziYVkLUAw7+uBIj3j3EdbPAFTA4CXN43VqoBD+mLJrpEGmGmPtIuGQl 5xDfA9vmM3yFPHcSOB4kIs2L5k68AirIxRcOK8cR3kSXHoVS6pprxN8nuRnNK2g7j9hl ieGA== X-Received: by 10.52.29.18 with SMTP id f18mr8863337vdh.57.1361812147853; Mon, 25 Feb 2013 09:09:07 -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.58.145.101 with SMTP id st5csp68597veb; Mon, 25 Feb 2013 09:09:06 -0800 (PST) X-Received: by 10.14.207.200 with SMTP id n48mr41085287eeo.4.1361812145949; Mon, 25 Feb 2013 09:09:05 -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 g1si22201268eem.105.2013.02.25.09.09.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Feb 2013 09:09:05 -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 1UA1Xy-0006wH-K4; Mon, 25 Feb 2013 17:09:02 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Michael Walle , Jan Kiszka , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [PATCH v2 5/5] sysbus: Remove sysbus_add_memory and sysbus_del_memory Date: Mon, 25 Feb 2013 17:09:02 +0000 Message-Id: <1361812142-26640-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1361812142-26640-1-git-send-email-peter.maydell@linaro.org> References: <1361812142-26640-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQki7lskJ0Qiue8iWiFpmo2+tLrUZhKnDq+FzGpELRxtRb9pdp0UzOw2RLno3PxgLU42yVY7 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);