public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Eyal Perry <eyalpe@mellanox.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: genirq: Provide !SMP stub for irq_set_affinity_notifier()
Date: Wed, 11 Jun 2014 13:34:38 -0700	[thread overview]
Message-ID: <20140611203438.GA4035@kroah.com> (raw)
In-Reply-To: <20140608185919.57FB46621E2@gitolite.kernel.org>

Eyal, the commit you reference below isn't anywhere to be found in
Linus's tree.  Why is this commit needed at all if that one isn't there
either?

Confused,

greg k-h


On Sun, Jun 08, 2014 at 06:59:19PM +0000, Linux Kernel Mailing List wrote:
> Gitweb:     http://git.kernel.org/linus/;a=commit;h=f0ba3d05c9c647ab42ed6a0dbdfdeae42bfbd6de
> Commit:     f0ba3d05c9c647ab42ed6a0dbdfdeae42bfbd6de
> Parent:     d6d211db37e75de2ddc3a4f979038c40df7cc79c
> Refname:    refs/heads/master
> Author:     Eyal Perry <eyalpe@mellanox.com>
> AuthorDate: Tue May 20 17:57:00 2014 +0300
> Committer:  Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Wed May 21 11:31:51 2014 +0900
> 
>     genirq: Provide !SMP stub for irq_set_affinity_notifier()
>     
>     Instead of requiring each consumer of the IRQ affinity notifier to have
>     themselves be explicitly dependent on CONFIG_SMP, make the definition of
>     struct irq_affinity_notify to exist independently of that config option
>     and introduce a stub for irq_set_affinity_notifier() under non SMP
>     configuration.
>     
>     Fixes: 2eacc23 ("net/mlx4_core: Enforce irq affinity changes
>     immediatly")
>     
>     Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
>     Signed-off-by: Amir Vadai <amirv@mellanox.com>
>     Cc: Ben Hutchings <bhutchings@solarflare.com>
>     Cc: Yevgeny Petrilin <yevgenyp@mellanox.com>
>     Cc: Or Gerlitz <ogerlitz@mellanox.com>
>     Cc: David S. Miller <davem@davemloft.net>
>     Link: http://lkml.kernel.org/r/1400597820-30685-1-git-send-email-amirv@mellanox.com
>     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>  include/linux/interrupt.h |   46 +++++++++++++++++++++++++-------------------
>  1 files changed, 26 insertions(+), 20 deletions(-)
> 
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 97ac926..3f74c05 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -199,6 +199,26 @@ extern int check_wakeup_irqs(void);
>  static inline int check_wakeup_irqs(void) { return 0; }
>  #endif
>  
> +/**
> + * struct irq_affinity_notify - context for notification of IRQ affinity changes
> + * @irq:		Interrupt to which notification applies
> + * @kref:		Reference count, for internal use
> + * @work:		Work item, for internal use
> + * @notify:		Function to be called on change.  This will be
> + *			called in process context.
> + * @release:		Function to be called on release.  This will be
> + *			called in process context.  Once registered, the
> + *			structure must only be freed when this function is
> + *			called or later.
> + */
> +struct irq_affinity_notify {
> +	unsigned int irq;
> +	struct kref kref;
> +	struct work_struct work;
> +	void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask);
> +	void (*release)(struct kref *ref);
> +};
> +
>  #if defined(CONFIG_SMP)
>  
>  extern cpumask_var_t irq_default_affinity;
> @@ -242,26 +262,6 @@ extern int irq_select_affinity(unsigned int irq);
>  
>  extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
>  
> -/**
> - * struct irq_affinity_notify - context for notification of IRQ affinity changes
> - * @irq:		Interrupt to which notification applies
> - * @kref:		Reference count, for internal use
> - * @work:		Work item, for internal use
> - * @notify:		Function to be called on change.  This will be
> - *			called in process context.
> - * @release:		Function to be called on release.  This will be
> - *			called in process context.  Once registered, the
> - *			structure must only be freed when this function is
> - *			called or later.
> - */
> -struct irq_affinity_notify {
> -	unsigned int irq;
> -	struct kref kref;
> -	struct work_struct work;
> -	void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask);
> -	void (*release)(struct kref *ref);
> -};
> -
>  extern int
>  irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
>  
> @@ -284,6 +284,12 @@ static inline int irq_set_affinity_hint(unsigned int irq,
>  {
>  	return -EINVAL;
>  }
> +
> +static inline int
> +irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
> +{
> +	return 0;
> +}
>  #endif /* CONFIG_SMP */
>  
>  /*
> --
> To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2014-06-11 20:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140608185919.57FB46621E2@gitolite.kernel.org>
2014-06-11 20:34 ` Greg KH [this message]
2014-06-12  7:55   ` genirq: Provide !SMP stub for irq_set_affinity_notifier() Eyal Perry
2014-06-12  8:47     ` Eyal Perry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140611203438.GA4035@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=eyalpe@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox