[RFC v1 03/11] genirq: Use CONFIG_NUMA instead of CONFIG_SMP to guard irq_common_data.node
From: Jiang Liu
Date: Sun May 03 2015 - 23:14:37 EST
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@xxxxxxxxxxxxxxx>
---
include/linux/irq.h | 4 ++--
kernel/irq/irqdesc.c | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
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
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/