[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208180229.Q92J7hDz-lkp@intel.com>
Date: Thu, 18 Aug 2022 02:31:51 +0800
From: kernel test robot <lkp@...el.com>
To: Hector Martin <marcan@...can.st>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [asahilinux:bits/130-cpufreq 3/4]
drivers/cpufreq/apple-soc-cpufreq.c:67:12: error: call to undeclared
function 'readq_relaxed'; ISO C99 and later do not support implicit function
declarations
tree: https://github.com/AsahiLinux/linux bits/130-cpufreq
head: 15652b46c23d23d9cddae0f85071af0cd492436d
commit: 42927fc2e2bc9096a31f4a7c5ef7073765ecde43 [3/4] cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states
config: arm-randconfig-r013-20220818
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project aed5e3bea138ce581d682158eb61c27b3cfdd6ec)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/AsahiLinux/linux/commit/42927fc2e2bc9096a31f4a7c5ef7073765ecde43
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/130-cpufreq
git checkout 42927fc2e2bc9096a31f4a7c5ef7073765ecde43
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/clk/ drivers/cpufreq/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/cpufreq/apple-soc-cpufreq.c:67:12: error: call to undeclared function 'readq_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
u64 reg = readq_relaxed(priv->reg_base + APPLE_DVFS_STATUS);
^
>> drivers/cpufreq/apple-soc-cpufreq.c:87:6: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (readq_poll_timeout_atomic(priv->reg_base + APPLE_DVFS_CMD, reg,
^
include/linux/iopoll.h:165:28: note: expanded from macro 'readq_poll_timeout_atomic'
readx_poll_timeout_atomic(readq, addr, val, cond, delay_us, timeout_us)
^
>> drivers/cpufreq/apple-soc-cpufreq.c:98:2: error: call to undeclared function 'writeq_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
writeq_relaxed(reg, priv->reg_base + APPLE_DVFS_CMD);
^
drivers/cpufreq/apple-soc-cpufreq.c:291:11: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.attr = apple_soc_cpufreq_hw_attr,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/apple-soc-cpufreq.c:284:11: note: previous initialization is here
.attr = cpufreq_generic_attr,
^~~~~~~~~~~~~~~~~~~~
1 warning and 3 errors generated.
vim +/readq_relaxed +67 drivers/cpufreq/apple-soc-cpufreq.c
62
63 static unsigned int apple_soc_cpufreq_get_rate(unsigned int cpu)
64 {
65 struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
66 struct apple_cpu_priv *priv = policy->driver_data;
> 67 u64 reg = readq_relaxed(priv->reg_base + APPLE_DVFS_STATUS);
68 unsigned int pstate = FIELD_GET(APPLE_DVFS_STATUS_CUR_PS, reg);
69 unsigned int i;
70
71 for (i = 0; policy->freq_table[i].frequency != CPUFREQ_TABLE_END; i++)
72 if (policy->freq_table[i].driver_data == pstate)
73 return policy->freq_table[i].frequency;
74
75 dev_err(priv->cpu_dev, "could not find frequency for pstate %d\n",
76 pstate);
77 return 0;
78 }
79
80 static int apple_soc_cpufreq_set_target(struct cpufreq_policy *policy,
81 unsigned int index)
82 {
83 struct apple_cpu_priv *priv = policy->driver_data;
84 unsigned int pstate = policy->freq_table[index].driver_data;
85 u64 reg;
86
> 87 if (readq_poll_timeout_atomic(priv->reg_base + APPLE_DVFS_CMD, reg,
88 !(reg & APPLE_DVFS_CMD_BUSY), 2,
89 APPLE_DVFS_TRANSITION_TIMEOUT)) {
90 return -EIO;
91 }
92
93 reg &= ~(APPLE_DVFS_CMD_PS1 | APPLE_DVFS_CMD_PS2);
94 reg |= FIELD_PREP(APPLE_DVFS_CMD_PS1, pstate);
95 reg |= FIELD_PREP(APPLE_DVFS_CMD_PS2, pstate);
96 reg |= APPLE_DVFS_CMD_SET;
97
> 98 writeq_relaxed(reg, priv->reg_base + APPLE_DVFS_CMD);
99
100 return 0;
101 }
102
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (199141 bytes)
Powered by blists - more mailing lists