From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Wood Scott-B07421" <B07421@freescale.com>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>,
"Bhushan Bharat-R65777" <R65777@freescale.com>
Subject: Re: [Qemu-devel] [PATCH v2]booke: timer: Deactivate timer for target_bit above 61
Date: Mon, 10 Jun 2013 12:20:05 -0500 [thread overview]
Message-ID: <1370884805.18413.8@snotra> (raw)
In-Reply-To: <51B5E20A.8030906@suse.de> (from agraf@suse.de on Mon Jun 10 09:26:18 2013)
On 06/10/2013 09:26:18 AM, Alexander Graf wrote:
> On 06/10/2013 02:47 PM, Bhushan Bharat-R65777 wrote:
>>
>>> -----Original Message-----
>>> From: Andreas Färber [mailto:afaerber@suse.de]
>>> Sent: Monday, June 10, 2013 5:43 PM
>>> To: Bhushan Bharat-R65777
>>> Cc: qemu-ppc@nongnu.org; qemu-devel@nongnu.org; agraf@suse.de; Wood
>>> Scott-
>>> B07421; Bhushan Bharat-R65777
>>> Subject: Re: [Qemu-devel] [PATCH v2]booke: timer: Deactivate timer
>>> for
>>> target_bit above 61
>>>
>>> So IIUC we can only allow 63 bits due to signedness, thus a maximum
>>> of
>>> (1<< 62), thus target_bit<= 61.
>>>
>>> Any chance at least the comment can be worded to explain that any
>>> better? Maybe
>>> also use (target-bit + 1>= 63) or period> INT64_MAX as condition?
>> How about this:
>> /* QEMU timer supports a maximum timer of INT64_MAX
>> (0x7fffffff_ffffffff).
>> * Run booke fit/wdog timer when
>> * ((1ULL<< target_bit + 1)< 0x40000000_00000000), i.e
>> target_bit = 61.
>> * Also the time with this maximum target_bit (with current
>> range of
>> * CPU frequency PowerPC supports) will be many many years. So
>> it is
>> * pretty safe to stop the timer above this threshold. */
>
> How about
>
> /* This timeout will take years to trigger. Treat the timer as
> disabled. */
There should be at least a brief mention that it's because the QEMU
timer can't handle larger values, with the detailed explanation in the
changelog. A better lower bound on the number of years would be nice
as well (e.g. "hundreds of years").
-Scott
next prev parent reply other threads:[~2013-06-10 17:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 7:55 [Qemu-devel] [PATCH v2]booke: timer: Deactivate timer for target_bit above 61 Bharat Bhushan
2013-06-10 9:26 ` Peter Maydell
2013-06-10 9:53 ` Bhushan Bharat-R65777
2013-06-10 12:13 ` Andreas Färber
2013-06-10 12:47 ` Bhushan Bharat-R65777
2013-06-10 14:26 ` Alexander Graf
2013-06-10 17:20 ` Scott Wood [this message]
2013-06-10 18:09 ` Alexander Graf
2013-06-11 11:40 ` Bhushan Bharat-R65777
2013-06-11 12:39 ` Alexander Graf
2013-06-11 12:47 ` Bhushan Bharat-R65777
2013-06-11 12:56 ` Alexander Graf
2013-06-11 13:18 ` Bhushan Bharat-R65777
2013-06-11 14:02 ` Alexander Graf
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=1370884805.18413.8@snotra \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=R65777@freescale.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).