Skip to content

Commit 42ee2b7

Browse files
Andi KleenLinus Torvalds
authored andcommitted
x86_64: Report the pending irq if available in smp_affinity
Otherwise smp_affinity would only update after the next interrupt on x86 systems. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 78b599a commit 42ee2b7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

kernel/irq/proc.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ static struct proc_dir_entry *root_irq_dir;
1919
static int irq_affinity_read_proc(char *page, char **start, off_t off,
2020
int count, int *eof, void *data)
2121
{
22-
int len = cpumask_scnprintf(page, count, irq_desc[(long)data].affinity);
22+
struct irq_desc *desc = irq_desc + (long)data;
23+
cpumask_t *mask = &desc->affinity;
24+
int len;
25+
26+
#ifdef CONFIG_GENERIC_PENDING_IRQ
27+
if (desc->status & IRQ_MOVE_PENDING)
28+
mask = &desc->pending_mask;
29+
#endif
30+
len = cpumask_scnprintf(page, count, *mask);
2331

2432
if (count - len < 2)
2533
return -EINVAL;

0 commit comments

Comments
 (0)