Introduced @2358492b0347 x86: Add zen identifier helper function https://reviews.freebsd.org/D56330 --- locore.o --- ./x86/cputypes.h:57:21: error: expected register here u_int ident_zen_cpu(void); ^ *** [locore.o] Error code 1 make[2]: stopped making "all" in /usr/obj/usr/local/src/i386.i386/sys/GENERIC
(In reply to Dan Kotowski from comment #0) I move the discussion to phab.
(In reply to Dan Kotowski from comment #0) https://reviews.freebsd.org/D56377 Could you please try this?
(In reply to ShengYi Hung from comment #2) Should this work? diff --git a/sys/x86/include/cputypes.h b/sys/x86/include/cputypes.h index ed26304a89ac..eaafa3f65b30 100644 --- a/sys/x86/include/cputypes.h +++ b/sys/x86/include/cputypes.h @@ -54,7 +54,9 @@ #define CPU_AMD_UNKNOWN 0xffffffff #ifdef _KERNEL +#ifndef _LOCORE u_int ident_zen_cpu(void); #endif +#endif #endif /* !_X86_CPUTYPES_H_ */
(In reply to Dan Kotowski from comment #3) This is suggested by kib@. I think it should work
(In reply to ShengYi Hung from comment #4) Actually s/_LOCORE/LOCORE/ diff --git a/sys/x86/include/cputypes.h b/sys/x86/include/cputypes.h index ed26304a89ac..0b6f0f3746a9 100644 --- a/sys/x86/include/cputypes.h +++ b/sys/x86/include/cputypes.h @@ -54,7 +54,9 @@ #define CPU_AMD_UNKNOWN 0xffffffff #ifdef _KERNEL +#ifndef LOCORE u_int ident_zen_cpu(void); #endif +#endif #endif /* !_X86_CPUTYPES_H_ */ -------------------------------------------------------------- >>> Kernel build for GENERIC completed on Mon Apr 13 16:27:27 UTC 2026 -------------------------------------------------------------- >>> Kernel(s) GENERIC built in 144 seconds, ncpu: 32, make -j32 --------------------------------------------------------------
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=43d632779b7d1df6c96a5cc0f506c13e09a845f3 commit 43d632779b7d1df6c96a5cc0f506c13e09a845f3 Author: ShengYi Hung <aokblast@FreeBSD.org> AuthorDate: 2026-04-13 14:46:43 +0000 Commit: ShengYi Hung <aokblast@FreeBSD.org> CommitDate: 2026-04-14 04:58:39 +0000 x86: Mark LOCORE to prevent build failure on i386 platform PR: 294468 Reported by: dan.kotowski@a9development.com Tested by: dan.kotowski@a9development.com Discussed with: kib Fixes: 9289df1949cd ("x86: Add zen identifier helper function") MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56377 sys/x86/include/cputypes.h | 2 ++ 1 file changed, 2 insertions(+)