From patchwork Fri Mar 15 14:34:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15381 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 17EBD23E14 for ; Fri, 15 Mar 2013 14:34:33 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by fiordland.canonical.com (Postfix) with ESMTP id A40A9A1901E for ; Fri, 15 Mar 2013 14:34:32 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so2675136veb.9 for ; Fri, 15 Mar 2013 07:34:32 -0700 (PDT) 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=hW2aNKlTCkRoe3NsWs82yK0Jopc3T7h9lra9evzuJG0=; b=A240vzzWuO+Wmgs8yXg/CMx2qOO4Ce1y+Z3jR3FMJuevZZwHnqU2uK8N4wT7Kt4d2t FD+pwaRMOyI3XPOkzMgtrw1gCVWoGqbDcqHmN1D7024tt5ehmo4lEwh8bhxlDw2BsDQD huOiqcSWOg7tjZ77+S0/QyFASIR59mb4wflo1yITNUWiUvDCyBJevERYO8uj26e9hOUS /rilM6hAwN9n9jFWhoRaR7N7aHIT2zWTTsJn5HF0v0ovadMhcu0h6TJDinBUDpKLXt8z TbD/or1zVPAfbRc/+lCr2FE6w4e6GnLhDYu7Uc5Jm+MLQOrgOryXBnbSZxBVvgyvf5vh 89YQ== X-Received: by 10.58.205.179 with SMTP id lh19mr7289373vec.7.1363358072177; Fri, 15 Mar 2013 07:34:32 -0700 (PDT) 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.127.98 with SMTP id nf2csp123175veb; Fri, 15 Mar 2013 07:34:31 -0700 (PDT) X-Received: by 10.180.109.82 with SMTP id hq18mr3482362wib.0.1363358067991; Fri, 15 Mar 2013 07:34:27 -0700 (PDT) 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 g1si11762565eem.17.2013.03.15.07.34.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 15 Mar 2013 07:34:27 -0700 (PDT) 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 1UGViB-0006FG-Qi; Fri, 15 Mar 2013 14:34:23 +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 v3 5/5] sysbus: Remove sysbus_add_memory and sysbus_del_memory Date: Fri, 15 Mar 2013 14:34:23 +0000 Message-Id: <1363358063-23973-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1363358063-23973-1-git-send-email-peter.maydell@linaro.org> References: <1363358063-23973-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmBjtxkva4UX3m3bTDZjpJvJDEnAF4YMTtkrIW0EeYc0dlW/pIw+PfNPbfL0rlcwJj7Sevk 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 9a19468..9004d8c 100644 --- a/hw/sysbus.c +++ b/hw/sysbus.c @@ -236,24 +236,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 5d90a52..7c2e316 100644 --- a/hw/sysbus.h +++ b/hw/sysbus.h @@ -58,11 +58,6 @@ void sysbus_connect_irq(SysBusDevice *dev, int n, qemu_irq irq); void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr); void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr, unsigned priority); -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);