diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/interrupt.h | 35 | ||||
| -rw-r--r-- | include/linux/irq.h | 3 |
2 files changed, 36 insertions, 2 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c7bfac1c4a7b..8834a7e5b944 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -203,7 +203,40 @@ static inline int check_wakeup_irqs(void) { return 0; } | |||
| 203 | 203 | ||
| 204 | extern cpumask_var_t irq_default_affinity; | 204 | extern cpumask_var_t irq_default_affinity; |
| 205 | 205 | ||
| 206 | extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask); | 206 | /* Internal implementation. Use the helpers below */ |
| 207 | extern int __irq_set_affinity(unsigned int irq, const struct cpumask *cpumask, | ||
| 208 | bool force); | ||
| 209 | |||
| 210 | /** | ||
| 211 | * irq_set_affinity - Set the irq affinity of a given irq | ||
| 212 | * @irq: Interrupt to set affinity | ||
| 213 | * @mask: cpumask | ||
| 214 | * | ||
| 215 | * Fails if cpumask does not contain an online CPU | ||
| 216 | */ | ||
| 217 | static inline int | ||
| 218 | irq_set_affinity(unsigned int irq, const struct cpumask *cpumask) | ||
| 219 | { | ||
| 220 | return __irq_set_affinity(irq, cpumask, false); | ||
| 221 | } | ||
| 222 | |||
| 223 | /** | ||
| 224 | * irq_force_affinity - Force the irq affinity of a given irq | ||
| 225 | * @irq: Interrupt to set affinity | ||
| 226 | * @mask: cpumask | ||
| 227 | * | ||
| 228 | * Same as irq_set_affinity, but without checking the mask against | ||
| 229 | * online cpus. | ||
| 230 | * | ||
| 231 | * Solely for low level cpu hotplug code, where we need to make per | ||
| 232 | * cpu interrupts affine before the cpu becomes online. | ||
| 233 | */ | ||
| 234 | static inline int | ||
| 235 | irq_force_affinity(unsigned int irq, const struct cpumask *cpumask) | ||
| 236 | { | ||
| 237 | return __irq_set_affinity(irq, cpumask, true); | ||
| 238 | } | ||
| 239 | |||
| 207 | extern int irq_can_set_affinity(unsigned int irq); | 240 | extern int irq_can_set_affinity(unsigned int irq); |
| 208 | extern int irq_select_affinity(unsigned int irq); | 241 | extern int irq_select_affinity(unsigned int irq); |
| 209 | 242 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index d278838908cb..10a0b1ac4ea0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -394,7 +394,8 @@ extern void remove_percpu_irq(unsigned int irq, struct irqaction *act); | |||
| 394 | 394 | ||
| 395 | extern void irq_cpu_online(void); | 395 | extern void irq_cpu_online(void); |
| 396 | extern void irq_cpu_offline(void); | 396 | extern void irq_cpu_offline(void); |
| 397 | extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); | 397 | extern int irq_set_affinity_locked(struct irq_data *data, |
| 398 | const struct cpumask *cpumask, bool force); | ||
| 398 | 399 | ||
| 399 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 400 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
| 400 | void irq_move_irq(struct irq_data *data); | 401 | void irq_move_irq(struct irq_data *data); |
