diff mbox

[RFC,v1,03/11] genirq: Use CONFIG_NUMA instead of CONFIG_SMP to guard irq_common_data.node

Message ID 1430709339-29083-4-git-send-email-jiang.liu@linux.intel.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jiang Liu May 4, 2015, 3:15 a.m. UTC
NUMA is enabled by CONFIG_NUMA instead of CONFIG_SMP, so use CONFIG_NUMA
to guard irq_common_data.node.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 include/linux/irq.h  |    4 ++--
 kernel/irq/irqdesc.c |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

Comments

Thomas Gleixner May 15, 2015, 8:44 p.m. UTC | #1
On Mon, 4 May 2015, Jiang Liu wrote:

> NUMA is enabled by CONFIG_NUMA instead of CONFIG_SMP, so use CONFIG_NUMA
> to guard irq_common_data.node.

Please move this change to the front and do it on irq_data. That would
have avoided confusing Abel :)

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiang Liu May 18, 2015, 5:17 a.m. UTC | #2
On 2015/5/16 4:44, Thomas Gleixner wrote:
> On Mon, 4 May 2015, Jiang Liu wrote:
> 
>> NUMA is enabled by CONFIG_NUMA instead of CONFIG_SMP, so use CONFIG_NUMA
>> to guard irq_common_data.node.
> 
> Please move this change to the front and do it on irq_data. That would
> have avoided confusing Abel :)
Hi Thomas,
	Reordering these two patches will cause too much unnecessary code
changes. so I will merge this patch into the patch to move node from
struct irq_data into struct irq_common_data, which is more
straight forward.
Thanks!
Gerry

> 
> Thanks,
> 
> 	tglx
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 3f999a0af713..0138f046642c 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -133,7 +133,7 @@  struct irq_domain;
  */
 struct irq_common_data {
 	unsigned int		state_use_accessors;
-#ifdef CONFIG_SMP
+#ifdef CONFIG_NUMA
 	unsigned int		node;
 #endif
 };
@@ -638,7 +638,7 @@  static inline u32 irq_get_trigger_type(unsigned int irq)
 
 static inline int irq_common_data_get_node(struct irq_common_data *d)
 {
-#ifdef CONFIG_SMP
+#ifdef CONFIG_NUMA
 	return d->node;
 #else
 	return 0;
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 20773f073e24..0c3057e42906 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -52,11 +52,13 @@  static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node)
 
 static void desc_smp_init(struct irq_desc *desc, int node)
 {
-	desc->irq_common_data.node = node;
 	cpumask_copy(desc->irq_data.affinity, irq_default_affinity);
 #ifdef CONFIG_GENERIC_PENDING_IRQ
 	cpumask_clear(desc->pending_mask);
 #endif
+#ifdef CONFIG_NUMA
+	desc->irq_common_data.node = node;
+#endif
 }
 
 #else