From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [RFC][PATCH 0/14] Convert remaining arches to read/update_persistent_clock Date: Wed, 23 Dec 2009 11:08:51 +0100 Message-ID: <10f740e80912230208g6237c530k8c70d9375efbd463@mail.gmail.com> References: <1261540762.3508.61.camel@localhost.localdomain> <20091223050810.GA25791@linux-sh.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=HNJ2BbLFR0MbtXw5s8SKy5TCJMjzL2H6EInlCP9em4E=; b=oaVpPisez8FXjS9crJ3e4U9LA6TWMb/6u/Rk9D8HrfiMNv2H1zX8/kcEOBTOu1ULlN dEA53sR2XCALqWBK5aKRzPLiQjBSdXDMhzTgSlbB4i9t4EL/C9LO8tRVy5efmTrC1GZq /LBPxrgZQA0CqoZVyx07Mxw/Bi3GjWCa3GnR4= In-Reply-To: <20091223050810.GA25791@linux-sh.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mundt Cc: john stultz , lkml , Richard Henderson , linux-alpha@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Haavard Skinnemoen , Mike Frysinger , Mikael Starvik , David Howells , Yoshinori Sato , Tony Luck , Hirokazu Takata , Koichi Yasutake , Kyle McMartin , "David S. Miller" On Wed, Dec 23, 2009 at 06:08, Paul Mundt wrote: > On Tue, Dec 22, 2009 at 07:59:22PM -0800, john stultz wrote: >> In this case the generic read_persistent_clock() and >> update_persistent_clock() methods have been provided to allow the >> generic timekeeping code to initialize xtime and set the persistent >> clock when NTP is synced. However many arches haven't converted, so the >> generic code has to handle the case where the arch is doing this >> management itself. >> >> This patch series tries to convert the following 14 architectures over >> to use read_persistent_clock() and update_persistent_clock() as >> applicable, killing off about 200 lines of arch specific code. >> > While I think that this is a good goal, many of the underlying > architectures have veered pretty far away from having meaningful > persistent clock interfaces after having moved entirely to generic > timekeeping and the RTC subsystem. Indeed. When moving to the RTC subsystem, you loose the persistent clock at boot; i.e. on m68k, mach_hwclk() can no longer be set, as the RTC driver is in a separate (possible loadable) module. > In the case of SH at least that interface along with the generic CMOS > stuff is largely a stop-gap for antiquated platforms that don't have > proper RTC drivers and likely never will, while the default for all of > the rest of the platforms effectively returns a fixed dummy value. I > copied this approach from MIPS originally, so there are at least a few > architectures that this will apply to. > > In any event, I wonder if it might make more sense to take something like > the SPARC implementation that is simply a wrapper around the RTC, move > that out in to a more generic place, and permit architectures to select > an RTC class backed persistent clock instead (it seems to be only > platforms that haven't caught up yet in terms of generic time and RTC > migration that would want to define this interface on their own at all at > this point)? Hmm, haven't looked into how SPARC handles this yet... Yes, looks like a good idea to me. Any disadvantages with this approach? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds