From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH v9 04/10] jiffies: Introduce USER_TICK_USEC and redefine TICK_USEC Date: Fri, 06 Apr 2018 09:20:31 +0200 Message-ID: <72540493.566rOE4q81@aspire.rjw.lan> References: <1736751.LdhZHb50jq@aspire.rjw.lan> <7620417.mBP1cQHt5D@aspire.rjw.lan> <20180406010954.GA4400@lerouge> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <20180406010954.GA4400@lerouge> Sender: linux-kernel-owner@vger.kernel.org To: Frederic Weisbecker Cc: Linux PM , Peter Zijlstra , Frederic Weisbecker , Thomas Gleixner , Paul McKenney , Thomas Ilsche , Doug Smythies , Rik van Riel , Aubrey Li , Mike Galbraith , LKML , Len Brown List-Id: linux-pm@vger.kernel.org On Friday, April 6, 2018 3:09:55 AM CEST Frederic Weisbecker wrote: > On Wed, Apr 04, 2018 at 10:38:34AM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Since the subsequent changes will need a TICK_USEC definition > > analogous to TICK_NSEC, rename the existing TICK_USEC as > > USER_TICK_USEC, update its users and redefine TICK_USEC > > accordingly. > > > > Suggested-by: Peter Zijlstra > > Signed-off-by: Rafael J. Wysocki > > --- > > > > v8 -> v9: No changes. > > > > --- > > drivers/net/ethernet/sfc/mcdi.c | 2 +- > > include/linux/jiffies.h | 7 +++++-- > > kernel/time/ntp.c | 2 +- > > 3 files changed, 7 insertions(+), 4 deletions(-) > > > > Index: linux-pm/include/linux/jiffies.h > > =================================================================== > > --- linux-pm.orig/include/linux/jiffies.h > > +++ linux-pm/include/linux/jiffies.h > > @@ -62,8 +62,11 @@ extern int register_refined_jiffies(long > > /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ > > #define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) > > > > -/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ > > -#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) > > +/* TICK_USEC is the time between ticks in usec assuming SHIFTED_HZ */ > > +#define TICK_USEC ((USEC_PER_SEC + HZ/2) / HZ) > > Nit: SHIFTED_HZ doesn't seem to exist anymore. Well, fair enough, but that would need to be changed along with the TICK_NSEC comment IMO. > Reviewed-by: Frederic Weisbecker Thanks!