From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754327AbdARLDl (ORCPT ); Wed, 18 Jan 2017 06:03:41 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:49413 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754225AbdARLDK (ORCPT ); Wed, 18 Jan 2017 06:03:10 -0500 Date: Wed, 18 Jan 2017 12:02:00 +0100 (CET) From: Thomas Gleixner To: Andy Shevchenko cc: "Luis R. Rodriguez" , Ingo Molnar , "H . Peter Anvin" , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 1/1] x86/rtc: Allocate interrupt for platform device In-Reply-To: <1484736987.2133.188.camel@linux.intel.com> Message-ID: References: <20170116172345.3823-1-andriy.shevchenko@linux.intel.com> <20170116190437.GB13946@wotan.suse.de> <1484594499.2133.159.camel@linux.intel.com> <1484660404.2133.170.camel@linux.intel.com> <1484736987.2133.188.camel@linux.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Jan 2017, Andy Shevchenko wrote: > On Wed, 2017-01-18 at 11:24 +0100, Thomas Gleixner wrote: > > Looking deeper it's actually simple. MID already overloads the > > timer_init() > > setup function. So we can just do it there. > > Yes, it does. However I have another solution, just would like to > discuss. > > There is a timekeeping_init() call, which is a first user of the RTC. > I have 3 changes: > - introduce arch_pre_timekeeping_init() and move wallclock_init() call > there Oh no, please don't add yet another arch hook just because we can. > - use almost your initial suggestion > - move wallclock_init() to x86_platform and rename to init_wallclock() > to be consistent with the rest of wallclock API (this, though, has item > to discuss, i.e. __init use for callbacks) > > This would allow to clearly initialize virtual RTC or legacy one at the > same know point. What's wrong with setting up the rtc interrupt in that existing mid function? It's a platform quirk and we really do no need yet another hook to make it look 'generic'. Nothing else than MID uses it. Thanks, tglx