Page MenuHomeFreeBSD

D25693.id74539.diff
No OneTemporary

D25693.id74539.diff

Index: sys/kern/subr_intr.c
===================================================================
--- sys/kern/subr_intr.c
+++ sys/kern/subr_intr.c
@@ -128,7 +128,11 @@
u_int irq_next_free;
#ifdef SMP
-static boolean_t irq_assign_cpu = FALSE;
+#ifdef EARLY_AP_STARTUP
+static bool irq_assign_cpu = true;
+#else
+static bool irq_assign_cpu = false;
+#endif
#endif
/*
@@ -1191,6 +1195,7 @@
return (last_cpu);
}
+#ifndef EARLY_AP_STARTUP
/*
* Distribute all the interrupt sources among the available
* CPUs once the AP's have been launched.
@@ -1205,7 +1210,7 @@
return;
mtx_lock(&isrc_table_lock);
- irq_assign_cpu = TRUE;
+ irq_assign_cpu = true;
for (i = 0; i < NIRQ; i++) {
isrc = irq_sources[i];
if (isrc == NULL || isrc->isrc_handlers == 0 ||
@@ -1231,6 +1236,7 @@
mtx_unlock(&isrc_table_lock);
}
SYSINIT(intr_irq_shuffle, SI_SUB_SMP, SI_ORDER_SECOND, intr_irq_shuffle, NULL);
+#endif /* !EARLY_AP_STARTUP */
#else
u_int
@@ -1239,7 +1245,7 @@
return (PCPU_GET(cpuid));
}
-#endif
+#endif /* SMP */
/*
* Allocate memory for new intr_map_data structure.
Index: sys/riscv/riscv/plic.c
===================================================================
--- sys/riscv/riscv/plic.c
+++ sys/riscv/riscv/plic.c
@@ -408,8 +408,7 @@
sc = device_get_softc(dev);
src = (struct plic_irqsrc *)isrc;
- /* Bind to the boot CPU for now. */
- CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu);
+ CPU_ZERO(&isrc->isrc_cpu);
plic_bind_intr(dev, isrc);
return (0);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 6:31 PM (4 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25787195
Default Alt Text
D25693.id74539.diff (1 KB)

Event Timeline