[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201207131632.31548.arnd@arndb.de>
Date: Fri, 13 Jul 2012 16:32:31 +0000
From: Arnd Bergmann <arnd@...db.de>
To: Catalin Marinas <catalin.marinas@....com>
Cc: John Stultz <john.stultz@...aro.org>,
Marc Zyngier <Marc.Zyngier@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Deepak Saxena <dsaxena@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Walleij <linus.ml.walleij@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Will Deacon <Will.Deacon@....com>,
Mike Turquette <mike.turquette@...aro.org>,
Marc Zyngier <maz@...terjones.org>
Subject: Re: [PATCH 33/36] AArch64: Generic timers support
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@...db.de>
Arnd
--
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