On Mon, Mar 12, 2018 at 11:25:09PM +0100, Mark Kettenis wrote:
> > Date: Fri, 9 Mar 2018 19:43:42 +0200
> > From: Artturi Alm <artturi....@gmail.com>
> > 
> > Hi,
> > 
> > lazy retry[0],
> > to give these timers their (likely) copy-paste-robbed MSB back.
> > 
> > -Artturi
> > 
> > [0] https://marc.info/?l=openbsd-tech&m=150421823512699&w=1
> 
> This doesn't actually fix anything; 31 bits are plenty.  Leaving off
> the top bit protects against signed/unsigned mistakes although there
> shouldn't be any.  So I'm not sure this is worth it.
> 

I still think the current masks are only brought over(by accident) from
some macppc timer actually having had only 31bits in the early 90s.
also, fwiw. all these timers have atleast 32bits in use on other BSDs.

now if focusing only the documentation issue i'm having with these masks
in use, is that either this(comment) should be changed(sys/timetc.h):

 47         timecounter_get_t       *tc_get_timecount;
 48                 /*
 49                  * This function reads the counter.  It is not required to
 50                  * mask any unimplemented bits out, as long as they are
 51                  * constant.
 52                  */

or the *tc_get_timecount functions of affected timers be changed to mask
out the non-constant bit, which i think would be silly.

tbh., i'm only worried about amptimer w/high default freq(396MHz),
and only because i'm still optimistic we would see the HZ bump[0] in near
future, making the lack of MSB possibly more of an possible issue?

-Artturi

[0] https://marc.info/?l=openbsd-tech&m=150274123011009&w=1

Reply via email to