From: Robert Picco <Robert.Picco@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: Timer patch V8
Date: Thu, 09 Sep 2004 14:08:19 +0000 [thread overview]
Message-ID: <414063D3.1080900@hp.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0408092115500.22817@schroedinger.engr.sgi.com>
Alex Williamson wrote:
>On Wed, 2004-09-08 at 13:52 -0700, Christoph Lameter wrote:
>
>
>>Umm... I thought MC was constant and the address of the counter. I see it
>>used in lines 93 and following.
>>
>>This may fix the MC issue:
>>
>>
>
>Not likely. MC is only a macro variable there. I'd guess you want addr
>set to something like &hpet->hpet_mc, but I don't know enough about hpet
>to know for certain. There are potentially multiple hpets in a system,
>if they're not all guaranteed to have the same specs, perhaps there are
>better choices that simply choosing the first. Bob?
>
> Alex
>
>
Correct, MC is an argument to a macro. I haven't paid close attention
to how the interpolator has evolved.
For now choosing the first hpet discovered is adequate. For HP hardware
this would be the HPET in the root cell. Should multiple hpets have a
different clock source, then finding the more optimum one would be required.
Bob
>
>
>>Index: linux-2.6.9-rc1/drivers/char/hpet.c
>>=================================>>--- linux-2.6.9-rc1.orig/drivers/char/hpet.c 2004-09-07 18:37:00.000000000 -0700
>>+++ linux-2.6.9-rc1/drivers/char/hpet.c 2004-09-08 13:52:18.000000000 -0700
>>@@ -664,8 +664,7 @@
>>
>> static struct time_interpolator hpet_interpolator = {
>> .source = TIME_SOURCE_MMIO64,
>>- .shift = 10,
>>- .addr = MC
>>+ .shift = 10;
>> };
>>
>> #endif
>>@@ -954,6 +953,7 @@
>>
>> hpet = hpets->hp_hpet;
>> hpet_cycles_per_sec = hpet_time_div(hpets->hp_period);
>>+ hpet_interpolator.addr = MC;
>> hpet_interpolator.frequency = hpet_cycles_per_sec;
>> hpet_interpolator.drift = hpet_cycles_per_sec *
>> HPET_DRIFT / 1000000;
>>
>>
>>On Wed, 8 Sep 2004, Alex Williamson wrote:
>>
>>
>>
>>> I see this made it upstream. Unfortunately w/ CONFIG_HPET=y, I now
>>>get this:
>>>
>>> CC drivers/char/hpet.o
>>>drivers/char/hpet.c:669: error: `MC' undeclared here (not in a function)
>>>drivers/char/hpet.c:669: error: initializer element is not constant
>>>drivers/char/hpet.c:669: error: (near initialization for `hpet_interpolator.addr')
>>>drivers/char/hpet.c: In function `hpet_init':
>>>drivers/char/hpet.c:956: error: `hpet_cycles_per_sec' undeclared (first use in this function)
>>>drivers/char/hpet.c:956: error: (Each undeclared identifier is reported only once
>>>drivers/char/hpet.c:956: error: for each function it appears in.)
>>>drivers/char/hpet.c:960: error: `hpet_nsecs_per_cycle' undeclared (first use in this function)
>>>make[2]: *** [drivers/char/hpet.o] Error 1
>>>
>>>I assume hpet_cycles_per_sec and hpet_nsecs_per_cycle just need to be
>>>declared again, but I couldn't figure out what MC is supposed to be.
>>>
>>> Alex
>>>
>>>--
>>>Alex Williamson HP Linux & Open Source Lab
>>>
>>>
>>>
next prev parent reply other threads:[~2004-09-09 14:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 4:18 Timer patch V8 Christoph Lameter
2004-09-08 19:45 ` Alex Williamson
2004-09-08 20:52 ` Christoph Lameter
2004-09-08 21:23 ` Alex Williamson
2004-09-08 23:23 ` Christoph Lameter
2004-09-09 14:08 ` Robert Picco [this message]
2004-09-09 15:01 ` Alex Williamson
2004-09-09 15:28 ` Christoph Lameter
2004-09-09 15:55 ` Alex Williamson
2004-09-09 16:31 ` Christoph Lameter
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=414063D3.1080900@hp.com \
--to=robert.picco@hp.com \
--cc=linux-ia64@vger.kernel.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