qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 2/5] Implement i.MX31 Clock Control Module


From: Peter Chubb
Subject: Re: [Qemu-devel] [PATCH v6 2/5] Implement i.MX31 Clock Control Module
Date: Tue, 24 Apr 2012 06:54:32 +1000
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

>>>>> "Peter" == Peter Maydell <address@hidden> writes:

Peter> On 23 April 2012 00:31, Peter Chubb <address@hidden>
Peter> wrote:

Peter> Rather than having the *_clk_freq saved and loaded in the
Peter> vmstate, I think it would be nicer to have a post-load-hook
Peter> that called update_clocks().

OK.


>>    /* mfn is 10-bit signed twos-complement */ 
>> +    mfn -= (mfn & 0x200);

Peter> What is this calculation supposed to do? It doesn't convert a
Peter> 10-bit signed twos-complement number into an int32_t, unless
Peter> I'm confused... Also, it's a rather opaque way to write "mfn &=
Peter> 0x200;".

I'll use a different way to calculate.  Maybe:
     mfn <<= (32-10);
     mfn >>= (32-10);

Peter C
--
Dr Peter Chubb                                  peter.chubb AT nicta.com.au
http://www.ssrg.nicta.com.au          Software Systems Research Group/NICTA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]