From: tip-bot for Eyal Perry <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
amirv@mellanox.com, yevgenyp@mellanox.com,
bhutchings@solarflare.com, davem@davemloft.net,
eyalpe@mellanox.com, ogerlitz@mellanox.com, tglx@linutronix.de
Subject: [tip:irq/core] genirq: Provide !SMP stub for irq_set_affinity_notifier()
Date: Tue, 20 May 2014 19:36:32 -0700 [thread overview]
Message-ID: <tip-f0ba3d05c9c647ab42ed6a0dbdfdeae42bfbd6de@git.kernel.org> (raw)
In-Reply-To: <1400597820-30685-1-git-send-email-amirv@mellanox.com>
Commit-ID: f0ba3d05c9c647ab42ed6a0dbdfdeae42bfbd6de
Gitweb: http://git.kernel.org/tip/f0ba3d05c9c647ab42ed6a0dbdfdeae42bfbd6de
Author: Eyal Perry <eyalpe@mellanox.com>
AuthorDate: Tue, 20 May 2014 17:57:00 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 21 May 2014 11:31:51 +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 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 97ac926..3f74c059 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 */
/*
next prev parent reply other threads:[~2014-05-21 2:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 14:57 [PATCH net-next] genirq: Eliminate explicit dependency between IRQ affinity notifiers and CONFIG_SMP Amir Vadai
2014-05-21 2:36 ` tip-bot for Eyal Perry [this message]
2014-05-21 2:40 ` [tip:irq/core] genirq: Provide !SMP stub for irq_set_affinity_notifier() Thomas Gleixner
2014-05-22 19:28 ` [PATCH net-next] genirq: Eliminate explicit dependency between IRQ affinity notifiers and CONFIG_SMP David Miller
2014-05-22 22:21 ` Thomas Gleixner
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=tip-f0ba3d05c9c647ab42ed6a0dbdfdeae42bfbd6de@git.kernel.org \
--to=tipbot@zytor.com \
--cc=amirv@mellanox.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=eyalpe@mellanox.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=tglx@linutronix.de \
--cc=yevgenyp@mellanox.com \
/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