Skip to content

Commit 006ae19

Browse files
committed
Merge branch 'irq/affinity' into irq/core
Merge the export of irq_set_affinity() which is a standalone commit so it can be pulled into other trees.
2 parents c2b1063 + 4d80d6c commit 006ae19

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

include/linux/interrupt.h

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -322,39 +322,8 @@ struct irq_affinity_desc {
322322

323323
extern cpumask_var_t irq_default_affinity;
324324

325-
/* Internal implementation. Use the helpers below */
326-
extern int __irq_set_affinity(unsigned int irq, const struct cpumask *cpumask,
327-
bool force);
328-
329-
/**
330-
* irq_set_affinity - Set the irq affinity of a given irq
331-
* @irq: Interrupt to set affinity
332-
* @cpumask: cpumask
333-
*
334-
* Fails if cpumask does not contain an online CPU
335-
*/
336-
static inline int
337-
irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
338-
{
339-
return __irq_set_affinity(irq, cpumask, false);
340-
}
341-
342-
/**
343-
* irq_force_affinity - Force the irq affinity of a given irq
344-
* @irq: Interrupt to set affinity
345-
* @cpumask: cpumask
346-
*
347-
* Same as irq_set_affinity, but without checking the mask against
348-
* online cpus.
349-
*
350-
* Solely for low level cpu hotplug code, where we need to make per
351-
* cpu interrupts affine before the cpu becomes online.
352-
*/
353-
static inline int
354-
irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
355-
{
356-
return __irq_set_affinity(irq, cpumask, true);
357-
}
325+
extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask);
326+
extern int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask);
358327

359328
extern int irq_can_set_affinity(unsigned int irq);
360329
extern int irq_select_affinity(unsigned int irq);

kernel/irq/manage.c

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ int irq_update_affinity_desc(unsigned int irq,
441441
return ret;
442442
}
443443

444-
int __irq_set_affinity(unsigned int irq, const struct cpumask *mask, bool force)
444+
static int __irq_set_affinity(unsigned int irq, const struct cpumask *mask,
445+
bool force)
445446
{
446447
struct irq_desc *desc = irq_to_desc(irq);
447448
unsigned long flags;
@@ -456,6 +457,36 @@ int __irq_set_affinity(unsigned int irq, const struct cpumask *mask, bool force)
456457
return ret;
457458
}
458459

460+
/**
461+
* irq_set_affinity - Set the irq affinity of a given irq
462+
* @irq: Interrupt to set affinity
463+
* @cpumask: cpumask
464+
*
465+
* Fails if cpumask does not contain an online CPU
466+
*/
467+
int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
468+
{
469+
return __irq_set_affinity(irq, cpumask, false);
470+
}
471+
EXPORT_SYMBOL_GPL(irq_set_affinity);
472+
473+
/**
474+
* irq_force_affinity - Force the irq affinity of a given irq
475+
* @irq: Interrupt to set affinity
476+
* @cpumask: cpumask
477+
*
478+
* Same as irq_set_affinity, but without checking the mask against
479+
* online cpus.
480+
*
481+
* Solely for low level cpu hotplug code, where we need to make per
482+
* cpu interrupts affine before the cpu becomes online.
483+
*/
484+
int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
485+
{
486+
return __irq_set_affinity(irq, cpumask, true);
487+
}
488+
EXPORT_SYMBOL_GPL(irq_force_affinity);
489+
459490
int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
460491
{
461492
unsigned long flags;

0 commit comments

Comments
 (0)