From: cheloha Date: Sun, 18 Sep 2022 20:38:50 +0000 (+0000) Subject: tsc: make tsc_report_test_results() less noisy without TSC_DEBUG X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3dc28311b2918a493e5a95a5ab4b79e6741a1a11;p=openbsd tsc: make tsc_report_test_results() less noisy without TSC_DEBUG By default, just say "tsc: cpu0/cpuN: sync test failed". If you want more information you need to recompile with TSC_DEBUG set. While here, disable TSC_DEBUG. "sure" deraadt@ --- diff --git a/sys/arch/amd64/amd64/tsc.c b/sys/arch/amd64/amd64/tsc.c index 66cbde708e2..aff10119651 100644 --- a/sys/arch/amd64/amd64/tsc.c +++ b/sys/arch/amd64/amd64/tsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsc.c,v 1.27 2022/09/15 19:30:51 cheloha Exp $ */ +/* $OpenBSD: tsc.c,v 1.28 2022/09/18 20:38:50 cheloha Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. * Copyright (c) 2016,2017 Reyk Floeter @@ -267,8 +267,6 @@ tsc_delay(int usecs) #ifdef MULTIPROCESSOR -#define TSC_DEBUG 1 - /* * Protections for global variables in this code: * @@ -405,6 +403,7 @@ tsc_test_sync_ap(struct cpu_info *ci) void tsc_report_test_results(void) { +#ifdef TSC_DEBUG u_int round = TSC_TEST_ROUNDS - tsc_test_rounds + 1; if (tsc_bp_status.adj != 0) { @@ -429,6 +428,10 @@ tsc_report_test_results(void) tsc_ap_name, tsc_ap_name, tsc_ap_status.lag_count, tsc_ap_status.lag_max); } +#else + if (tsc_ap_status.lag_count > 0 || tsc_bp_status.lag_count > 0) + printf("tsc: cpu0/%s: sync test failed\n", tsc_ap_name); +#endif /* TSC_DEBUG */ } /*