Page MenuHomeFreeBSD

D41462.id126019.diff
No OneTemporary

D41462.id126019.diff

diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c
--- a/sys/kern/subr_intr.c
+++ b/sys/kern/subr_intr.c
@@ -177,11 +177,11 @@
/*
* - 2 counters for each I/O interrupt.
- * - MAXCPU counters for each IPI counters for SMP.
+ * - mp_ncpus counters for each IPI counters for SMP.
*/
nintrcnt = intr_nirq * 2;
#ifdef SMP
- nintrcnt += INTR_IPI_COUNT * MAXCPU;
+ nintrcnt += INTR_IPI_COUNT * mp_ncpus;
#endif
intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTRNG,
@@ -314,18 +314,18 @@
mtx_lock(&isrc_table_lock);
/*
- * We should never have a problem finding MAXCPU contiguous counters,
+ * We should never have a problem finding mp_ncpus contiguous counters,
* in practice. Interrupts will be allocated sequentially during boot,
* so the array should fill from low to high index. Once reserved, the
* IPI counters will never be released. Similarly, we will not need to
* allocate more IPIs once the system is running.
*/
- bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index);
+ bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_ncpus, &index);
if (index == -1)
panic("Failed to allocate %d counters. Array exhausted?",
- MAXCPU);
- bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1);
- for (i = 0; i < MAXCPU; i++) {
+ mp_ncpus);
+ bit_nset(intrcnt_bitmap, index, index + mp_ncpus - 1);
+ for (i = 0; i < mp_ncpus; i++) {
snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name);
intrcnt_setname(str, index + i);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 9, 9:53 PM (2 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40506450
Default Alt Text
D41462.id126019.diff (1 KB)

Event Timeline