From: David Brownell <david-b@pacbell.net>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: lkml <linux-kernel@vger.kernel.org>,
bob.picco@hp.com, venkatesh.pallipadi@intel.com,
Vojtech Pavlik <vojtech@suse.cz>,
the arch/x86 maintainers <x86@kernel.org>,
Adrian Bunk <bunk@kernel.org>
Subject: Re: [patch 2.6.26-git] /dev/hpet - fixes and cleanup
Date: Mon, 28 Jul 2008 01:27:21 -0700 [thread overview]
Message-ID: <200807280127.22060.david-b@pacbell.net> (raw)
In-Reply-To: <488D7BFF.10005@ladisch.de>
On Monday 28 July 2008, Clemens Ladisch wrote:
> > + /* FIXME this may trash both the system clocksource and
> > + * the current clock event device! Use HPET_TN_SETVAL
> > + * instead, like arch/x86/kernel/hpet.c does ... never
> > + * modify the counter, ever.
> > + */
> > m = read_counter(&hpet->hpet_mc);
> > write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
>
> This comment seems to assume that the code below modifies the main
> counter, which it doesn't.
There's only one counter. How could it not modify that?
Oh ... I see. It's called write_counter() but doesn't
actually write the counter. Likewise, read_counter() is
not actually reading the counter. Gaack ...
So that's not really an issue (good!). I'll strike that
comment, except to comment that it's explicitly not modifying
any counter (just a hidden write-only accumulator) ... but
those silly function names should really be changed so they
have a less tenuous connection with reality. In fact, most
places would be better off just hard-wiring 32-bit access...
> Additionally, HPET_TN_SETVAL has the same
> value as Tn_VAL_SET_CNF_MASK (from <linux/hpet.h>), which _is_ used.
OK, I can see that too. This HPET stuff is really a lot
dirtier than I had expected ... there's no reason at all
to have two separate headers with two incompatible sets
of definitions for the same registers!!
Any comments on the rest?
- Dave
next prev parent reply other threads:[~2008-07-28 8:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 22:08 [patch 2.6.26] /dev/hpet - fixes and cleanup David Brownell
2008-07-23 7:44 ` Clemens Ladisch
2008-07-23 16:12 ` David Brownell
2008-07-23 16:50 ` David Brownell
2008-07-24 11:35 ` Clemens Ladisch
2008-07-25 19:55 ` David Brownell
2008-07-29 21:26 ` H. Peter Anvin
2008-07-25 19:58 ` [patch 2.6.26-git] " David Brownell
2008-07-28 7:57 ` Clemens Ladisch
2008-07-28 8:27 ` David Brownell [this message]
2008-07-28 9:10 ` Clemens Ladisch
2008-07-29 19:46 ` David Brownell
2008-07-29 19:47 ` [patch 2.6.27-rc1] " David Brownell
2008-07-31 16:46 ` Ingo Molnar
2008-07-31 16:55 ` Ingo Molnar
2008-07-31 19:59 ` David Brownell
2008-07-31 20:50 ` Ingo Molnar
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=200807280127.22060.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=bob.picco@hp.com \
--cc=bunk@kernel.org \
--cc=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=venkatesh.pallipadi@intel.com \
--cc=vojtech@suse.cz \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.