diff options
| author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-05-16 16:08:32 +0200 |
|---|---|---|
| committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-05-16 16:08:32 +0200 |
| commit | 3f04e3d3eb77ac9df70619b9c87da71b0eeddc36 (patch) | |
| tree | cf1cbadc390888d1910a81ffc40161f783363075 /include/linux/interrupt.h | |
| parent | 8cffcb0ca33381e07cee4ebe1301d0794054fc97 (diff) | |
| parent | 2779ac167b1a1bf8153dca9f3a141c6148c6b89f (diff) | |
Merge remote-tracking branch 'tip/timers/core/timers/core' into clockevents/3.16
Diffstat (limited to 'include/linux/interrupt.h')
| -rw-r--r-- | include/linux/interrupt.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c7bfac1c4a7b..97ac926c78a7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -203,7 +203,40 @@ static inline int check_wakeup_irqs(void) { return 0; } extern cpumask_var_t irq_default_affinity; -extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask); +/* Internal implementation. Use the helpers below */ +extern int __irq_set_affinity(unsigned int irq, const struct cpumask *cpumask, + bool force); + +/** + * irq_set_affinity - Set the irq affinity of a given irq + * @irq: Interrupt to set affinity + * @cpumask: cpumask + * + * Fails if cpumask does not contain an online CPU + */ +static inline int +irq_set_affinity(unsigned int irq, const struct cpumask *cpumask) +{ + return __irq_set_affinity(irq, cpumask, false); +} + +/** + * irq_force_affinity - Force the irq affinity of a given irq + * @irq: Interrupt to set affinity + * @cpumask: cpumask + * + * Same as irq_set_affinity, but without checking the mask against + * online cpus. + * + * Solely for low level cpu hotplug code, where we need to make per + * cpu interrupts affine before the cpu becomes online. + */ +static inline int +irq_force_affinity(unsigned int irq, const struct cpumask *cpumask) +{ + return __irq_set_affinity(irq, cpumask, true); +} + extern int irq_can_set_affinity(unsigned int irq); extern int irq_select_affinity(unsigned int irq); |
