qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Miroslav Rezanina <mrezanin@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: thuth@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv2] parallel: Allow to disable CONFIG_PARALLEL
Date: Mon, 11 May 2015 09:02:22 +0200	[thread overview]
Message-ID: <20150511070222.GA2655@lws.brq.redhat.com> (raw)
In-Reply-To: <87bnhry5l0.fsf@blackfin.pond.sub.org>

On Mon, May 11, 2015 at 08:46:19AM +0200, Markus Armbruster wrote:
> mrezanin@redhat.com writes:
> 
> > From: Miroslav Rezanina <mrezanin@redhat.com>
> >
> > 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 <mrezanin@redhat.com>
> >
> > ---
> >  hw/i386/Makefile.objs    | 1 +
> >  hw/mips/Makefile.objs    | 2 ++
> >  hw/sparc64/Makefile.objs | 2 ++
> >  stubs/parallel-stub.c    | 7 +++++++
> 
> Nitpick: the existing stub/*.c naming practice suggests
> stubs/parallel.c.

Yeah...I forget to rename it after moving from repository
root to stub directory. I originally have it in repository
root as it is not included in libqemustub. So the naming can
be treated as hint that something is different. However,
I can rename it to follow stubs/* naming.
> 
> >  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
> 
> Can we rely on the linker to pull parallel-stub.o from a suitable .a
> libqemustub.a when needed?

We do not have to as parallel-stub.o is not included in libqemustub.a.
It is linked directly in case CONFIG_PARALLEL is not defined (for
targets using parallel_hds_isa_init).

Mirek

> 
> > 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)
> > +{
> > +}

  reply	other threads:[~2015-05-11 11:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11  5:38 [Qemu-devel] [PATCHv2] parallel: Allow to disable CONFIG_PARALLEL mrezanin
2015-05-11  6:46 ` Markus Armbruster
2015-05-11  7:02   ` Miroslav Rezanina [this message]
2015-05-11 15:10     ` Markus Armbruster
2015-05-11  8:40 ` Paolo Bonzini
2015-05-11  9:36   ` Miroslav Rezanina
2015-05-11 10:11     ` Paolo Bonzini
2015-05-11 15:52       ` Markus Armbruster
2015-05-11 16:01         ` Paolo Bonzini
2015-05-11 16:34         ` Peter Maydell
2015-05-11 15:09 ` Markus Armbruster
2015-05-11 16:20   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150511070222.GA2655@lws.brq.redhat.com \
    --to=mrezanin@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).