Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562919

Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield
Date 2017-01-19 18:00 +0100
Message-ID <t1oe5-40V-15@gated-at.bofh.it> (permalink)
References <t12wV-72O-5@gated-at.bofh.it> <t12wW-72O-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 18 Jan 2017, Andy Shevchenko wrote:
> +#include <linux/init.h>
> +
> +#include <asm/hw_irq.h>
> +#include <asm/intel-mid.h>
> +#include <asm/io_apic.h>
> +#include <asm/time.h>
> +#include <asm/x86_init.h>
> +
> +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.

arch_initcall is much more suitable.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] x86/platform/intel-mid: Fix RTC handling Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-18 18:50 +0100
  [PATCH v3 3/3] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-18 18:50 +0100
  [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-18 18:50 +0100
    Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt  for Merrifield Thomas Gleixner <tglx@linutronix.de> - 2017-01-19 18:00 +0100
      Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt  for Merrifield Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-19 18:10 +0100

csiph-web