[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Implement the global timer present in ARM MPCor
From: |
Christopher Harvey |
Subject: |
Re: [Qemu-devel] [PATCH] Implement the global timer present in ARM MPCore chips. |
Date: |
Thu, 7 Jul 2011 13:15:00 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jul 06, 2011 at 10:58:09PM +0100, Peter Maydell wrote:
> On 6 July 2011 21:04, Christopher Harvey <address@hidden> wrote:
>
> Below are some random comments noticed on a first-pass.
>
> > +/* Global timer data */
> > +static uint64_t global_timer_count = 0;
> > +static uint64_t global_timer_this_inc = 0;
> > + ??/* Only for prescale and enable bits */
> > +static uint32_t global_timer_control = 0;
>
> Static globals look like the wrong thing to me.
>
My C code design is pretty bad. I generally just try to copy the style
around what I'm editing. These variables are to be used exclusively
inside hw/mpcore.c and are referenced in many of the functions. How
would you change this code?
thanks,
-Chris