From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android14-5.15 65/65] drivers/firmware/qcom_scm.c:367: warning: Function parameter or member 'flags' not described in 'qcom_scm_cpu_power_down'
Date: Thu, 26 Nov 2026 18:47:41 +0100 [thread overview]
Message-ID: <20261126184547.1MVE3CDW-lkp@intel.com> (raw)
Hi Dmitry,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android14-5.15
head: 36e3098ebf6d37570aab9dc5f8f4d24bd5ffdd06
commit: 32240232b2a3b2dd7b0178f93381cad91c062475 [65/65] thermal/drivers/qcom: Make LMH select QCOM_SCM
config: arm-randconfig-r2106-20261126 (https://download.01.org/0day-ci/archive/20261126/20261126184547.1MVE3CDW-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261126/20261126184547.1MVE3CDW-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/20261126184547.1MVE3CDW-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/firmware/qcom_scm.c:198: warning: Function parameter or member 'res' not described in 'qcom_scm_call'
drivers/firmware/qcom_scm.c:198: warning: Excess function parameter 'svc_id' description in 'qcom_scm_call'
drivers/firmware/qcom_scm.c:198: warning: Excess function parameter 'cmd_id' description in 'qcom_scm_call'
drivers/firmware/qcom_scm.c:226: warning: Excess function parameter 'svc_id' description in 'qcom_scm_call_atomic'
drivers/firmware/qcom_scm.c:226: warning: Excess function parameter 'cmd_id' description in 'qcom_scm_call_atomic'
>> drivers/firmware/qcom_scm.c:367: warning: Function parameter or member 'flags' not described in 'qcom_scm_cpu_power_down'
vim +367 drivers/firmware/qcom_scm.c
9a434cee773ae15 Elliot Berman 2020-01-07 185
9a434cee773ae15 Elliot Berman 2020-01-07 186 /**
9a434cee773ae15 Elliot Berman 2020-01-07 187 * qcom_scm_call() - Invoke a syscall in the secure world
9a434cee773ae15 Elliot Berman 2020-01-07 188 * @dev: device
9a434cee773ae15 Elliot Berman 2020-01-07 189 * @svc_id: service identifier
9a434cee773ae15 Elliot Berman 2020-01-07 190 * @cmd_id: command identifier
9a434cee773ae15 Elliot Berman 2020-01-07 191 * @desc: Descriptor structure containing arguments and return values
9a434cee773ae15 Elliot Berman 2020-01-07 192 *
9a434cee773ae15 Elliot Berman 2020-01-07 193 * Sends a command to the SCM and waits for the command to finish processing.
9a434cee773ae15 Elliot Berman 2020-01-07 194 * This should *only* be called in pre-emptible context.
9a434cee773ae15 Elliot Berman 2020-01-07 195 */
9a434cee773ae15 Elliot Berman 2020-01-07 196 static int qcom_scm_call(struct device *dev, const struct qcom_scm_desc *desc,
9a434cee773ae15 Elliot Berman 2020-01-07 197 struct qcom_scm_res *res)
9a434cee773ae15 Elliot Berman 2020-01-07 @198 {
9a434cee773ae15 Elliot Berman 2020-01-07 199 might_sleep();
9a434cee773ae15 Elliot Berman 2020-01-07 200 switch (__get_convention()) {
9a434cee773ae15 Elliot Berman 2020-01-07 201 case SMC_CONVENTION_ARM_32:
9a434cee773ae15 Elliot Berman 2020-01-07 202 case SMC_CONVENTION_ARM_64:
9a434cee773ae15 Elliot Berman 2020-01-07 203 return scm_smc_call(dev, desc, res, false);
9a434cee773ae15 Elliot Berman 2020-01-07 204 case SMC_CONVENTION_LEGACY:
9a434cee773ae15 Elliot Berman 2020-01-07 205 return scm_legacy_call(dev, desc, res);
9a434cee773ae15 Elliot Berman 2020-01-07 206 default:
9a434cee773ae15 Elliot Berman 2020-01-07 207 pr_err("Unknown current SCM calling convention.\n");
9a434cee773ae15 Elliot Berman 2020-01-07 208 return -EINVAL;
9a434cee773ae15 Elliot Berman 2020-01-07 209 }
9a434cee773ae15 Elliot Berman 2020-01-07 210 }
9a434cee773ae15 Elliot Berman 2020-01-07 211
9a434cee773ae15 Elliot Berman 2020-01-07 212 /**
9a434cee773ae15 Elliot Berman 2020-01-07 213 * qcom_scm_call_atomic() - atomic variation of qcom_scm_call()
9a434cee773ae15 Elliot Berman 2020-01-07 214 * @dev: device
9a434cee773ae15 Elliot Berman 2020-01-07 215 * @svc_id: service identifier
9a434cee773ae15 Elliot Berman 2020-01-07 216 * @cmd_id: command identifier
9a434cee773ae15 Elliot Berman 2020-01-07 217 * @desc: Descriptor structure containing arguments and return values
9a434cee773ae15 Elliot Berman 2020-01-07 218 * @res: Structure containing results from SMC/HVC call
9a434cee773ae15 Elliot Berman 2020-01-07 219 *
9a434cee773ae15 Elliot Berman 2020-01-07 220 * Sends a command to the SCM and waits for the command to finish processing.
9a434cee773ae15 Elliot Berman 2020-01-07 221 * This can be called in atomic context.
9a434cee773ae15 Elliot Berman 2020-01-07 222 */
9a434cee773ae15 Elliot Berman 2020-01-07 223 static int qcom_scm_call_atomic(struct device *dev,
9a434cee773ae15 Elliot Berman 2020-01-07 224 const struct qcom_scm_desc *desc,
9a434cee773ae15 Elliot Berman 2020-01-07 225 struct qcom_scm_res *res)
9a434cee773ae15 Elliot Berman 2020-01-07 226 {
9a434cee773ae15 Elliot Berman 2020-01-07 227 switch (__get_convention()) {
9a434cee773ae15 Elliot Berman 2020-01-07 228 case SMC_CONVENTION_ARM_32:
9a434cee773ae15 Elliot Berman 2020-01-07 229 case SMC_CONVENTION_ARM_64:
9a434cee773ae15 Elliot Berman 2020-01-07 230 return scm_smc_call(dev, desc, res, true);
9a434cee773ae15 Elliot Berman 2020-01-07 231 case SMC_CONVENTION_LEGACY:
9a434cee773ae15 Elliot Berman 2020-01-07 232 return scm_legacy_call_atomic(dev, desc, res);
9a434cee773ae15 Elliot Berman 2020-01-07 233 default:
9a434cee773ae15 Elliot Berman 2020-01-07 234 pr_err("Unknown current SCM calling convention.\n");
9a434cee773ae15 Elliot Berman 2020-01-07 235 return -EINVAL;
9a434cee773ae15 Elliot Berman 2020-01-07 236 }
9a434cee773ae15 Elliot Berman 2020-01-07 237 }
9a434cee773ae15 Elliot Berman 2020-01-07 238
9d11af8b06a811c Stephen Boyd 2021-02-23 239 static bool __qcom_scm_is_call_available(struct device *dev, u32 svc_id,
9a434cee773ae15 Elliot Berman 2020-01-07 240 u32 cmd_id)
9a434cee773ae15 Elliot Berman 2020-01-07 241 {
9a434cee773ae15 Elliot Berman 2020-01-07 242 int ret;
9a434cee773ae15 Elliot Berman 2020-01-07 243 struct qcom_scm_desc desc = {
9a434cee773ae15 Elliot Berman 2020-01-07 244 .svc = QCOM_SCM_SVC_INFO,
9a434cee773ae15 Elliot Berman 2020-01-07 245 .cmd = QCOM_SCM_INFO_IS_CALL_AVAIL,
9a434cee773ae15 Elliot Berman 2020-01-07 246 .owner = ARM_SMCCC_OWNER_SIP,
9a434cee773ae15 Elliot Berman 2020-01-07 247 };
9a434cee773ae15 Elliot Berman 2020-01-07 248 struct qcom_scm_res res;
9a434cee773ae15 Elliot Berman 2020-01-07 249
9a434cee773ae15 Elliot Berman 2020-01-07 250 desc.arginfo = QCOM_SCM_ARGS(1);
9a434cee773ae15 Elliot Berman 2020-01-07 251 switch (__get_convention()) {
9a434cee773ae15 Elliot Berman 2020-01-07 252 case SMC_CONVENTION_ARM_32:
9a434cee773ae15 Elliot Berman 2020-01-07 253 case SMC_CONVENTION_ARM_64:
9a434cee773ae15 Elliot Berman 2020-01-07 254 desc.args[0] = SCM_SMC_FNID(svc_id, cmd_id) |
9a434cee773ae15 Elliot Berman 2020-01-07 255 (ARM_SMCCC_OWNER_SIP << ARM_SMCCC_OWNER_SHIFT);
9a434cee773ae15 Elliot Berman 2020-01-07 256 break;
9a434cee773ae15 Elliot Berman 2020-01-07 257 case SMC_CONVENTION_LEGACY:
9a434cee773ae15 Elliot Berman 2020-01-07 258 desc.args[0] = SCM_LEGACY_FNID(svc_id, cmd_id);
9a434cee773ae15 Elliot Berman 2020-01-07 259 break;
9a434cee773ae15 Elliot Berman 2020-01-07 260 default:
9a434cee773ae15 Elliot Berman 2020-01-07 261 pr_err("Unknown SMC convention being used\n");
df84a4f710451fd Guru Das Srinagesh 2021-10-11 262 return false;
9a434cee773ae15 Elliot Berman 2020-01-07 263 }
9a434cee773ae15 Elliot Berman 2020-01-07 264
9a434cee773ae15 Elliot Berman 2020-01-07 265 ret = qcom_scm_call(dev, &desc, &res);
9a434cee773ae15 Elliot Berman 2020-01-07 266
9d11af8b06a811c Stephen Boyd 2021-02-23 267 return ret ? false : !!res.result[0];
9a434cee773ae15 Elliot Berman 2020-01-07 268 }
9a434cee773ae15 Elliot Berman 2020-01-07 269
a353e4a06f24235 Lina Iyer 2015-03-02 270 /**
65f0c90b7d46854 Elliot Berman 2020-01-07 271 * qcom_scm_set_warm_boot_addr() - Set the warm boot address for cpus
a353e4a06f24235 Lina Iyer 2015-03-02 272 * @entry: Entry point function for the cpus
a353e4a06f24235 Lina Iyer 2015-03-02 273 * @cpus: The cpumask of cpus that will use the entry point
a353e4a06f24235 Lina Iyer 2015-03-02 274 *
65f0c90b7d46854 Elliot Berman 2020-01-07 275 * Set the Linux entry point for the SCM to transfer control to when coming
65f0c90b7d46854 Elliot Berman 2020-01-07 276 * out of a power down. CPU power down may be executed on cpuidle or hotplug.
a353e4a06f24235 Lina Iyer 2015-03-02 277 */
65f0c90b7d46854 Elliot Berman 2020-01-07 278 int qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus)
a353e4a06f24235 Lina Iyer 2015-03-02 279 {
57d3b816718c1cf Elliot Berman 2020-01-07 280 int ret;
57d3b816718c1cf Elliot Berman 2020-01-07 281 int flags = 0;
57d3b816718c1cf Elliot Berman 2020-01-07 282 int cpu;
57d3b816718c1cf Elliot Berman 2020-01-07 283 struct qcom_scm_desc desc = {
57d3b816718c1cf Elliot Berman 2020-01-07 284 .svc = QCOM_SCM_SVC_BOOT,
57d3b816718c1cf Elliot Berman 2020-01-07 285 .cmd = QCOM_SCM_BOOT_SET_ADDR,
57d3b816718c1cf Elliot Berman 2020-01-07 286 .arginfo = QCOM_SCM_ARGS(2),
57d3b816718c1cf Elliot Berman 2020-01-07 287 };
57d3b816718c1cf Elliot Berman 2020-01-07 288
57d3b816718c1cf Elliot Berman 2020-01-07 289 /*
57d3b816718c1cf Elliot Berman 2020-01-07 290 * Reassign only if we are switching from hotplug entry point
57d3b816718c1cf Elliot Berman 2020-01-07 291 * to cpuidle entry point or vice versa.
57d3b816718c1cf Elliot Berman 2020-01-07 292 */
57d3b816718c1cf Elliot Berman 2020-01-07 293 for_each_cpu(cpu, cpus) {
57d3b816718c1cf Elliot Berman 2020-01-07 294 if (entry == qcom_scm_wb[cpu].entry)
57d3b816718c1cf Elliot Berman 2020-01-07 295 continue;
57d3b816718c1cf Elliot Berman 2020-01-07 296 flags |= qcom_scm_wb[cpu].flag;
57d3b816718c1cf Elliot Berman 2020-01-07 297 }
57d3b816718c1cf Elliot Berman 2020-01-07 298
57d3b816718c1cf Elliot Berman 2020-01-07 299 /* No change in entry function */
57d3b816718c1cf Elliot Berman 2020-01-07 300 if (!flags)
57d3b816718c1cf Elliot Berman 2020-01-07 301 return 0;
57d3b816718c1cf Elliot Berman 2020-01-07 302
57d3b816718c1cf Elliot Berman 2020-01-07 303 desc.args[0] = flags;
57d3b816718c1cf Elliot Berman 2020-01-07 304 desc.args[1] = virt_to_phys(entry);
57d3b816718c1cf Elliot Berman 2020-01-07 305
57d3b816718c1cf Elliot Berman 2020-01-07 306 ret = qcom_scm_call(__scm->dev, &desc, NULL);
57d3b816718c1cf Elliot Berman 2020-01-07 307 if (!ret) {
57d3b816718c1cf Elliot Berman 2020-01-07 308 for_each_cpu(cpu, cpus)
57d3b816718c1cf Elliot Berman 2020-01-07 309 qcom_scm_wb[cpu].entry = entry;
57d3b816718c1cf Elliot Berman 2020-01-07 310 }
57d3b816718c1cf Elliot Berman 2020-01-07 311
57d3b816718c1cf Elliot Berman 2020-01-07 312 return ret;
a353e4a06f24235 Lina Iyer 2015-03-02 313 }
65f0c90b7d46854 Elliot Berman 2020-01-07 314 EXPORT_SYMBOL(qcom_scm_set_warm_boot_addr);
2ce76a6ad32fa07 Lina Iyer 2015-03-02 315
2ce76a6ad32fa07 Lina Iyer 2015-03-02 316 /**
65f0c90b7d46854 Elliot Berman 2020-01-07 317 * qcom_scm_set_cold_boot_addr() - Set the cold boot address for cpus
2ce76a6ad32fa07 Lina Iyer 2015-03-02 318 * @entry: Entry point function for the cpus
2ce76a6ad32fa07 Lina Iyer 2015-03-02 319 * @cpus: The cpumask of cpus that will use the entry point
2ce76a6ad32fa07 Lina Iyer 2015-03-02 320 *
65f0c90b7d46854 Elliot Berman 2020-01-07 321 * Set the cold boot address of the cpus. Any cpu outside the supported
65f0c90b7d46854 Elliot Berman 2020-01-07 322 * range would be removed from the cpu present mask.
2ce76a6ad32fa07 Lina Iyer 2015-03-02 323 */
65f0c90b7d46854 Elliot Berman 2020-01-07 324 int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
2ce76a6ad32fa07 Lina Iyer 2015-03-02 325 {
57d3b816718c1cf Elliot Berman 2020-01-07 326 int flags = 0;
57d3b816718c1cf Elliot Berman 2020-01-07 327 int cpu;
57d3b816718c1cf Elliot Berman 2020-01-07 328 int scm_cb_flags[] = {
57d3b816718c1cf Elliot Berman 2020-01-07 329 QCOM_SCM_FLAG_COLDBOOT_CPU0,
57d3b816718c1cf Elliot Berman 2020-01-07 330 QCOM_SCM_FLAG_COLDBOOT_CPU1,
57d3b816718c1cf Elliot Berman 2020-01-07 331 QCOM_SCM_FLAG_COLDBOOT_CPU2,
57d3b816718c1cf Elliot Berman 2020-01-07 332 QCOM_SCM_FLAG_COLDBOOT_CPU3,
57d3b816718c1cf Elliot Berman 2020-01-07 333 };
57d3b816718c1cf Elliot Berman 2020-01-07 334 struct qcom_scm_desc desc = {
57d3b816718c1cf Elliot Berman 2020-01-07 335 .svc = QCOM_SCM_SVC_BOOT,
57d3b816718c1cf Elliot Berman 2020-01-07 336 .cmd = QCOM_SCM_BOOT_SET_ADDR,
57d3b816718c1cf Elliot Berman 2020-01-07 337 .arginfo = QCOM_SCM_ARGS(2),
57d3b816718c1cf Elliot Berman 2020-01-07 338 .owner = ARM_SMCCC_OWNER_SIP,
57d3b816718c1cf Elliot Berman 2020-01-07 339 };
57d3b816718c1cf Elliot Berman 2020-01-07 340
d775dab9a4a8f12 Junlin Yang 2021-03-11 341 if (!cpus || cpumask_empty(cpus))
57d3b816718c1cf Elliot Berman 2020-01-07 342 return -EINVAL;
57d3b816718c1cf Elliot Berman 2020-01-07 343
57d3b816718c1cf Elliot Berman 2020-01-07 344 for_each_cpu(cpu, cpus) {
57d3b816718c1cf Elliot Berman 2020-01-07 345 if (cpu < ARRAY_SIZE(scm_cb_flags))
57d3b816718c1cf Elliot Berman 2020-01-07 346 flags |= scm_cb_flags[cpu];
57d3b816718c1cf Elliot Berman 2020-01-07 347 else
57d3b816718c1cf Elliot Berman 2020-01-07 348 set_cpu_present(cpu, false);
57d3b816718c1cf Elliot Berman 2020-01-07 349 }
57d3b816718c1cf Elliot Berman 2020-01-07 350
57d3b816718c1cf Elliot Berman 2020-01-07 351 desc.args[0] = flags;
57d3b816718c1cf Elliot Berman 2020-01-07 352 desc.args[1] = virt_to_phys(entry);
57d3b816718c1cf Elliot Berman 2020-01-07 353
57d3b816718c1cf Elliot Berman 2020-01-07 354 return qcom_scm_call_atomic(__scm ? __scm->dev : NULL, &desc, NULL);
2ce76a6ad32fa07 Lina Iyer 2015-03-02 355 }
65f0c90b7d46854 Elliot Berman 2020-01-07 356 EXPORT_SYMBOL(qcom_scm_set_cold_boot_addr);
767b0235dd47659 Lina Iyer 2015-03-02 357
767b0235dd47659 Lina Iyer 2015-03-02 358 /**
767b0235dd47659 Lina Iyer 2015-03-02 359 * qcom_scm_cpu_power_down() - Power down the cpu
767b0235dd47659 Lina Iyer 2015-03-02 360 * @flags - Flags to flush cache
767b0235dd47659 Lina Iyer 2015-03-02 361 *
767b0235dd47659 Lina Iyer 2015-03-02 362 * This is an end point to power down cpu. If there was a pending interrupt,
767b0235dd47659 Lina Iyer 2015-03-02 363 * the control would return from this function, otherwise, the cpu jumps to the
767b0235dd47659 Lina Iyer 2015-03-02 364 * warm boot entry point set for this cpu upon reset.
767b0235dd47659 Lina Iyer 2015-03-02 365 */
767b0235dd47659 Lina Iyer 2015-03-02 366 void qcom_scm_cpu_power_down(u32 flags)
767b0235dd47659 Lina Iyer 2015-03-02 @367 {
57d3b816718c1cf Elliot Berman 2020-01-07 368 struct qcom_scm_desc desc = {
57d3b816718c1cf Elliot Berman 2020-01-07 369 .svc = QCOM_SCM_SVC_BOOT,
57d3b816718c1cf Elliot Berman 2020-01-07 370 .cmd = QCOM_SCM_BOOT_TERMINATE_PC,
57d3b816718c1cf Elliot Berman 2020-01-07 371 .args[0] = flags & QCOM_SCM_FLUSH_FLAG_MASK,
57d3b816718c1cf Elliot Berman 2020-01-07 372 .arginfo = QCOM_SCM_ARGS(1),
57d3b816718c1cf Elliot Berman 2020-01-07 373 .owner = ARM_SMCCC_OWNER_SIP,
57d3b816718c1cf Elliot Berman 2020-01-07 374 };
57d3b816718c1cf Elliot Berman 2020-01-07 375
57d3b816718c1cf Elliot Berman 2020-01-07 376 qcom_scm_call_atomic(__scm ? __scm->dev : NULL, &desc, NULL);
767b0235dd47659 Lina Iyer 2015-03-02 377 }
767b0235dd47659 Lina Iyer 2015-03-02 378 EXPORT_SYMBOL(qcom_scm_cpu_power_down);
9626b6993b2e6fa jilai wang 2015-04-10 379
:::::: The code at line 367 was first introduced by commit
:::::: 767b0235dd476596c0d4154839ae6880bec71b3c firmware: qcom: scm: Support cpu power down through SCM
:::::: TO: Lina Iyer <lina.iyer@linaro.org>
:::::: CC: Kumar Gala <galak@codeaurora.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-26 17:48 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=20261126184547.1MVE3CDW-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.