From: tip-bot for Jiang Liu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, bp@alien8.de,
benh@kernel.crashing.org, cernekee@gmail.com, mingo@kernel.org,
jiang.liu@linux.intel.com, bhelgaas@google.com,
tony.luck@intel.com, tglx@linutronix.de, hpa@zytor.com,
konrad.wilk@oracle.com, jason@lakedaemon.net,
rdunlap@infradead.org, yinghai@kernel.org
Subject: [tip:irq/urgent] genirq: Move field 'affinity' from irq_data into irq_common_data
Date: Wed, 16 Sep 2015 13:56:41 -0700 [thread overview]
Message-ID: <tip-9df872faa7e1619e9278bec00ceaed2236533530@git.kernel.org> (raw)
In-Reply-To: <1433303281-27688-1-git-send-email-jiang.liu@linux.intel.com>
Commit-ID: 9df872faa7e1619e9278bec00ceaed2236533530
Gitweb: http://git.kernel.org/tip/9df872faa7e1619e9278bec00ceaed2236533530
Author: Jiang Liu <jiang.liu@linux.intel.com>
AuthorDate: Wed, 3 Jun 2015 11:47:50 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 16 Sep 2015 15:46:49 +0200
genirq: Move field 'affinity' from irq_data into irq_common_data
Irq affinity mask is per-irq instead of per irqchip, so move it into
struct irq_common_data.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/1433303281-27688-1-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/apic/vector.c | 4 +---
include/linux/irq.h | 12 ++++++------
kernel/irq/irqdesc.c | 9 +++++----
kernel/irq/manage.c | 12 ++++++------
kernel/irq/proc.c | 2 +-
5 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 1bbd0fe..836d11b 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -489,10 +489,8 @@ static int apic_set_affinity(struct irq_data *irq_data,
err = assign_irq_vector(irq, data, dest);
if (err) {
- struct irq_data *top = irq_get_irq_data(irq);
-
if (assign_irq_vector(irq, data,
- irq_data_get_affinity_mask(top)))
+ irq_data_get_affinity_mask(irq_data)))
pr_err("Failed to recover vector for irq %d\n", irq);
return err;
}
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 516aadb..75d5054 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -110,8 +110,8 @@ enum {
/*
* Return value for chip->irq_set_affinity()
*
- * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity
- * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity
+ * IRQ_SET_MASK_OK - OK, core updates irq_common_data.affinity
+ * IRQ_SET_MASK_NOCPY - OK, chip did update irq_common_data.affinity
* IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to
* support stacked irqchips, which indicates skipping
* all descendent irqchips.
@@ -131,6 +131,7 @@ struct irq_domain;
* Use accessor functions to deal with it
* @node: node index useful for balancing
* @handler_data: per-IRQ data for the irq_chip methods
+ * @affinity: IRQ affinity on SMP
*/
struct irq_common_data {
unsigned int state_use_accessors;
@@ -138,6 +139,7 @@ struct irq_common_data {
unsigned int node;
#endif
void *handler_data;
+ cpumask_var_t affinity;
};
/**
@@ -154,7 +156,6 @@ struct irq_common_data {
* @chip_data: platform-specific per-chip private data for the chip
* methods, to allow shared chip implementations
* @msi_desc: MSI descriptor
- * @affinity: IRQ affinity on SMP
*/
struct irq_data {
u32 mask;
@@ -168,7 +169,6 @@ struct irq_data {
#endif
void *chip_data;
struct msi_desc *msi_desc;
- cpumask_var_t affinity;
};
/*
@@ -684,12 +684,12 @@ static inline struct cpumask *irq_get_affinity_mask(int irq)
{
struct irq_data *d = irq_get_irq_data(irq);
- return d ? d->affinity : NULL;
+ return d ? d->common->affinity : NULL;
}
static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
{
- return d->affinity;
+ return d->common->affinity;
}
unsigned int arch_dynirq_lower_bound(unsigned int from);
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 594b3e3..bb48a5c 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -38,12 +38,13 @@ static void __init init_irq_default_affinity(void)
#ifdef CONFIG_SMP
static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node)
{
- if (!zalloc_cpumask_var_node(&desc->irq_data.affinity, gfp, node))
+ if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity,
+ gfp, node))
return -ENOMEM;
#ifdef CONFIG_GENERIC_PENDING_IRQ
if (!zalloc_cpumask_var_node(&desc->pending_mask, gfp, node)) {
- free_cpumask_var(desc->irq_data.affinity);
+ free_cpumask_var(desc->irq_common_data.affinity);
return -ENOMEM;
}
#endif
@@ -52,7 +53,7 @@ static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node)
static void desc_smp_init(struct irq_desc *desc, int node)
{
- cpumask_copy(desc->irq_data.affinity, irq_default_affinity);
+ cpumask_copy(desc->irq_common_data.affinity, irq_default_affinity);
#ifdef CONFIG_GENERIC_PENDING_IRQ
cpumask_clear(desc->pending_mask);
#endif
@@ -124,7 +125,7 @@ static void free_masks(struct irq_desc *desc)
#ifdef CONFIG_GENERIC_PENDING_IRQ
free_cpumask_var(desc->pending_mask);
#endif
- free_cpumask_var(desc->irq_data.affinity);
+ free_cpumask_var(desc->irq_common_data.affinity);
}
#else
static inline void free_masks(struct irq_desc *desc) { }
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index ad1b064..f9a59f6 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -192,7 +192,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
switch (ret) {
case IRQ_SET_MASK_OK:
case IRQ_SET_MASK_OK_DONE:
- cpumask_copy(data->affinity, mask);
+ cpumask_copy(desc->irq_common_data.affinity, mask);
case IRQ_SET_MASK_OK_NOCOPY:
irq_set_thread_affinity(desc);
ret = 0;
@@ -304,7 +304,7 @@ static void irq_affinity_notify(struct work_struct *work)
if (irq_move_pending(&desc->irq_data))
irq_get_pending(cpumask, desc);
else
- cpumask_copy(cpumask, desc->irq_data.affinity);
+ cpumask_copy(cpumask, desc->irq_common_data.affinity);
raw_spin_unlock_irqrestore(&desc->lock, flags);
notify->notify(notify, cpumask);
@@ -375,9 +375,9 @@ static int setup_affinity(struct irq_desc *desc, struct cpumask *mask)
* one of the targets is online.
*/
if (irqd_has_set(&desc->irq_data, IRQD_AFFINITY_SET)) {
- if (cpumask_intersects(desc->irq_data.affinity,
+ if (cpumask_intersects(desc->irq_common_data.affinity,
cpu_online_mask))
- set = desc->irq_data.affinity;
+ set = desc->irq_common_data.affinity;
else
irqd_clear(&desc->irq_data, IRQD_AFFINITY_SET);
}
@@ -829,8 +829,8 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
* This code is triggered unconditionally. Check the affinity
* mask pointer. For CPU_MASK_OFFSTACK=n this is optimized out.
*/
- if (desc->irq_data.affinity)
- cpumask_copy(mask, desc->irq_data.affinity);
+ if (desc->irq_common_data.affinity)
+ cpumask_copy(mask, desc->irq_common_data.affinity);
else
valid = false;
raw_spin_unlock_irq(&desc->lock);
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 0e97c14..e3a8c95 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -39,7 +39,7 @@ static struct proc_dir_entry *root_irq_dir;
static int show_irq_affinity(int type, struct seq_file *m, void *v)
{
struct irq_desc *desc = irq_to_desc((long)m->private);
- const struct cpumask *mask = desc->irq_data.affinity;
+ const struct cpumask *mask = desc->irq_common_data.affinity;
#ifdef CONFIG_GENERIC_PENDING_IRQ
if (irqd_is_setaffinity_pending(&desc->irq_data))
next prev parent reply other threads:[~2015-09-16 20:57 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 8:05 [Patch v3 00/36] Split struct irq_data into common part and per-chip part Jiang Liu
2015-06-01 8:05 ` [Patch v3 01/36] genirq: Enhance irq_data_to_desc() to support hierarchy irqdomain Jiang Liu
2015-06-16 8:16 ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-06-20 17:18 ` [tip:irq/core] " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 02/36] genirq: Fix crash caused by irq_move_irq() when hierarch irqdomain is enabled Jiang Liu
2015-06-16 7:31 ` [tip:x86/apic] genirq: Prevent crash in irq_move_irq() tip-bot for Jiang Liu
2015-06-16 7:47 ` Jiang Liu
2015-06-16 8:12 ` Thomas Gleixner
2015-06-16 8:25 ` Jiang Liu
2015-06-16 8:16 ` tip-bot for Jiang Liu
2015-06-20 17:19 ` [tip:irq/core] " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 03/36] genirq: Introduce struct irq_common_data to host shared irq data Jiang Liu
2015-06-20 17:19 ` [tip:irq/core] " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 04/36] genirq: Introduce helper function irq_data_get_node() Jiang Liu
2015-06-20 17:19 ` [tip:irq/core] " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 05/36] x86, irq: Use accessor irq_data_get_node() to hide struct irq_data detail Jiang Liu
2015-06-01 8:05 ` [Patch v3 06/36] sh, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 07/36] genirq: Move field 'node' from struct irq_data into struct irq_common_data Jiang Liu
2015-09-16 20:56 ` [tip:irq/urgent] genirq: Move field 'node' from irq_data into irq_common_data tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 08/36] sparc, irq: Use helper irq_data_get_irq_handler_data() to hide irq_desc details Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-07-31 21:53 ` [tip:irq/core] sparc/irq: Use helper irq_data_get_irq_handler_data() tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 09/36] x86, irq: Use helper irq_data_get_irq_handler_data() to hide irq_desc details Jiang Liu
2015-06-01 8:05 ` [Patch v3 10/36] " Jiang Liu
2015-06-01 8:05 ` [Patch v3 11/36] sh, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 11:38 ` Sergei Shtylyov
2015-06-01 11:38 ` Sergei Shtylyov
2015-06-01 13:53 ` Jiang Liu
2015-06-01 13:53 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 12/36] genirq: Move field 'handler_data' from struct irq_data into struct irq_common_data Jiang Liu
2015-09-16 20:56 ` [tip:irq/urgent] genirq: Move field 'handler_data' from irq_data into irq_common_data tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 13/36] mn10300: Fix incorrect use of data->affinity Jiang Liu
2015-06-26 19:49 ` [tip:irq/urgent] mn10300: Fix incorrect use of irq_data->affinity tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 14/36] genirq: Introduce helper function irq_data_get_affinity_mask() Jiang Liu
2015-06-20 17:19 ` [tip:irq/core] " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 15/36] alpha, irq: Use access helper irq_data_get_affinity_mask() Jiang Liu
2015-06-01 8:05 ` [Patch v3 16/36] ARM, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 17/36] ARM64, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-02 6:25 ` Hanjun Guo
2015-06-02 6:25 ` Hanjun Guo
2015-06-02 6:25 ` Hanjun Guo
2015-06-01 8:05 ` [Patch v3 18/36] blackfin, " Jiang Liu
2015-06-01 8:05 ` [Patch v3 19/36] IA64, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 20/36] metag, " Jiang Liu
2015-06-01 8:05 ` [Patch v3 21/36] mips, " Jiang Liu
2015-06-05 8:46 ` Ralf Baechle
2015-06-01 8:05 ` [Patch v3 22/36] mn10300, " Jiang Liu
2015-07-31 21:53 ` [tip:irq/core] mn10300/irq: " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 23/36] parisc, irq: " Jiang Liu
2015-07-31 21:53 ` [tip:irq/core] parisc/irq: " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 24/36] powerpc, irq: " Jiang Liu
2015-09-15 15:47 ` [tip:irq/urgent] " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 25/36] sh, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 26/36] sparc, " Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-07-31 21:54 ` [tip:irq/core] sparc/irq: " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 27/36] x86, irq: " Jiang Liu
2015-06-02 19:19 ` Thomas Gleixner
2015-06-02 19:19 ` Thomas Gleixner
2015-06-03 1:53 ` Jiang Liu
2015-06-03 1:53 ` Jiang Liu
2015-06-03 3:46 ` Jiang Liu
2015-06-03 3:46 ` Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 28/36] xtensa, " Jiang Liu
2015-06-01 8:05 ` [Patch v3 29/36] irqchip, " Jiang Liu
2015-07-11 21:38 ` [tip:irq/core] irqchip/mips-gic: " tip-bot for Jiang Liu
2015-06-01 8:05 ` [Patch v3 30/36] net/mlx4: Cache irq_desc->affinity instead of irq_desc Jiang Liu
2015-06-01 8:05 ` [Patch v3 31/36] genirq: Move field 'affinity' from struct irq_data into struct irq_common_data Jiang Liu
2015-06-03 3:47 ` Jiang Liu
2015-09-16 20:56 ` tip-bot for Jiang Liu [this message]
2015-06-01 8:05 ` [Patch v3 32/36] genirq: Rename irq_data_get_msi() as irq_data_get_msi_desc() Jiang Liu
2015-06-01 8:05 ` [Patch v3 33/36] genirq: Use helper function to access irq_data->msi_desc Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-02 3:45 ` [v3,33/36] " Michael Ellerman
2015-06-02 3:45 ` [v3, 33/36] " Michael Ellerman
2015-06-02 3:45 ` [v3,33/36] " Michael Ellerman
2015-06-02 3:45 ` Michael Ellerman
2015-06-02 5:46 ` Jiang Liu
2015-06-02 5:46 ` [v3, 33/36] " Jiang Liu
2015-06-02 5:46 ` [v3,33/36] " Jiang Liu
2015-06-03 16:53 ` Thomas Gleixner
2015-06-03 16:53 ` Thomas Gleixner
2015-06-03 16:53 ` Thomas Gleixner
2015-06-01 8:05 ` [Patch v3 34/36] genirq: Move field 'msi_desc' from struct irq_data into struct irq_common_data Jiang Liu
2015-09-16 20:57 ` [tip:irq/urgent] genirq: Move field 'msi_desc' from irq_data into irq_common_data tip-bot for Jiang Liu
[not found] ` <1433145945-789-1-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-06-01 8:05 ` [Patch v3 35/36] genirq: Pass irq_data to helper function __irq_set_chip_handler_name_locked() Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` Jiang Liu
2015-06-05 8:48 ` Ralf Baechle
2015-06-05 8:48 ` Ralf Baechle
2015-06-05 8:48 ` Ralf Baechle
2015-06-05 8:48 ` Ralf Baechle
2015-06-01 8:05 ` [Patch v3 36/36] genirq: Optimize irq_data_to_desc() to avoid irq_to_desc() lookup Jiang Liu
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-9df872faa7e1619e9278bec00ceaed2236533530@git.kernel.org \
--to=tipbot@zytor.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=cernekee@gmail.com \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=jiang.liu@linux.intel.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=yinghai@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.