Page MenuHomeFreeBSD

D25693.diff
No OneTemporary

D25693.diff

Index: head/sys/kern/subr_intr.c
===================================================================
--- head/sys/kern/subr_intr.c
+++ head/sys/kern/subr_intr.c
@@ -128,8 +128,12 @@
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
/*
* - 2 counters for each I/O interrupt.
@@ -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: head/sys/riscv/riscv/plic.c
===================================================================
--- head/sys/riscv/riscv/plic.c
+++ head/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
Tue, Nov 11, 10:26 AM (3 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25155485
Default Alt Text
D25693.diff (1 KB)

Event Timeline