From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754883AbdARLyq (ORCPT ); Wed, 18 Jan 2017 06:54:46 -0500 Received: from mga07.intel.com ([134.134.136.100]:47379 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754695AbdARLyo (ORCPT ); Wed, 18 Jan 2017 06:54:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,249,1477983600"; d="scan'208";a="32120490" Message-ID: <1484740467.2133.202.camel@linux.intel.com> Subject: Re: [PATCH v2 1/1] x86/rtc: Allocate interrupt for platform device From: Andy Shevchenko To: Thomas Gleixner Cc: "Luis R. Rodriguez" , Ingo Molnar , "H . Peter Anvin" , linux-kernel@vger.kernel.org, x86@kernel.org Date: Wed, 18 Jan 2017 13:54:27 +0200 In-Reply-To: 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> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-01-18 at 12:02 +0100, Thomas Gleixner wrote: > 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. I see. > > - 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. Nothing specifically wrong. I would give a try to this and send a patch if everything okay. -- Andy Shevchenko Intel Finland Oy