tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.hotplug
head:   0e5de16e9e45b4d853a31761fd74ff56998169a1
commit: a819753cd02cd6d2c88f8d070f94346af5d8a0c2 [25/66] perf/x86/amd/power: 
Convert the hotplug notifier to state machine
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout a819753cd02cd6d2c88f8d070f94346af5d8a0c2
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   arch/x86/events/amd/power.c: In function 'power_cpu_init':
>> arch/x86/events/amd/power.c:267:1: warning: no return statement in function 
>> returning non-void [-Wreturn-type]
    }
    ^
   arch/x86/events/amd/power.c: In function 'amd_power_pmu_init':
>> arch/x86/events/amd/power.c:292:2: error: implicit declaration of function 
>> 'cpuhp_set_state' [-Werror=implicit-function-declaration]
     cpuhp_set_state(CPUHP_AP_PERF_X86_AMD_POWER_ONLINE,
     ^~~~~~~~~~~~~~~
>> arch/x86/events/amd/power.c:292:18: error: 
>> 'CPUHP_AP_PERF_X86_AMD_POWER_ONLINE' undeclared (first use in this function)
     cpuhp_set_state(CPUHP_AP_PERF_X86_AMD_POWER_ONLINE,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/events/amd/power.c:292:18: note: each undeclared identifier is 
reported only once for each function it appears in
>> arch/x86/events/amd/power.c:276:11: warning: unused variable 'target' 
>> [-Wunused-variable]
     int cpu, target, ret;
              ^~~~~~
>> arch/x86/events/amd/power.c:276:6: warning: unused variable 'cpu' 
>> [-Wunused-variable]
     int cpu, target, ret;
         ^~~
   arch/x86/events/amd/power.c: In function 'amd_power_pmu_exit':
   arch/x86/events/amd/power.c:309:29: error: 
'CPUHP_AP_PERF_X86_AMD_POWER_ONLINE' undeclared (first use in this function)
     cpuhp_remove_state_nocalls(CPUHP_AP_PERF_X86_AMD_POWER_ONLINE);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/cpuhp_set_state +292 arch/x86/events/amd/power.c

   261           * Note: if there is a CPU aside of the new one already in the
   262           * sibling mask, then it is also in cpu_mask.
   263           */
   264          target = cpumask_any_but(topology_sibling_cpumask(cpu), cpu);
   265          if (target >= nr_cpumask_bits)
   266                  cpumask_set_cpu(cpu, &cpu_mask);
 > 267  }
   268  
   269  static const struct x86_cpu_id cpu_match[] = {
   270          { .vendor = X86_VENDOR_AMD, .family = 0x15 },
   271          {},
   272  };
   273  
   274  static int __init amd_power_pmu_init(void)
   275  {
 > 276          int cpu, target, ret;
   277  
   278          if (!x86_match_cpu(cpu_match))
   279                  return 0;
   280  
   281          if (!boot_cpu_has(X86_FEATURE_ACC_POWER))
   282                  return -ENODEV;
   283  
   284          cpu_pwr_sample_ratio = cpuid_ecx(0x80000007);
   285  
   286          if (rdmsrl_safe(MSR_F15H_CU_MAX_PWR_ACCUMULATOR, 
&max_cu_acc_power)) {
   287                  pr_err("Failed to read max compute unit power 
accumulator MSR\n");
   288                  return -ENODEV;
   289          }
   290  
   291  
 > 292          cpuhp_set_state(CPUHP_AP_PERF_X86_AMD_POWER_ONLINE,
   293                          "AP_PERF_X86_AMD_POWER_ONLINE",
   294                          power_cpu_init, power_cpu_exit);
   295  

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

Attachment: .config.gz
Description: Binary data

Reply via email to