* [thomas-weissschuh:b4/auxclock-nanosleep 16/39] kernel/time/timekeeping.c:156:1: error: use of undeclared identifier 'symbol'
@ 2026-08-04 18:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-04 18:35 UTC (permalink / raw)
To: Thomas Weißschuh (Schneider Electric); +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/auxclock-nanosleep
head: 67005bd34e048d0f0fb4f5762d159093fac52cb7
commit: dcfa56542ac7fa99290449e0a2409b2d9e875e1c [16/39] timekeeping: time_test: Add a test for auxiliary to monotonic clock conversions
config: x86_64-randconfig-076-20260804 (https://download.01.org/0day-ci/archive/20260805/202608050219.FPUJpehf-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260805/202608050219.FPUJpehf-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608050219.FPUJpehf-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/time/timekeeping.c:156:1: error: use of undeclared identifier 'symbol'
156 | EXPORT_SYMBOL_FOR_TIME_TEST(tk_aux_capture_mono_conv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/time/timekeeping.h:44:72: note: expanded from macro 'EXPORT_SYMBOL_FOR_TIME_TEST'
44 | #define EXPORT_SYMBOL_FOR_TIME_TEST(_symbol) EXPORT_SYMBOL_FOR_MODULES(symbol, "time_test");
| ^~~~~~
1 error generated.
vim +/symbol +156 kernel/time/timekeeping.c
80
81 /*
82 * Conversion between auxiliary and monotonic clock timestamps.
83 *
84 * ktime_mono_to_aux() and ktime_aux_to_mono() utilize conversion factors
85 * for converting from one clock to another. These conversion factors are
86 * updated periodically and are based on a common base time stamp derived
87 * from a clocksource readout:
88 *
89 * cs_base = read_clock()
90 * mono_base_ns = tk_cs_to_ns(MONO, cs_base)
91 * aux_base_ns = tk_cs_to_ns(AUX, cs_base)
92 *
93 * The progression of the clocks relative to the base time is determined
94 * by their conversion factors, which are constant for a given conversion
95 * period:
96 *
97 * cs_delta = read_clock() - cs_base
98 * delta_mono_ns = cs_delta * fMONO
99 * delta_aux_ns = cs_delta * fAUX
100 *
101 * Ergo:
102 *
103 * delta_mono_ns - delta_aux_ns = cs_delta * (fMONO - fAUX)
104 *
105 * Substituting cs_delta yields:
106 * fMONO - fAUX
107 * delta_mono_ns - delta_aux_ns = delta_mono_ns * ------------
108 * fMONO
109 * Resolving to delta_aux_ns:
110 * fMONO - fAUX
111 * delta_aux_ns = delta_mono_ns - delta_mono_ns * ------------
112 * fMONO
113 * Which simplifies to:
114 * fAUX
115 * delta_aux_ns = delta_mono_ns * -----
116 * fMONO
117 *
118 * So a MONOTONIC time value can be converted to an AUX time value by:
119 *
120 * fAUX
121 * aux_ts = aux_base + (mono_ts - mono_base) * -----
122 * fMONO
123 * The opposite conversion is:
124 * fMONO
125 * mono_ts = mono_base + (aux_ts - aux_base) * -----
126 * fAUX
127 *
128 * To avoid a division the ratios are converted to scaled math. As both
129 * factors are guaranteed to have the same scaled math shift value the
130 * ratio is the ratio of the scaled math multipliers:
131 *
132 * conv_mult_aux = (AUX_mult << conv_shift) / MONO_mult
133 * conv_mult_mono = (MONO_mult << conv_shift) / AUX_mult
134 *
135 * The actual conversions become:
136 *
137 * aux_ts = aux_base + (((mono_ts - mono_base) * conv_mult_aux) >> conv_shift)
138 * mono_ts = mono_base + (((aux_ts - aux_base) * conv_mult_mono) >> conv_shift)
139 */
140
141 #if !IS_ENABLED(CONFIG_TIME_KUNIT_TEST)
142 static inline
143 #endif
144 struct tk_aux_mono_conv tk_aux_capture_mono_conv(ktime_t mono_now, u32 mono_mult,
145 ktime_t aux_now, u32 aux_mult,
146 u32 shift)
147 {
148 return (struct tk_aux_mono_conv) {
149 .mono_base = mono_now,
150 .aux_base = aux_now,
151 .mono_mult = mono_mult,
152 .aux_mult = aux_mult,
153 .shift = shift,
154 };
155 }
> 156 EXPORT_SYMBOL_FOR_TIME_TEST(tk_aux_capture_mono_conv);
157
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-04 18:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 18:35 [thomas-weissschuh:b4/auxclock-nanosleep 16/39] kernel/time/timekeeping.c:156:1: error: use of undeclared identifier 'symbol' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.