From patchwork Mon Oct 17 19:38:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 9380457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46DEF60487 for ; Mon, 17 Oct 2016 20:07:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A3DE28D2C for ; Mon, 17 Oct 2016 20:07:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E7A928E02; Mon, 17 Oct 2016 20:07:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9394128D2C for ; Mon, 17 Oct 2016 20:07:11 +0000 (UTC) Received: from localhost ([::1]:35635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwEBi-00014E-NZ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 17 Oct 2016 16:07:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwDkV-0001Te-SZ for qemu-devel@nongnu.org; Mon, 17 Oct 2016 15:39:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwDkU-0007xB-W1 for qemu-devel@nongnu.org; Mon, 17 Oct 2016 15:39:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59444) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwDkS-0007v9-FQ; Mon, 17 Oct 2016 15:39:00 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB2D44E4D7; Mon, 17 Oct 2016 19:38:59 +0000 (UTC) Received: from localhost.redhat.com (vpn1-5-170.ams2.redhat.com [10.36.5.170]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9HJcVFZ009529; Mon, 17 Oct 2016 15:38:56 -0400 From: Eric Auger To: eric.auger@redhat.com, eric.auger.pro@gmail.com, peter.maydell@linaro.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, pranav.sawargaonkar@gmail.com Date: Mon, 17 Oct 2016 19:38:28 +0000 Message-Id: <1476733110-14293-7-git-send-email-eric.auger@redhat.com> In-Reply-To: <1476733110-14293-1-git-send-email-eric.auger@redhat.com> References: <1476733110-14293-1-git-send-email-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 17 Oct 2016 19:38:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v5 6/8] hw: platform-bus: Add platform bus stub 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: diana.craciun@freescale.com, Bharat.Bhushan@freescale.com, drjones@redhat.com, christoffer.dall@linaro.org, fkan@apm.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP platform_bus_map_region is bound to be called in VFIO common code. Let's compile this stub in case CONFIG_SOFTMMU is set (VFIO requirement) and CONFIG_PLATFORM_BUS is not set. Signed-off-by: Eric Auger --- hw/core/Makefile.objs | 2 +- hw/core/platform-bus-stub.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 hw/core/platform-bus-stub.c diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index a4c94e5..f6ececc 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -18,5 +18,5 @@ common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_SOFTMMU) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o - +common-obj-$(call land,$(CONFIG_SOFTMMU),$(call lnot,$(CONFIG_PLATFORM_BUS))) += platform-bus-stub.o obj-$(CONFIG_SOFTMMU) += generic-loader.o diff --git a/hw/core/platform-bus-stub.c b/hw/core/platform-bus-stub.c new file mode 100644 index 0000000..41d4ab6 --- /dev/null +++ b/hw/core/platform-bus-stub.c @@ -0,0 +1,27 @@ +/* + * Platform Bus device stub + * + * platform_bus_map_region is used in VFIO common code + * + * Copyright Red Hat, Inc. 2016 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/platform-bus.h" + +void platform_bus_map_region(PlatformBusDevice *pbus, MemoryRegion *mr) +{ +}