tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/timers
head:   950e7481b09cd3f426a9322b0f35139224660c0d
commit: 9ad337981a09fb5e53884f6614eb277e1f782460 [8/13] x86/tsc: Store and 
check TSC ADJUST MSR
config: i386-alldefconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 9ad337981a09fb5e53884f6614eb277e1f782460
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:13:0,
                    from include/linux/cpumask.h:9,
                    from include/linux/topology.h:30,
                    from arch/x86/kernel/tsc_sync.c:17:
   arch/x86/kernel/tsc_sync.c: In function 'tsc_store_and_check_tsc_adjust':
>> arch/x86/kernel/tsc_sync.c:43:43: error: 'cpu' undeclared (first use in this 
>> function)
     pr_info("TSC ADJUST: Boot CPU%u: %lld\n",cpu, bootval);
                                              ^
   include/linux/printk.h:284:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
   arch/x86/kernel/tsc_sync.c:43:43: note: each undeclared identifier is 
reported only once for each function it appears in
     pr_info("TSC ADJUST: Boot CPU%u: %lld\n",cpu, bootval);
                                              ^
   include/linux/printk.h:284:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
   arch/x86/kernel/tsc_sync.c:34:21: warning: unused variable 'ref' 
[-Wunused-variable]
     struct tsc_adjust *ref, *cur = this_cpu_ptr(&tsc_adjust);
                        ^~~

vim +/cpu +43 arch/x86/kernel/tsc_sync.c

    11   * CPU is the 'target CPU'.
    12   *
    13   * Only two CPUs may participate - they can enter in any order.
    14   * ( The serial nature of the boot logic and the CPU hotplug lock
    15   *   protects against more than 2 CPUs entering this code. )
    16   */
  > 17  #include <linux/topology.h>
    18  #include <linux/spinlock.h>
    19  #include <linux/kernel.h>
    20  #include <linux/smp.h>
    21  #include <linux/nmi.h>
    22  #include <asm/tsc.h>
    23  
    24  struct tsc_adjust {
    25          s64     bootval;
    26          s64     adjusted;
    27  };
    28  
    29  static DEFINE_PER_CPU(struct tsc_adjust, tsc_adjust);
    30  
    31  #ifndef CONFIG_SMP
    32  void __init tsc_store_and_check_tsc_adjust(void)
    33  {
    34          struct tsc_adjust *ref, *cur = this_cpu_ptr(&tsc_adjust);
    35          s64 bootval;
    36  
    37          if (!boot_cpu_has(X86_FEATURE_TSC_ADJUST))
    38                  return;
    39  
    40          rdmsrl(MSR_IA32_TSC_ADJUST, bootval);
    41          cur->bootval = bootval;
    42          cur->adjusted = bootval;
  > 43          pr_info("TSC ADJUST: Boot CPU%u: %lld\n",cpu, bootval);
    44  }
    45  
    46  #else /* !CONFIG_SMP */

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to