Date: Thu, 07 Apr 2022 16:52:08 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263124] sys/x86/isa/clock.c: lapic_calibrate_timer() in cpu_initclocks() breaks compiling for non-SMP Message-ID: <bug-263124-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263124 Bug ID: 263124 Summary: sys/x86/isa/clock.c: lapic_calibrate_timer() in cpu_initclocks() breaks compiling for non-SMP Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: d8zNeCFG@aon.at Created attachment 233034 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233034&action= =3Dedit config file for non-SMP build Scenario: - FreeBSD 13.0 latest - Checking out releng/13.1 (=3D RC1) into /usr/src - Building a non-SMP kernel with a custom config previously used for 13.0 ("XYZZY") Result: - The build fails when linking the kernel with linking kernel.full ld: error: undefined symbol: apic_ops >>> referenced by apicvar.h:386 (/net/hal/z/SRC/FreeBSD/src/MBi/releng/13.1= /sys/x86/include/apicvar.h:386) >>> clock.o:(cpu_initclocks) *** Error code 1 Expected result: - The build should succeed even without "options SMP" and "device apic" bei= ng defined in the kernel configuration file Note: Diffing sys/x86/isa/clock.c between 13.0 and 13.1 yields: 68a69 > #include <x86/apicvar.h> 413a415,417 >=20 > tsc_calibrate(); > lapic_calibrate_timer(); 427a432,433 > tsc_calibrate(); > lapic_calibrate_timer(); 457c463 < CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, --- > CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, It seems the calls to lapic_calibrate_timer() should be made conditional on= the SMP case. The config file is attached. -- Martin --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263124-227>