public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot
       [not found] <20260410203741.997410-2-tim.bird@sony.com>
@ 2026-04-12 11:12 ` kernel test robot
  2026-04-12 12:55 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-04-12 11:12 UTC (permalink / raw)
  To: Tim Bird, pmladek, rostedt, john.ogness, senozhatsky
  Cc: llvm, oe-kbuild-all, francesco, geert, tglx, shashankbalaji02,
	linux-embedded, linux-kernel, Tim Bird

Hi Tim,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v7.0-rc7 next-20260410]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tim-Bird/printk-fix-zero-valued-printk-timestamps-in-early-boot/20260412-134726
base:   linus/master
patch link:    https://lore.kernel.org/r/20260410203741.997410-2-tim.bird%40sony.com
patch subject: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot
config: um-defconfig (https://download.01.org/0day-ci/archive/20260412/202604121907.nsngvl5u-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project ae825cb8cea7f3ac8e5e4096f22713845cf5e501)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260412/202604121907.nsngvl5u-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/202604121907.nsngvl5u-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/printk/printk.c:49:
   include/linux/early_times.h:20:9: error: call to undeclared function 'rdtsc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      20 |         return rdtsc();
         |                ^
>> include/linux/early_times.h:45:47: warning: division by zero is undefined [-Wdivision-by-zero]
      45 |                 return (early_unsafe_cycles() * NS_PER_KHZ) / CONFIG_EARLY_CYCLES_KHZ;
         |                                                             ^ ~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.


vim +45 include/linux/early_times.h

    34	
    35	/* returns a nanosecond value based on early cycles */
    36	static inline u64 early_times_ns(void)
    37	{
    38		if (CONFIG_EARLY_CYCLES_KHZ)
    39			/*
    40			 * Note: the multiply must precede the division to avoid
    41			 * truncation and loss of resolution
    42			 * Don't use fancier MULT/SHIFT math here.  Since this is
    43			 * static, the compiler can optimize the math operations.
    44			 */
  > 45			return (early_unsafe_cycles() * NS_PER_KHZ) / CONFIG_EARLY_CYCLES_KHZ;
    46		return 0;
    47	}
    48	#else
    49	static inline u64 early_times_ns(void)
    50	{
    51		return 0;
    52	}
    53	#endif
    54	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot
       [not found] <20260410203741.997410-2-tim.bird@sony.com>
  2026-04-12 11:12 ` [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot kernel test robot
@ 2026-04-12 12:55 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-04-12 12:55 UTC (permalink / raw)
  To: Tim Bird, pmladek, rostedt, john.ogness, senozhatsky
  Cc: llvm, oe-kbuild-all, francesco, geert, tglx, shashankbalaji02,
	linux-embedded, linux-kernel, Tim Bird

Hi Tim,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v7.0-rc7 next-20260410]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tim-Bird/printk-fix-zero-valued-printk-timestamps-in-early-boot/20260412-134726
base:   linus/master
patch link:    https://lore.kernel.org/r/20260410203741.997410-2-tim.bird%40sony.com
patch subject: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot
config: um-defconfig (https://download.01.org/0day-ci/archive/20260412/202604122037.R14cnXpl-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project ae825cb8cea7f3ac8e5e4096f22713845cf5e501)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260412/202604122037.R14cnXpl-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/202604122037.R14cnXpl-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/printk/printk.c:49:
>> include/linux/early_times.h:20:9: error: call to undeclared function 'rdtsc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      20 |         return rdtsc();
         |                ^
   include/linux/early_times.h:45:47: warning: division by zero is undefined [-Wdivision-by-zero]
      45 |                 return (early_unsafe_cycles() * NS_PER_KHZ) / CONFIG_EARLY_CYCLES_KHZ;
         |                                                             ^ ~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.


vim +/rdtsc +20 include/linux/early_times.h

    10	
    11	#ifdef CONFIG_EARLY_CYCLES_KHZ
    12	static inline u64 early_unsafe_cycles(void)
    13	{
    14	#if defined(CONFIG_X86_64)
    15		/*
    16		 * This rdtsc may happen before secure TSC is initialized, and
    17		 * it is unordered. So please don't use this value for cryptography
    18		 * or after SMP is initialized.
    19		 */
  > 20		return rdtsc();
    21	#elif defined(CONFIG_ARM64)
    22		return read_sysreg(cntvct_el0);
    23	#elif defined(CONFIG_RISCV_TIMER)
    24		u64 val;
    25	
    26		asm volatile("rdtime %0" : "=r"(val));
    27		return val;
    28	#else
    29		return 0;
    30	#endif
    31	}
    32	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-12 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260410203741.997410-2-tim.bird@sony.com>
2026-04-12 11:12 ` [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot kernel test robot
2026-04-12 12:55 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox