Browse Source

Get IRQ smp affinity on each scan

Serj Kalichev 9 years ago
parent
commit
c2614f0185
1 changed files with 6 additions and 3 deletions
  1. 6 3
      irq.c

+ 6 - 3
irq.c

@@ -295,13 +295,16 @@ int scan_irqs(lub_list_t *irqs, lub_list_t *balance_irqs, lub_list_t *pxms)
 		free(irq->desc);
 		irq->desc = strndup(tok, endptr - tok);
 
+		/* Always get current smp affinity. It's necessary due to
+		 * problems with arch/driver. The affinity can be old (didn't
+		 * switched to new state).
+		 */
+		irq_get_affinity(irq);
+
 		if (new) {
 			/* By default all CPUs are local for IRQ. Real local
 			   CPUs will be find while sysfs scan. */
 			cpus_setall(irq->local_cpus);
-
-			irq_get_affinity(irq);
-
 			lub_list_add(balance_irqs, irq);
 			printf("Add IRQ %3d %s\n", irq->irq, STR(irq->desc));
 		}