From nobody Wed May 15 15:34:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vfcj93m0Kz5L3rc; Wed, 15 May 2024 15:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vfcj91RxQz4Q4Q; Wed, 15 May 2024 15:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715787277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPhGT4F3HxFOUQSPJ5+LAmXzSQbxythbD3aSlUJo2aE=; b=eQK6g5pZl6kIy2IxCMzrcSLpZKjraa/wxojjox9cxDizxtZqCmlpmkwcSmcXmBftG7b1c2 LaIOn3RaULPGZ99pzjuWhEag8BFYn3H67ILSGJ9dnP+ZX2DzxI+oQ6nqbApiiVkG3bbMud QZhpLHV9odZtlhJnz0wqckiHtivLePPYpru/4ZriV9FROGCxioq6i3zF8ygRANF8ehAGVQ rqbbFzjhL9YxsSt65/wcKB7NZmuC/d9U2yEECWzl6FB7z42mJ0+HaZkYbUpaQ3sS2Xu2iR ZbvgHyF11p4dTwb8g4vy3ExcMr5TbUrfsYm4YDlbc132CTJ+qfieSU6vsZuWAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715787277; a=rsa-sha256; cv=none; b=Gp9Nz01IpZ9lftK7UqtNU0A+U9RND8UrSYajF8plj4ZeAXXTw8dmBRk7YCpLP8OXULmY6u 4TuqUSXfeouqmTed19Q+QZOpJC8ukxAtFW2Gli6WVAUt5q8CE4tyuoSwRpyFE9j5v9+boY 4+GP9AQmju3r79XeBgc1LZ1XMVuhLRrS8zU/XPe6lS92X1an4Udxiemtd9FlEe3y3Z51Vl gFNajum4yLQwCJT41ygx5iCEwC3Tz0u7tj03vlQVN1DZDCoTMNd0p1AS0qcXYtc70zye6T zvv0jDiHs9W2iS95JugTQ+/tYfORYJMA7XlBINNFqQt3+CWQe/FV898fN69sgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715787277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPhGT4F3HxFOUQSPJ5+LAmXzSQbxythbD3aSlUJo2aE=; b=mOQCfY/mRipSvLoBSzD47+GQJR+NCBefpMSqXXSbG5rQeq6vtLoEiLN+TzgSWHRUGXw4HA tJG/FiswxHMOwuNNPeBeu2BL9bE7FS4LXSxCIhva/EsYN+LtavPNP71Ktyr5fLH1WOXdvG O61w4GUJdgv9WqWfOv4L4TP9ob9rgFp70nxbI7W+3JCi6jThQQp6s3+LwBYpZhN1EU16Of 5vxWkbmsCuP1BWka2NT9RiX8P2ZDc8r43SI+f/EpJGKbXbJ2e5IRB4ocKFQ/7LTUrY0ZVM F/0ua80aZBEKEmbfOlpAa7YYg9pV9zwvc1ZgaDjfBSx/e+WOt1nIFK0UXRiADQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vfcj912cBzLLk; Wed, 15 May 2024 15:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44FFYb1s018816; Wed, 15 May 2024 15:34:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44FFYbFb018813; Wed, 15 May 2024 15:34:37 GMT (envelope-from git) Date: Wed, 15 May 2024 15:34:37 GMT Message-Id: <202405151534.44FFYbFb018813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mike Karels Subject: git: 3e627553bbd7 - stable/14 - Revert "intrng: switch from MAXCPU to mp_ncpus" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3e627553bbd791a4f73eaeea2c2d795fd4e0ee70 Auto-Submitted: auto-generated The branch stable/14 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=3e627553bbd791a4f73eaeea2c2d795fd4e0ee70 commit 3e627553bbd791a4f73eaeea2c2d795fd4e0ee70 Author: Mike Karels AuthorDate: 2024-05-14 22:44:58 +0000 Commit: Mike Karels CommitDate: 2024-05-15 15:34:26 +0000 Revert "intrng: switch from MAXCPU to mp_ncpus" This reverts commit b4d11915c73f199501672b278be86e1f63790036. This is a direct commit to stable/14. The change breaks booting on older Raspberry Pi 4's, although that works on main. The cause is unknown. The original commit should be redone on stable/14 if/when it catches up with main. --- sys/kern/subr_intr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 49fe20cdc890..6535c42f2404 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -175,11 +175,11 @@ intr_irq_init(void *dummy __unused) /* * - 2 counters for each I/O interrupt. - * - mp_maxid + 1 counters for each IPI counters for SMP. + * - MAXCPU counters for each IPI counters for SMP. */ nintrcnt = intr_nirq * 2; #ifdef SMP - nintrcnt += INTR_IPI_COUNT * (mp_maxid + 1); + nintrcnt += INTR_IPI_COUNT * MAXCPU; #endif intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTRNG, @@ -312,18 +312,18 @@ intr_ipi_setup_counters(const char *name) mtx_lock(&isrc_table_lock); /* - * We should never have a problem finding mp_maxid + 1 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. + * We should never have a problem finding MAXCPU 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, mp_maxid + 1, &index); + bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index); if (index == -1) panic("Failed to allocate %d counters. Array exhausted?", - mp_maxid + 1); - bit_nset(intrcnt_bitmap, index, index + mp_maxid); - for (i = 0; i < mp_maxid + 1; i++) { + MAXCPU); + bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1); + for (i = 0; i < MAXCPU; i++) { snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); intrcnt_setname(str, index + i); }