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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2627152.ptA2OSn8Sr@aspire.rjw.lan>
Date:   Wed, 29 Mar 2017 23:20:48 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        smuckle.linux@...il.com, juri.lelli@....com,
        Morten.Rasmussen@....com, patrick.bellasi@....com,
        eas-dev@...ts.linaro.org
Subject: Re: [RFC 2/9] irq_work: add irq_work_queue_on for !CONFIG_SMP

On Thursday, March 09, 2017 05:15:12 PM Viresh Kumar wrote:
> From: Steve Muckle <smuckle.linux@...il.com>
> 
> Having irq_work_queue_on() available for !CONFIG_SMP can make some
> call sites cleaner.
> 
> Signed-off-by: Steve Muckle <smuckle.linux@...il.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
>  include/linux/irq_work.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
> index 47b9ebd4a74f..0195c3502d6b 100644
> --- a/include/linux/irq_work.h
> +++ b/include/linux/irq_work.h
> @@ -1,6 +1,7 @@
>  #ifndef _LINUX_IRQ_WORK_H
>  #define _LINUX_IRQ_WORK_H
>  
> +#include <linux/bug.h>
>  #include <linux/llist.h>
>  
>  /*
> @@ -36,6 +37,12 @@ bool irq_work_queue(struct irq_work *work);
>  
>  #ifdef CONFIG_SMP
>  bool irq_work_queue_on(struct irq_work *work, int cpu);
> +#else
> +static inline bool irq_work_queue_on(struct irq_work *work, int cpu)
> +{
> +	BUG_ON(cpu != 0);

Would WARN_ON(), or WARN_ON_ONCE() even, be insufficient?

> +	return irq_work_queue(work);
> +}
>  #endif
>  
>  void irq_work_tick(void);
> 

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ