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]
Message-ID: <alpine.DEB.2.20.1710191609480.1971@nanos>
Date:   Thu, 19 Oct 2017 16:12:12 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Paul Burton <paul.burton@...tec.com>
cc:     Ralf Baechle <ralf@...ux-mips.org>, dianders@...omium.org,
        James Hogan <james.hogan@...tec.com>,
        Brian Norris <briannorris@...omium.org>,
        Jason Cooper <jason@...edaemon.net>, jeffy.chen@...k-chips.com,
        Marc Zyngier <marc.zyngier@....com>,
        linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org,
        tfiga@...omium.org
Subject: Re: [RFC PATCH v1 6/9] MIPS: perf: percpu_devid interrupt support

On Thu, 7 Sep 2017, Paul Burton wrote:
>  
> +static struct irqaction c0_perf_irqaction = {
> +	.handler = mipsxx_pmu_handle_irq,
> +	.flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED | IRQF_NOAUTOEN,
> +	.name = "mips_perf_pmu",
> +	.percpu_dev_id = &mipspmu,
> +};
> +
>  static int mipspmu_get_irq(void)
>  {
> -	int err;
> +	if (irq_is_percpu_devid(mipspmu.irq))
> +		return setup_percpu_irq(mipspmu.irq, &c0_perf_irqaction);
>  
> -	err = request_irq(mipspmu.irq, mipsxx_pmu_handle_irq,
> -			  IRQF_PERCPU | IRQF_NOBALANCING |
> -			  IRQF_NO_THREAD | IRQF_NO_SUSPEND |
> -			  IRQF_SHARED,
> -			  "mips_perf_pmu", &mipspmu);
> -	if (err)
> -		pr_warn("Unable to request IRQ%d for MIPS performance counters!\n",
> -			mipspmu.irq);
> -	return err;
> +	return setup_irq(mipspmu.irq, &c0_perf_irqaction);

request_irq() is really preferred over setup_irq(). setup_irq() exists for
historical reasons because back in the days the allocators were not working
when early interrupts got initialized. Today that's a non issue, but I
never got around to remove the setup_irq() cruft.

Thanks,

	tglx




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ