Skip to content

Commit ac2dd32

Browse files
committed
parisc: Clean up cpu_check_affinity() and drop cpu_set_affinity_irq()
The cpu_set_affinity_irq() isn't needed. Not the CPU irqs need to change, but the slave irq chips simply need to be reprogrammed to a new CPU irq with the txn_* functions. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 939fc85 commit ac2dd32

1 file changed

Lines changed: 2 additions & 21 deletions

File tree

arch/parisc/kernel/irq.c

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -105,28 +105,12 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)
105105
if (irqd_is_per_cpu(d))
106106
return -EINVAL;
107107

108-
/* whatever mask they set, we just allow one CPU */
109-
cpu_dest = cpumask_next_and(d->irq & (num_online_cpus()-1),
110-
dest, cpu_online_mask);
108+
cpu_dest = cpumask_first_and(dest, cpu_online_mask);
111109
if (cpu_dest >= nr_cpu_ids)
112-
cpu_dest = cpumask_first_and(dest, cpu_online_mask);
110+
cpu_dest = cpumask_first(cpu_online_mask);
113111

114112
return cpu_dest;
115113
}
116-
117-
static int cpu_set_affinity_irq(struct irq_data *d, const struct cpumask *dest,
118-
bool force)
119-
{
120-
int cpu_dest;
121-
122-
cpu_dest = cpu_check_affinity(d, dest);
123-
if (cpu_dest < 0)
124-
return -1;
125-
126-
cpumask_copy(irq_data_get_affinity_mask(d), dest);
127-
128-
return 0;
129-
}
130114
#endif
131115

132116
static struct irq_chip cpu_interrupt_type = {
@@ -135,9 +119,6 @@ static struct irq_chip cpu_interrupt_type = {
135119
.irq_unmask = cpu_unmask_irq,
136120
.irq_ack = cpu_ack_irq,
137121
.irq_eoi = cpu_eoi_irq,
138-
#ifdef CONFIG_SMP
139-
.irq_set_affinity = cpu_set_affinity_irq,
140-
#endif
141122
/* XXX: Needs to be written. We managed without it so far, but
142123
* we really ought to write it.
143124
*/

0 commit comments

Comments
 (0)