From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [Q] Is 64bit LVTT screwed
Date: Wed, 2 Jul 2008 22:40:24 +0400 [thread overview]
Message-ID: <20080702184024.GC7003@cvg> (raw)
Hi Maciej,
while I'm in path of unification apic code I found a bit
strange code snippet
apic_32.c
---------
#define APIC_DIVISOR 16
static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)
{
...
if (!oneshot)
apic_write_around(APIC_TMICT, clocks / APIC_DIVISOR);
}
apic_64.c
---------
static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)
{
...
if (!oneshot)
apic_write_around(APIC_TMICT, clocks);
}
but in both cases we use "divide by 16" in divide register. The only
explanation I imagine - for 64bit mode we are required to 'stuck'
for a bit longer (by 16 times longer to be precise). Am I right?
Or there is another reason why we dont use APIC_DIVISOR here. Actually,
as I see it not fair to a caller. For 64bit mode APIC timer is requested
to count 250000000 ticks but in real it will count 250000000 * 16.
Not sure who is right there. I think the better would be to
use 4000000000 and APIC_DIVISOR in 64bit mode. How do you think?
- Cyrill -
next reply other threads:[~2008-07-02 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 18:40 Cyrill Gorcunov [this message]
2008-07-07 22:08 ` [Q] Is 64bit LVTT screwed Maciej W. Rozycki
2008-07-08 11:38 ` Cyrill Gorcunov
2008-07-08 19:09 ` Cyrill Gorcunov
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=20080702184024.GC7003@cvg \
--to=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.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