From nobody Thu Apr 07 16:52:08 2022 X-Original-To: bugs@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 30C0D1AA527F for ; Thu, 7 Apr 2022 16:52:09 +0000 (UTC) (envelope-from bugzilla-noreply@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 4KZ6qX6JZrz3pcw for ; Thu, 7 Apr 2022 16:52:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 B88D91407F for ; Thu, 7 Apr 2022 16:52:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 237Gq8k3049390 for ; Thu, 7 Apr 2022 16:52:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 237Gq8hD049389 for bugs@FreeBSD.org; Thu, 7 Apr 2022 16:52:08 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Thu, 07 Apr 2022 16:52:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: d8zNeCFG@aon.at X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649350328; 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=WffqIIvm3sc61jL41BPS2xGXMFaV4cRinHx5plUIG2c=; b=A/cRt/9m5R9EV98zA+YJbQLJIJmvdYFiQzDR5CsRbUetjpj2EvaZyOhG4M6qrp6MnBs8bo Qo1NrapC5CpO6OR6b4Pi6pNo8/NMeOm9MxnMZvVMEZRt/SkLwK0pc72fZ+uEgCiRFrEN3y TflDrNRyya4RS8/xYs4N32p8aLX9II6ho53bkDG1ULQuNIJVpxTVByHRjR10VJkMDaq1Aq +XYgi5HYT2FrvYimdiBSlAq+3r4ztg1Bmma+lCNmKI3w2zeNlVT16U07K7P8BqKY/+NtqJ IvuBMhO2FsFUaSFFQJvweKAu+VVfNZeZ+7xchfxt2f8N/4BCUxDYBt6HXGamVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649350328; a=rsa-sha256; cv=none; b=NLOCgE9pOmEW6oxFiPcyVvD/AWaNRKWpZorSeFqJB1D7w/mKteIrtFNmT/UJdIQa24TzWk +JV2BNI09fE4KjvhOzPxtFvCenuVrAwJ12gyOz1gGb1G+6SgJVYGCwAcX/+Yyh5vHitqUZ kn3mSTcrdOw1kFNZOT4kVB7x+qMGkRSQCkkN18tIPoy0ww1OkB/LOB0I0xHFb5uVhIfYcS aAeIQvpvAwimOs6gF0wrJyTbfMAvry3jAwBSYo1q+FkbQVKsjhcpOfJ0c5Q8uDqUZjhjdi NQsmWVgMxNIm+gu0fjXNiM0xij54YCAFzi4QcNy9eyF/Nf1Q8YYBbHZg7IegmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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 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.=