lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209210551.0tYWREPo-lkp@intel.com>
Date:   Wed, 21 Sep 2022 05:50:46 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Jiri Slaby <jirislaby@...nel.org>,
        Martin Liska <mliska@...e.cz>
Subject: [jirislaby:lto 17/49] drivers/cpufreq/amd-pstate.c:127:22: warning:
 no previous prototype for 'do_amd_pstate_enable'

Hi Andi,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git lto
head:   b8aca9a738ed75e571b2f9a761b8a9896c686a48
commit: bf37a9b27bd9b38b18a7f385f9163603f20043de [17/49] cpufreq, amd-pstate, lto: make static calls __visible_on_lto
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20220921/202209210551.0tYWREPo-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=bf37a9b27bd9b38b18a7f385f9163603f20043de
        git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
        git fetch --no-tags jirislaby lto
        git checkout bf37a9b27bd9b38b18a7f385f9163603f20043de
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/cpufreq/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/cpufreq/amd-pstate.c:127:22: warning: no previous prototype for 'do_amd_pstate_enable' [-Wmissing-prototypes]
     127 | __visible_on_lto int do_amd_pstate_enable(bool enable)
         |                      ^~~~~~~~~~~~~~~~~~~~
>> drivers/cpufreq/amd-pstate.c:152:22: warning: no previous prototype for 'do_amd_pstate_init_perf' [-Wmissing-prototypes]
     152 | __visible_on_lto int do_amd_pstate_init_perf(struct amd_cpudata *cpudata)
         |                      ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/cpufreq/amd-pstate.c:200:23: warning: no previous prototype for 'do_amd_pstate_update_perf' [-Wmissing-prototypes]
     200 | __visible_on_lto void do_amd_pstate_update_perf(struct amd_cpudata *cpudata,
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/do_amd_pstate_enable +127 drivers/cpufreq/amd-pstate.c

   126	
 > 127	__visible_on_lto int do_amd_pstate_enable(bool enable)
   128	{
   129		return wrmsrl_safe(MSR_AMD_CPPC_ENABLE, enable);
   130	}
   131	
   132	static int cppc_enable(bool enable)
   133	{
   134		int cpu, ret = 0;
   135	
   136		for_each_present_cpu(cpu) {
   137			ret = cppc_set_enable(cpu, enable);
   138			if (ret)
   139				return ret;
   140		}
   141	
   142		return ret;
   143	}
   144	
   145	DEFINE_STATIC_CALL(amd_pstate_enable, do_amd_pstate_enable);
   146	
   147	static inline int amd_pstate_enable(bool enable)
   148	{
   149		return static_call(amd_pstate_enable)(enable);
   150	}
   151	
 > 152	__visible_on_lto int do_amd_pstate_init_perf(struct amd_cpudata *cpudata)
   153	{
   154		u64 cap1;
   155	
   156		int ret = rdmsrl_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1,
   157					     &cap1);
   158		if (ret)
   159			return ret;
   160	
   161		/*
   162		 * TODO: Introduce AMD specific power feature.
   163		 *
   164		 * CPPC entry doesn't indicate the highest performance in some ASICs.
   165		 */
   166		WRITE_ONCE(cpudata->highest_perf, amd_get_highest_perf());
   167	
   168		WRITE_ONCE(cpudata->nominal_perf, AMD_CPPC_NOMINAL_PERF(cap1));
   169		WRITE_ONCE(cpudata->lowest_nonlinear_perf, AMD_CPPC_LOWNONLIN_PERF(cap1));
   170		WRITE_ONCE(cpudata->lowest_perf, AMD_CPPC_LOWEST_PERF(cap1));
   171	
   172		return 0;
   173	}
   174	
   175	static int cppc_init_perf(struct amd_cpudata *cpudata)
   176	{
   177		struct cppc_perf_caps cppc_perf;
   178	
   179		int ret = cppc_get_perf_caps(cpudata->cpu, &cppc_perf);
   180		if (ret)
   181			return ret;
   182	
   183		WRITE_ONCE(cpudata->highest_perf, amd_get_highest_perf());
   184	
   185		WRITE_ONCE(cpudata->nominal_perf, cppc_perf.nominal_perf);
   186		WRITE_ONCE(cpudata->lowest_nonlinear_perf,
   187			   cppc_perf.lowest_nonlinear_perf);
   188		WRITE_ONCE(cpudata->lowest_perf, cppc_perf.lowest_perf);
   189	
   190		return 0;
   191	}
   192	
   193	DEFINE_STATIC_CALL(amd_pstate_init_perf, do_amd_pstate_init_perf);
   194	
   195	static inline int amd_pstate_init_perf(struct amd_cpudata *cpudata)
   196	{
   197		return static_call(amd_pstate_init_perf)(cpudata);
   198	}
   199	
 > 200	__visible_on_lto void do_amd_pstate_update_perf(struct amd_cpudata *cpudata,
   201				       u32 min_perf, u32 des_perf, u32 max_perf,
   202				       bool fast_switch)
   203	{
   204		if (fast_switch)
   205			wrmsrl(MSR_AMD_CPPC_REQ, READ_ONCE(cpudata->cppc_req_cached));
   206		else
   207			wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ,
   208				      READ_ONCE(cpudata->cppc_req_cached));
   209	}
   210	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ