Commit eecd3bdb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix xics IRQ affinity

From: Anton Blanchard <anton@samba.org>

- Merge some whitespace differences with the ameslab tree
- We check for CPU_MASK_ALL in xics to send irqs to all cpus.
  In some cases CPU_MASK_ALL is smaller than the cpumask (eg
  NR_CPUS == 32 and cpumask is a long), so we mask it here to
  be consistent.
parent 09cce79c
......@@ -183,6 +183,7 @@ do_free_irq(int irq, void* dev_id)
return -ENOENT;
}
int request_irq(unsigned int irq,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
......@@ -699,6 +700,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
{
int irq = (long)data, full_count = count, err;
cpumask_t new_value, tmp;
cpumask_t allcpus = CPU_MASK_ALL;
if (!irq_desc[irq].handler->set_affinity)
return -EIO;
......@@ -707,6 +709,14 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
if (err)
return err;
/*
* We check for CPU_MASK_ALL in xics to send irqs to all cpus.
* In some cases CPU_MASK_ALL is smaller than the cpumask (eg
* NR_CPUS == 32 and cpumask is a long), so we mask it here to
* be consistent.
*/
cpus_and(new_value, new_value, allcpus);
/*
* Do not allow disabling IRQs completely - it's a too easy
* way to make the system unusable accidentally :-) At least
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment