[thomas-weissschuh:b4/auxclock-nanosleep 16/39] kernel/time/timekeeping.c:156:1: error: use of undeclared identifier 'symbol'

kernel test robot <[email protected]> Wed, 05 Aug 2026 02:35:12 +0800
Newsgroups dev.linux.lists.oe-kbuild-all,dev.linux.lists.llvm
Message-ID <[email protected]>
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/[email protected]/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/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

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