All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xen-staging] [xen-unstable] [ioemu] Update to qemu 0.90.
       [not found] <200705091318.l49DINUx021283@latara.uk.xensource.com>
@ 2007-05-09 17:13 ` Alex Williamson
  2007-05-09 21:16   ` Christian Limpach
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2007-05-09 17:13 UTC (permalink / raw)
  To: xen-devel; +Cc: Christian Limpach

On Wed, 2007-05-09 at 14:18 +0100, Xen staging patchbot-unstable wrote:
> # HG changeset patch
> # User Christian Limpach <Christian.Limpach@xensource.com>
> # Date 1178716635 -3600
> # Node ID 00618037d37d04e614080d3067cc5ba6b1b1ef9e
> # Parent  d2ef85c6bf84cc619ca2d42c2edfc6229e70a6ad
> [ioemu] Update to qemu 0.90.

This chunk doesn't build:

> --- a/tools/ioemu/hw/mc146818rtc.c	Wed Jul 12 19:16:10 2006 +0100
> +++ b/tools/ioemu/hw/mc146818rtc.c	Wed May 09 14:17:15 2007 +0100
> @@ -403,6 +403,30 @@ void rtc_set_date(RTCState *s, const str
>      rtc_copy_date(s);
>  }
>  
> +/* PC cmos mappings */
> +#define REG_IBM_CENTURY_BYTE        0x32
> +#define REG_IBM_PS2_CENTURY_BYTE    0x37
> +
> +void rtc_set_date_from_host(RTCState *s)
> +{
> +    time_t ti;
> +    struct tm *tm;
> +    int val;
> +
> +    /* set the CMOS date */
> +    time(&ti);
> +    ti += timeoffset;
> +    if (rtc_utc)
> +        tm = gmtime(&ti);

/home/xenbuild/xen-staging-build/tmp-xen-unstable.hg/tools/ioemu/hw/mc146818rtc.c:418: error: ‘timeoffset’ undeclared (first use in this function)

I think the following patch is needed:

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---

diff -r 8df600f56acd tools/ioemu/hw/mc146818rtc.c
--- a/tools/ioemu/hw/mc146818rtc.c	Wed May 09 15:31:37 2007 +0100
+++ b/tools/ioemu/hw/mc146818rtc.c	Wed May 09 10:55:30 2007 -0600
@@ -412,6 +412,7 @@ void rtc_set_date_from_host(RTCState *s)
     time_t ti;
     struct tm *tm;
     int val;
+    extern time_t timeoffset;
 
     /* set the CMOS date */
     time(&ti);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Xen-staging] [xen-unstable] [ioemu] Update to qemu 0.90.
  2007-05-09 17:13 ` [Xen-staging] [xen-unstable] [ioemu] Update to qemu 0.90 Alex Williamson
@ 2007-05-09 21:16   ` Christian Limpach
  2007-05-09 21:33     ` Alex Williamson
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Limpach @ 2007-05-09 21:16 UTC (permalink / raw)
  To: Alex Williamson, xen-devel

> This chunk doesn't build:

Fixed.  Sorry about that.

I'll probably remove all the -timeoffset stuff in the next couple of
days since it doesn't really work, at least not on x86.  And there's
rtc/timeoffset in xenstore which is more flexible, does that work for
ia64?  Or do you need to change timeoffset_get to change the rtc state
in qemu instead of using xc_domain_set_time_offset?

    christian

> 
> > --- a/tools/ioemu/hw/mc146818rtc.c	Wed Jul 12 19:16:10 2006 +0100
> > +++ b/tools/ioemu/hw/mc146818rtc.c	Wed May 09 14:17:15 2007 +0100
> > @@ -403,6 +403,30 @@ void rtc_set_date(RTCState *s, const str
> >      rtc_copy_date(s);
> >  }
> >  
> > +/* PC cmos mappings */
> > +#define REG_IBM_CENTURY_BYTE        0x32
> > +#define REG_IBM_PS2_CENTURY_BYTE    0x37
> > +
> > +void rtc_set_date_from_host(RTCState *s)
> > +{
> > +    time_t ti;
> > +    struct tm *tm;
> > +    int val;
> > +
> > +    /* set the CMOS date */
> > +    time(&ti);
> > +    ti += timeoffset;
> > +    if (rtc_utc)
> > +        tm = gmtime(&ti);
> 
> /home/xenbuild/xen-staging-build/tmp-xen-unstable.hg/tools/ioe
> mu/hw/mc146818rtc.c:418: error: 'timeoffset' undeclared 
> (first use in this function)
> 
> I think the following patch is needed:
> 
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
> ---
> 
> diff -r 8df600f56acd tools/ioemu/hw/mc146818rtc.c
> --- a/tools/ioemu/hw/mc146818rtc.c	Wed May 09 15:31:37 2007 +0100
> +++ b/tools/ioemu/hw/mc146818rtc.c	Wed May 09 10:55:30 2007 -0600
> @@ -412,6 +412,7 @@ void rtc_set_date_from_host(RTCState *s)
>      time_t ti;
>      struct tm *tm;
>      int val;
> +    extern time_t timeoffset;
>  
>      /* set the CMOS date */
>      time(&ti);
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Xen-staging] [xen-unstable] [ioemu] Update to qemu 0.90.
  2007-05-09 21:16   ` Christian Limpach
@ 2007-05-09 21:33     ` Alex Williamson
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2007-05-09 21:33 UTC (permalink / raw)
  To: Christian Limpach; +Cc: xen-devel, xen-ia64-devel

On Wed, 2007-05-09 at 14:16 -0700, Christian Limpach wrote:
> > This chunk doesn't build:
> 
> Fixed.  Sorry about that.

Thanks!

> I'll probably remove all the -timeoffset stuff in the next couple of
> days since it doesn't really work, at least not on x86.  And there's
> rtc/timeoffset in xenstore which is more flexible, does that work for
> ia64?  Or do you need to change timeoffset_get to change the rtc state
> in qemu instead of using xc_domain_set_time_offset?

   I hope so, but CC'ing the xen-ia64 list for some folks who have spent
more time in the qemu plumbing.  Thanks,

	Alex

> > > --- a/tools/ioemu/hw/mc146818rtc.c	Wed Jul 12 19:16:10 2006 +0100
> > > +++ b/tools/ioemu/hw/mc146818rtc.c	Wed May 09 14:17:15 2007 +0100
> > > @@ -403,6 +403,30 @@ void rtc_set_date(RTCState *s, const str
> > >      rtc_copy_date(s);
> > >  }
> > >  
> > > +/* PC cmos mappings */
> > > +#define REG_IBM_CENTURY_BYTE        0x32
> > > +#define REG_IBM_PS2_CENTURY_BYTE    0x37
> > > +
> > > +void rtc_set_date_from_host(RTCState *s)
> > > +{
> > > +    time_t ti;
> > > +    struct tm *tm;
> > > +    int val;
> > > +
> > > +    /* set the CMOS date */
> > > +    time(&ti);
> > > +    ti += timeoffset;
> > > +    if (rtc_utc)
> > > +        tm = gmtime(&ti);
> > 
> > /home/xenbuild/xen-staging-build/tmp-xen-unstable.hg/tools/ioe
> > mu/hw/mc146818rtc.c:418: error: 'timeoffset' undeclared 
> > (first use in this function)
> > 
> > I think the following patch is needed:
> > 
> > Signed-off-by: Alex Williamson <alex.williamson@hp.com>
> > ---
> > 
> > diff -r 8df600f56acd tools/ioemu/hw/mc146818rtc.c
> > --- a/tools/ioemu/hw/mc146818rtc.c	Wed May 09 15:31:37 2007 +0100
> > +++ b/tools/ioemu/hw/mc146818rtc.c	Wed May 09 10:55:30 2007 -0600
> > @@ -412,6 +412,7 @@ void rtc_set_date_from_host(RTCState *s)
> >      time_t ti;
> >      struct tm *tm;
> >      int val;
> > +    extern time_t timeoffset;
> >  
> >      /* set the CMOS date */
> >      time(&ti);
> > 
> > 
> > 
> 
-- 
Alex Williamson                             HP Open Source & Linux Org.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-09 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200705091318.l49DINUx021283@latara.uk.xensource.com>
2007-05-09 17:13 ` [Xen-staging] [xen-unstable] [ioemu] Update to qemu 0.90 Alex Williamson
2007-05-09 21:16   ` Christian Limpach
2007-05-09 21:33     ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.