From: kernel test robot <lkp@intel.com>
To: jasperwang@tencent.com, kaixuxia@tencent.com,
frankjpliu@tencent.com, kasong@tencent.com,
sagazchen@tencent.com, kernelxing@tencent.com,
aurelianliu@tencent.com, jason.zeng@intel.com,
wu.zheng@intel.com, yingbao.jia@intel.com, pei.p.jia@intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [opencloudos:next 6625/6628] drivers/crypto/ccp/hygon/psp-dev.c:472:5: warning: no previous prototype for '__vpsp_do_cmd_locked'
Date: Fri, 17 May 2024 20:38:25 +0800 [thread overview]
Message-ID: <202405172006.ebTeyrfr-lkp@intel.com> (raw)
tree: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git next
head: 95dac159be359bc7ba42421426462f1a96f50ee9
commit: de722d17081287993748f63e8f34d06596eec824 [6625/6628] support tkm key isolation
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240517/202405172006.ebTeyrfr-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240517/202405172006.ebTeyrfr-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/202405172006.ebTeyrfr-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/crypto/ccp/hygon/psp-dev.c:49:10: warning: no previous prototype for 'atomic64_exchange' [-Wmissing-prototypes]
49 | uint64_t atomic64_exchange(volatile uint64_t *dst, uint64_t val)
| ^~~~~~~~~~~~~~~~~
drivers/crypto/ccp/hygon/psp-dev.c:63:5: warning: no previous prototype for 'psp_mutex_init' [-Wmissing-prototypes]
63 | int psp_mutex_init(struct psp_mutex *mutex)
| ^~~~~~~~~~~~~~
>> drivers/crypto/ccp/hygon/psp-dev.c:472:5: warning: no previous prototype for '__vpsp_do_cmd_locked' [-Wmissing-prototypes]
472 | int __vpsp_do_cmd_locked(uint32_t vid, int cmd, void *data, int *psp_ret)
| ^~~~~~~~~~~~~~~~~~~~
--
>> drivers/crypto/ccp/hygon/psp-dev.c:188: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* When the virtual machine executes the 'tkm' command,
drivers/crypto/ccp/hygon/psp-dev.c:213: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Upon qemu startup, this section checks whether
drivers/crypto/ccp/hygon/psp-dev.c:241: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Upon the virtual machine is shut down,
vim +/__vpsp_do_cmd_locked +472 drivers/crypto/ccp/hygon/psp-dev.c
471
> 472 int __vpsp_do_cmd_locked(uint32_t vid, int cmd, void *data, int *psp_ret)
473 {
474 struct psp_device *psp = psp_master;
475 struct sev_device *sev;
476 phys_addr_t phys_addr;
477 unsigned int phys_lsb, phys_msb;
478 unsigned int reg, ret = 0;
479
480 if (!psp || !psp->sev_data)
481 return -ENODEV;
482
483 if (*hygon_psp_hooks.psp_dead)
484 return -EBUSY;
485
486 sev = psp->sev_data;
487
488 if (data && WARN_ON_ONCE(!virt_addr_valid(data)))
489 return -EINVAL;
490
491 /* Get the physical address of the command buffer */
492 phys_addr = PUT_PSP_VID(__psp_pa(data), vid);
493 phys_lsb = data ? lower_32_bits(phys_addr) : 0;
494 phys_msb = data ? upper_32_bits(phys_addr) : 0;
495
496 dev_dbg(sev->dev, "sev command id %#x buffer 0x%08x%08x timeout %us\n",
497 cmd, phys_msb, phys_lsb, *hygon_psp_hooks.psp_timeout);
498
499 print_hex_dump_debug("(in): ", DUMP_PREFIX_OFFSET, 16, 2, data,
500 hygon_psp_hooks.sev_cmd_buffer_len(cmd), false);
501
502 iowrite32(phys_lsb, sev->io_regs + sev->vdata->cmdbuff_addr_lo_reg);
503 iowrite32(phys_msb, sev->io_regs + sev->vdata->cmdbuff_addr_hi_reg);
504
505 sev->int_rcvd = 0;
506
507 reg = FIELD_PREP(SEV_CMDRESP_CMD, cmd) | SEV_CMDRESP_IOC;
508 iowrite32(reg, sev->io_regs + sev->vdata->cmdresp_reg);
509
510 /* wait for command completion */
511 ret = hygon_psp_hooks.sev_wait_cmd_ioc(sev, ®, *hygon_psp_hooks.psp_timeout);
512 if (ret) {
513 if (psp_ret)
514 *psp_ret = 0;
515
516 dev_err(sev->dev, "sev command %#x timed out, disabling PSP\n", cmd);
517 *hygon_psp_hooks.psp_dead = true;
518
519 return ret;
520 }
521
522 *hygon_psp_hooks.psp_timeout = *hygon_psp_hooks.psp_cmd_timeout;
523
524 if (psp_ret)
525 *psp_ret = FIELD_GET(PSP_CMDRESP_STS, reg);
526
527 if (FIELD_GET(PSP_CMDRESP_STS, reg)) {
528 dev_dbg(sev->dev, "sev command %#x failed (%#010lx)\n",
529 cmd, FIELD_GET(PSP_CMDRESP_STS, reg));
530 ret = -EIO;
531 }
532
533 print_hex_dump_debug("(out): ", DUMP_PREFIX_OFFSET, 16, 2, data,
534 hygon_psp_hooks.sev_cmd_buffer_len(cmd), false);
535
536 return ret;
537 }
538
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-17 12:39 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=202405172006.ebTeyrfr-lkp@intel.com \
--to=lkp@intel.com \
--cc=aurelianliu@tencent.com \
--cc=frankjpliu@tencent.com \
--cc=jason.zeng@intel.com \
--cc=jasperwang@tencent.com \
--cc=kaixuxia@tencent.com \
--cc=kasong@tencent.com \
--cc=kernelxing@tencent.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pei.p.jia@intel.com \
--cc=sagazchen@tencent.com \
--cc=wu.zheng@intel.com \
--cc=yingbao.jia@intel.com \
/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.