From: "Michael S. Tsirkin" <mst@redhat.com>
To: mrezanin@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Move hpet_find function from hpet.c to pc.c
Date: Thu, 12 Dec 2013 16:08:11 +0200 [thread overview]
Message-ID: <20131212140811.GD319@redhat.com> (raw)
In-Reply-To: <1386763177-23036-1-git-send-email-mrezanin@redhat.com>
On Wed, Dec 11, 2013 at 12:59:37PM +0100, mrezanin@redhat.com wrote:
> From: Miroslav Rezanina <mrezanin@redhat.com>
>
> Function hpet_find could not be used for checking hpet availability becouse
> it was not build when hpet was disabled.
>
> To allow proper use of this function, moving it from hw/timer/hpet.c to
> hw/i386/pc.c.
>
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
I fixed this already in a different way,
just making the function inline.
See
[PULL 27/28] hpet: fix build with CONFIG_HPET off
> ---
> hw/i386/pc.c | 5 +++++
> hw/timer/hpet.c | 5 -----
> include/hw/i386/pc.h | 2 ++
> include/hw/timer/hpet.h | 1 -
> 4 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 12c436e..7fd08dd 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1403,3 +1403,8 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name)
> gsi_state->ioapic_irq[i] = qdev_get_gpio_in(dev, i);
> }
> }
> +
> +bool hpet_find(void)
> +{
> + return object_resolve_path_type("", "hpet", NULL);
> +}
> diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
> index 2eb75ea..fcd22ae 100644
> --- a/hw/timer/hpet.c
> +++ b/hw/timer/hpet.c
> @@ -757,11 +757,6 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
> dc->props = hpet_device_properties;
> }
>
> -bool hpet_find(void)
> -{
> - return object_resolve_path_type("", TYPE_HPET, NULL);
> -}
> -
> static const TypeInfo hpet_device_info = {
> .name = TYPE_HPET,
> .parent = TYPE_SYS_BUS_DEVICE,
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 09652fb..f81b615 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -178,6 +178,8 @@ void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr);
> /* hpet.c */
> extern int no_hpet;
>
> +bool hpet_find(void);
> +
> /* piix_pci.c */
> struct PCII440FXState;
> typedef struct PCII440FXState PCII440FXState;
> diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h
> index ab44bd3..3fae8ad 100644
> --- a/include/hw/timer/hpet.h
> +++ b/include/hw/timer/hpet.h
> @@ -72,5 +72,4 @@ struct hpet_fw_config
>
> extern struct hpet_fw_config hpet_cfg;
>
> -bool hpet_find(void);
> #endif
> --
> 1.8.3.1
>
prev parent reply other threads:[~2013-12-12 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 11:59 [Qemu-devel] [PATCH] Move hpet_find function from hpet.c to pc.c mrezanin
2013-12-12 14:08 ` Michael S. Tsirkin [this message]
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=20131212140811.GD319@redhat.com \
--to=mst@redhat.com \
--cc=mrezanin@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).