[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807280127.22060.david-b@pacbell.net>
Date: Mon, 28 Jul 2008 01:27:21 -0700
From: David Brownell <david-b@...bell.net>
To: Clemens Ladisch <clemens@...isch.de>
Cc: lkml <linux-kernel@...r.kernel.org>, bob.picco@...com,
venkatesh.pallipadi@...el.com, Vojtech Pavlik <vojtech@...e.cz>,
the arch/x86 maintainers <x86@...nel.org>,
Adrian Bunk <bunk@...nel.org>
Subject: Re: [patch 2.6.26-git] /dev/hpet - fixes and cleanup
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists