From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753601AbdASRDu (ORCPT ); Thu, 19 Jan 2017 12:03:50 -0500 Received: from mga09.intel.com ([134.134.136.24]:53099 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174AbdASRDt (ORCPT ); Thu, 19 Jan 2017 12:03:49 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,254,1477983600"; d="scan'208";a="810892561" Message-ID: <1484845332.2133.247.camel@linux.intel.com> Subject: Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield From: Andy Shevchenko To: Thomas Gleixner Cc: Ingo Molnar , "H . Peter Anvin" , linux-kernel@vger.kernel.org, x86@kernel.org, "Luis R . Rodriguez" Date: Thu, 19 Jan 2017 19:02:12 +0200 In-Reply-To: References: <20170118174255.78945-1-andriy.shevchenko@linux.intel.com> <20170118174255.78945-3-andriy.shevchenko@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 Thu, 2017-01-19 at 17:54 +0100, Thomas Gleixner wrote: > On Wed, 18 Jan 2017, Andy Shevchenko wrote: > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +static int __init mrfld_legacy_rtc_alloc_irq(void) > > +{ > > + struct irq_alloc_info info; > > + int ret; > > + > > + if (!x86_platform.legacy.rtc) > > + return -ENODEV; > > + > > + ioapic_set_alloc_attr(&info, NUMA_NO_NODE, 1, 0); > > + ret = mp_map_gsi_to_irq(RTC_IRQ, IOAPIC_MAP_ALLOC, &info); > > + if (ret < 0) { > > + pr_info("Failed to allocate RTC interrupt. > > Disabling RTC\n"); > > + x86_platform.legacy.rtc = 0; > > + return ret; > > + } > > + > > + return 0; > > +} > > + > > +static int __init mrfld_legacy_rtc_init(void) > > +{ > > + if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER) > > + return -ENODEV; > > + > > + return mrfld_legacy_rtc_alloc_irq(); > > +} > > +rootfs_initcall(mrfld_legacy_rtc_init); > > rootfs_initcall???? That does not make any sense at all. I know you > need it > before the device initcalls, but just using a random initcall level > before > device_initcall is wrong. I copied watchdog approach, would you like me to move watchdog there as well? > > arch_initcall is much more suitable. So, I think I need to send v4, but I would wait for answer for the above. Thanks for review! -- Andy Shevchenko Intel Finland Oy