From nobody Tue Nov 17 08:40:41 2026 X-Original-To: dev-commits-src-main@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 4jTJ8n1lZ2z70xh4 for ; Tue, 17 Nov 2026 08:40:41 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTJ8n12F8z4t8H for ; Tue, 17 Nov 2026 08:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794904841; 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=jxLRGoiAUED5TbSJMz+OIF3oB9U/w8AVPManMa4buiw=; b=Lf/dsEvGd78m6WWnSLnNNcea1WFZsVuKGIjbM8uEUkNIeihm3B8NdKUS6/VagX3vgHn5w+ XZBlFXlGnCR8OfwDL3Fyee5zBvsHm4S7Q28miOZzxnWRCCBGWPo9cnLoLljzn0F4TPA6Ub 9S4ZoAyQf9klrbCFFij3mbboe0HB4vwAOFOlN0dkj8Akp4bZaBU1XlnOeSd0OzQ0s5PrDj ZrGZLG3N+ggYVTmlzfKbY2QcUQL1B6X2Rlnu19XJlBgA37FLoX7lstWRgiHMxJHu9V/Mrq fZmelUoIc/cVLL2IDoH+vDT+xx50jtS5wvr7h1cZyJ0X9/EaKHm0+90QV00zig== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794904841; b=Qpk3iftEPXSDzHFF+76gSAo++2cGJVuCKN/GUSpJKtzjVufDKfq1t+NTsEA9wjNm+pZ7sQ WMWAo3zVjFd69mSwreKmTzHzoZwuW7B0Ehc7/4l5GYJyzS5/q/OFAj5Nlnv3MG4PEuKl4O iPHHfwilm8i4bj7aea5okrI3XpTQyKf80gUD6ZOlQZVaAJChbOcP6tLk5dU2XAa+sGkomw 0aw3m/DdedG43l6t149fFpgc5dYXEZmSWbscX6H1OnC4PzYgWc2t4Q8QPKoIZp8dj+NWUP ryhybekhg7bqVFe2zFsBQIHNX9HrBGtC31stX6xLqKkzr80+lSscfzUyBzLuSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794904841; 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=jxLRGoiAUED5TbSJMz+OIF3oB9U/w8AVPManMa4buiw=; b=MuyCA47TKc12BMqoy5eRytlVecKmMnj/IpjrY34daVWgKCRLPCwiESrSLJaPgar8lWARYd /KrOfEJL6xMBeh+2ZSy1wq0H5xsiN2G32N1STcTjcqvADWjOj4CCdCqmySpFzrhNl9pJ1b q77Jem6xidNmTn3asTZfWSwQRCcaUgClrTM2kqjfzp7QFphZ92BYKPAJ9QfynrcU7FZvbM pOMuhF3dcrRg+urnTy2UQMrfoOt95IharnXEoCO68a4mRcOz+nFFA/w7SjGqU9o3kncb+M y9P/ttLmja3DngBNcKLU52ZN5R5orfEbL8tsEnnvoCLX11MDu2tb3mIOk9AiGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jTJ8n0j4tzb13 for ; Tue, 17 Nov 2026 08:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id af01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 08:40:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 4b3364a4bceb - main - powerpc: move get_pcpu() to machine/pcpu.h List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org List-Id: Commit messages for the main branch of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b3364a4bceb61c5870f50b75bf56272ca850944 Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 08:40:41 +0000 Message-Id: <6afc1309.af01.48db9c74@gitrepo.freebsd.org> The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=4b3364a4bceb61c5870f50b75bf56272ca850944 commit 4b3364a4bceb61c5870f50b75bf56272ca850944 Author: Piotr Kubaj AuthorDate: 2026-11-07 21:12:48 +0000 Commit: Piotr Kubaj CommitDate: 2026-11-17 08:40:34 +0000 powerpc: move get_pcpu() to machine/pcpu.h Every other arch defines get_pcpu() in machine/pcpu.h, powerpc has it in machine/cpufunc.h, which is entirely under _KERNEL. lsof includes sys/systm.h without _KERNEL first on purpose, so on powerpc cpufunc.h turns into an empty header and pcpup later expands to a call of an undeclared get_pcpu(). Since sys/mount.h started pulling in sys/proc.h this breaks the lsof build on powerpc64 and powerpc64le. Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D61305 --- sys/powerpc/include/cpufunc.h | 10 ---------- sys/powerpc/include/pcpu.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 19a7ae01df0c..0754b51df1b9 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -246,16 +246,6 @@ intr_restore(register_t msr) mtmsr(msr); } -static __inline struct pcpu * -get_pcpu(void) -{ - struct pcpu *ret; - - __asm __volatile("mfsprg %0, 0" : "=r"(ret)); - - return (ret); -} - /* "NOP" operations to signify priorities to the kernel. */ static __inline void nop_prio_vlow(void) diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h index 994964cab63e..be80649b1265 100644 --- a/sys/powerpc/include/pcpu.h +++ b/sys/powerpc/include/pcpu.h @@ -155,6 +155,16 @@ struct pvo_entry; #ifdef _KERNEL +static __inline struct pcpu * +get_pcpu(void) +{ + struct pcpu *ret; + + __asm __volatile("mfsprg %0, 0" : "=r"(ret)); + + return (ret); +} + #define pcpup (get_pcpu()) static __inline __pure2 struct thread *