From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47040 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbeLKNZA (ORCPT ); Tue, 11 Dec 2018 08:25:00 -0500 Subject: Re: [PATCH v2 04/28] kernel: Add masks support for Raw and NTP time References: <20181129170530.37789-1-vincenzo.frascino@arm.com> <20181129170530.37789-5-vincenzo.frascino@arm.com> From: Vincenzo Frascino Message-ID: Date: Tue, 11 Dec 2018 13:24:56 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thomas Gleixner Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Arnd Bergmann , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Mark Salyzyn , Peter Collingbourne Message-ID: <20181211132456.xE9iWEcYRy81I3hWRjd8yQ-Q23ufki2E7JhbPv-0zQE@z> On 29/11/2018 22:41, Thomas Gleixner wrote: > On Thu, 29 Nov 2018, Vincenzo Frascino wrote: > >> Depending on the clocksource selected there can be supported a >> different resolution hence we require a mask to be applied to the >> time calculation. >> >> This patch exposes the mask in the datapage for Raw and NTP adjusted >> clock. >> >> Cc: Arnd Bergmann >> Signed-off-by: Vincenzo Frascino >> --- >> include/vdso/datapage.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h >> index d50a108afaed..0a7bdccf5773 100644 >> --- a/include/vdso/datapage.h >> +++ b/include/vdso/datapage.h >> @@ -34,6 +34,8 @@ struct vdso_data { >> __u64 wtm_clock_nsec; >> __u64 btm_nsec; /* Monotonic to boot time */ >> __u64 tai_sec; /* International Atomic Time */ >> + __u64 cs_mono_mask; /* NTP-adjusted clocksource mask */ >> + __u64 cs_raw_mask; /* Raw clocksource mask */ > > And why would they be different? The core timekeeper has them duplicated > purely for access pattern optimization and simplicity. > As you pointed out I followed the pattern of core timekeeper, but looking at it after your comment, it seems obvious that one is enough. > Thanks, > > tglx > -- Regards, Vincenzo