Skip to content

Commit a64003d

Browse files
seehearfeelKAGA-KOKO
authored andcommitted
irqchip/loongson-eiointc: Set CPU affinity only on SMP machines for LoongArch
According to the code comment of "struct irq_chip", the member "irq_set_affinity" is to set the CPU affinity on SMP machines, so define and call eiointc_set_irq_affinity() only under CONFIG_SMP. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240326121130.16622-4-yangtiezhu@loongson.cn
1 parent b327708 commit a64003d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/irqchip/irq-loongson-eiointc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static int cpu_to_eio_node(int cpu)
5959
return cpu_logical_map(cpu) / CORES_PER_EIO_NODE;
6060
}
6161

62+
#ifdef CONFIG_SMP
6263
static void eiointc_set_irq_route(int pos, unsigned int cpu, unsigned int mnode, nodemask_t *node_map)
6364
{
6465
int i, node, cpu_node, route_node;
@@ -126,6 +127,7 @@ static int eiointc_set_irq_affinity(struct irq_data *d, const struct cpumask *af
126127

127128
return IRQ_SET_MASK_OK;
128129
}
130+
#endif
129131

130132
static int eiointc_index(int node)
131133
{
@@ -238,7 +240,9 @@ static struct irq_chip eiointc_irq_chip = {
238240
.irq_ack = eiointc_ack_irq,
239241
.irq_mask = eiointc_mask_irq,
240242
.irq_unmask = eiointc_unmask_irq,
243+
#ifdef CONFIG_SMP
241244
.irq_set_affinity = eiointc_set_irq_affinity,
245+
#endif
242246
};
243247

244248
static int eiointc_domain_alloc(struct irq_domain *domain, unsigned int virq,

0 commit comments

Comments
 (0)