Received: from eggs.gnu.org ([2001:4830:134:3::10]:47082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrmLk-0006qm-RS for qemu-devel@nongnu.org; Mon, 11 May 2015 07:58:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrmLf-0001S6-E0 for qemu-devel@nongnu.org; Mon, 11 May 2015 07:58:20 -0400 Received: from 212-4-128-36.cust.selfnet.cz ([212.4.128.36]:59626 helo=workimage.brq.redhat.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrmLf-0001RU-7W for qemu-devel@nongnu.org; Mon, 11 May 2015 07:58:15 -0400 Date: Mon, 11 May 2015 11:36:43 +0200 From: Miroslav Rezanina Message-ID: <20150511093643.GB26672@lws.brq.redhat.com> References: <1431322734-12520-1-git-send-email-mrezanin@redhat.com> <55506AE4.8030902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55506AE4.8030902@redhat.com> Subject: Re: [Qemu-devel] [PATCHv2] parallel: Allow to disable CONFIG_PARALLEL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: thuth@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com On Mon, May 11, 2015 at 10:40:04AM +0200, Paolo Bonzini wrote: > > > On 11/05/2015 07:38, mrezanin@redhat.com wrote: > > From: Miroslav Rezanina > > > > Disabling CONFIG_PARALLEL cause build failure as commit 07dc788 factored > > out initialization to parallel_hds_isa_init function in hw/char/parallel.c > > that is not build. > > > > Stub file is added to be able to disable CONFIG_PARALLEL. This file is used > > in targets using parallel_hds_isa_init and provide empty definition of this > > function. > > > > Signed-off-by: Miroslav Rezanina > > This patch will make "-parallel" a nop. The right thing to do is to > fail startup whenever -parallel is passed and CONFIG_PARALLEL is disabled. > This was original behavior before 07dc788. Intention of this patch is to make qemu buildable with CONFIG_PARALLEL disabled. > You can move parallel_hds_isa_init and parallel_init to > hw/isa/isa-bus.c, or to a new file hw/isa/isa-devices.c. > Moving functions will cause abort with "Unknown device" error. > Paolo > > > --- > > hw/i386/Makefile.objs | 1 + > > hw/mips/Makefile.objs | 2 ++ > > hw/sparc64/Makefile.objs | 2 ++ > > stubs/parallel-stub.c | 7 +++++++ > > 4 files changed, 12 insertions(+) > > create mode 100644 stubs/parallel-stub.c > > > > diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs > > index e058a39..2b7131a 100644 > > --- a/hw/i386/Makefile.objs > > +++ b/hw/i386/Makefile.objs > > @@ -4,6 +4,7 @@ obj-y += pc.o pc_piix.o pc_q35.o > > obj-y += pc_sysfw.o > > obj-y += intel_iommu.o > > obj-$(CONFIG_XEN) += ../xenpv/ xen/ > > +obj-$(call lnot,$(CONFIG_PARALLEL)) += ../../stubs/parallel-stub.o > > > > obj-y += kvmvapic.o > > obj-y += acpi-build.o > > diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs > > index 0a652f8..2e65305 100644 > > --- a/hw/mips/Makefile.objs > > +++ b/hw/mips/Makefile.objs > > @@ -2,3 +2,5 @@ obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o > > obj-y += addr.o cputimer.o mips_int.o > > obj-$(CONFIG_FULONG) += mips_fulong2e.o > > obj-y += gt64xxx_pci.o > > +obj-$(call lnot,$(CONFIG_PARALLEL)) += ../../stubs/parallel-stub.o > > + > > diff --git a/hw/sparc64/Makefile.objs b/hw/sparc64/Makefile.objs > > index a84cfe3..7696611 100644 > > --- a/hw/sparc64/Makefile.objs > > +++ b/hw/sparc64/Makefile.objs > > @@ -1 +1,3 @@ > > obj-y += sun4u.o > > +obj-$(call lnot,$(CONFIG_PARALLEL)) += ../../stubs/parallel-stub.o > > + > > diff --git a/stubs/parallel-stub.c b/stubs/parallel-stub.c > > new file mode 100644 > > index 0000000..949c1b2 > > --- /dev/null > > +++ b/stubs/parallel-stub.c > > @@ -0,0 +1,7 @@ > > +#include "qemu/typedefs.h" > > +#include "hw/isa/isa.h" > > +#include "hw/i386/pc.h" > > + > > +void parallel_hds_isa_init(ISABus *bus, int n) > > +{ > > +} > >