lkml.org 
[lkml]   [2012]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 33/36] AArch64: Generic timers support
    Date
    On Friday 13 July 2012, Catalin Marinas wrote:
    > > Architectures that always have a working clock source would then just
    > > not include the timex.h header and #define ACT_HZ HZ in common code.
    >
    > Would something like below be enough?
    >
    > Also, are there any implications if we boot with clocksource=jiffies?
    >
    > --- a/include/linux/jiffies.h
    > +++ b/include/linux/jiffies.h
    > @@ -55,7 +55,11 @@
    > + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
    >
    > /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
    > +#ifdef CLOCK_TICK_RATE
    > #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
    > +#else
    > +#define ACTHZ (HZ << 8)
    > +#endif
    >
    > /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */
    > #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
    >

    I think that's a very good step in the right direction, yes.

    It does not let us get rid of the asm/timex.h file, but that's actually
    a separate problem. It also wouldn't hurt to put the LATCH definition
    in the same #ifdef.

    Acked-by: Arnd Bergmann <arnd@arndb.de>

    Arnd



    \
     
     \ /
      Last update: 2012-07-13 19:01    [W:3.112 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site