Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [sean-jc:x86/kvmclock_vs_tsc 6/16] arch/x86/kernel/tsc.c:1525:3: error: call to undeclared function 'tdx_tsc_init'; ISO C99 and later do not support implicit function declarations
Date: Fri, 31 Jan 2025 14:22:44 +0800	[thread overview]
Message-ID: <202501311459.U2DirNC3-lkp@intel.com> (raw)

tree:   https://github.com/sean-jc/linux x86/kvmclock_vs_tsc
head:   39ec46a246988da8e58ee3caccb2b5ff6d07666a
commit: e02c3f9b45df22178674c33ee15e37bfa9bf3e3c [6/16] x86/tdx: Override PV calibration routines with CPUID-based calibration
config: x86_64-buildonly-randconfig-005-20250131 (https://download.01.org/0day-ci/archive/20250131/202501311459.U2DirNC3-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250131/202501311459.U2DirNC3-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/202501311459.U2DirNC3-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kernel/tsc.c:1525:3: error: call to undeclared function 'tdx_tsc_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1525 |                 tdx_tsc_init();
         |                 ^
   arch/x86/kernel/tsc.c:1525:3: note: did you mean 'tsc_init'?
   arch/x86/include/asm/tsc.h:89:13: note: 'tsc_init' declared here
      89 | extern void tsc_init(void);
         |             ^
   1 error generated.


vim +/tdx_tsc_init +1525 arch/x86/kernel/tsc.c

  1508	
  1509	void __init tsc_early_init(void)
  1510	{
  1511		if (!boot_cpu_has(X86_FEATURE_TSC))
  1512			return;
  1513		/* Don't change UV TSC multi-chassis synchronization */
  1514		if (is_early_uv_system())
  1515			return;
  1516	
  1517		/*
  1518		 * Do CoCo specific "secure" TSC initialization *after* hypervisor
  1519		 * platform initialization so that the secure variant can override the
  1520		 * hypervisor's PV calibration routine with a more trusted method.
  1521		 */
  1522		if (cc_platform_has(CC_ATTR_GUEST_SNP_SECURE_TSC))
  1523			snp_secure_tsc_init();
  1524		else if (boot_cpu_has(X86_FEATURE_TDX_GUEST))
> 1525			tdx_tsc_init();
  1526	
  1527		if (!determine_cpu_tsc_frequencies(true))
  1528			return;
  1529		tsc_enable_sched_clock();
  1530	}
  1531	

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

                 reply	other threads:[~2025-01-31  6:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202501311459.U2DirNC3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox