From nobody Wed May 15 16:35:59 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 4Vff3z3p8Mz5L7sD; Wed, 15 May 2024 16:35:59 +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 4Vff3z3HMtz4YWN; Wed, 15 May 2024 16:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715790959; 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=rcUenXNWJ9YH82stG4AKZ89KbRI9fLhbb7TufBf+f3w=; b=ekHwHRKV6CA+FNDLpX7VZZH6cV63+vNN1c4YttO04ygvymR0Y4fzchdeVVQAJp5f8asu/0 OUimTEFQgjPy3moood+9jWtHS90cecD17APJkraRsYRVBmgrcZfzOmUTKR8s7wAGJnPO/s rno6wvl67USBAk3BEHFD8PAUY9p2nd+zdf/EIL83Ne44joKmJ9BydzXVWwjZIfPw+uDH7C rjq4hPepR60WFboIV5C/UqPSVdWjt/rxVrMVXZBXV4B7G14C1392pk/Fq7O/G2q5O0Wv5X 2yCduMqFGQKb4QolMrdsv8UhvxLAI8P3b0IAu/0hhDoGwzR0ea3aN9BCV2yWaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715790959; a=rsa-sha256; cv=none; b=ZYR7vXtywNgn1GkpmZGQRCm2t7c3WxGO0QRv4njo9wIPx/P3hCtCEcnWZXK7jWQGRm6mVj 3pnhsvziwf8l6YRLgMvmbxibIr1DinUGrixsAKvuR7mhU5BuMis0ohFkRN92tcXlM8m5X7 MY8BHtU27GkYmnnDMeGo9ZPbyIQQvyGZIYUHw8m53N8L9rf39ke8nmRsaoVSuIFGdrHxve N544DCNpzGPTyPlFXTqB/a5ODMkRUxyZIcYBmXqst12FJRJmzYbw/fu2WfDEKSTOC0hKl5 fM2rUJf/tWQYRKaZAB6CE9Y87M8tv0uwM4MH0D7ZxV6bxj2YvY1Z3Bq1ydhBcw== 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=1715790959; 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=rcUenXNWJ9YH82stG4AKZ89KbRI9fLhbb7TufBf+f3w=; b=CI2BCdxyZRvFgG4xOROA8Jw24ZJ8vHhSj3o0rgdUbnWHJKKMisWphoS+CVtWNMDfypIheL o1VWMAr9TQVMU7VdOro20/oSQSvjkSrLi5eXLhEcrXcN054N02nAYnXixflc0GMRQM9bKK m/yeG8WnmylSrBsy8EFbcP+a7i++p82uUDeccXtW2kBkhJJF742MLROT0j1Z34Xmh9ye7o pObcXh6H0sXodEAoJo+ZV0d0ReeE2h1hanpz0zbT/+Qi4jyg23p7VfyR18LmRUj2DCyWH+ lCgct/Ns6kQS1nO0BL/bd39XiW7y6UsQfr/obLnqI78IYu/himRsLmbO17IjeA== 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 4Vff3z2p5PzMyQ; Wed, 15 May 2024 16:35:59 +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 44FGZxak021249; Wed, 15 May 2024 16:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44FGZxAS021246; Wed, 15 May 2024 16:35:59 GMT (envelope-from git) Date: Wed, 15 May 2024 16:35:59 GMT Message-Id: <202405151635.44FGZxAS021246@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: b827afb9e3a7 - releng/14.1 - 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: b827afb9e3a7aaaa2da7d101c46881c646d4df2f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=b827afb9e3a7aaaa2da7d101c46881c646d4df2f commit b827afb9e3a7aaaa2da7d101c46881c646d4df2f Author: Mike Karels AuthorDate: 2024-05-14 22:44:58 +0000 Commit: Mike Karels CommitDate: 2024-05-15 16:35:38 +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. (cherry picked from commit 3e627553bbd791a4f73eaeea2c2d795fd4e0ee70) Approved-by: re (cperciva) --- 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); }