lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 19 Jan 2017 19:02:12 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Ingo Molnar <mingo@...hat.com>, "H . Peter Anvin" <hpa@...or.com>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        "Luis R . Rodriguez" <mcgrof@...nel.org>
Subject: Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt
 for Merrifield

On Thu, 2017-01-19 at 17:54 +0100, Thomas Gleixner wrote:
> 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.

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 <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ