* [jarkko-tpmdd:master 3/3] drivers/char/tpm/tpm-chip.c:531:15: error: too many arguments to function 'tpm_request_locality'
@ 2023-03-20 20:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-20 20:24 UTC (permalink / raw)
To: James Bottomley; +Cc: oe-kbuild-all, Jarkko Sakkinen
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head: 923c8dfa9a3640d4dcedd7df12b53254f7e6e4fc
commit: 923c8dfa9a3640d4dcedd7df12b53254f7e6e4fc [3/3] tpm: fix build break in tpm-chip.c caused by AMD fTPM quirk
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20230321/202303210426.4zyU7h6B-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=923c8dfa9a3640d4dcedd7df12b53254f7e6e4fc
git remote add jarkko-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
git fetch --no-tags jarkko-tpmdd master
git checkout 923c8dfa9a3640d4dcedd7df12b53254f7e6e4fc
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303210426.4zyU7h6B-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/char/tpm/tpm-chip.c: In function 'tpm_amd_is_rng_defective':
>> drivers/char/tpm/tpm-chip.c:531:15: error: too many arguments to function 'tpm_request_locality'
531 | ret = tpm_request_locality(chip, 0);
| ^~~~~~~~~~~~~~~~~~~~
drivers/char/tpm/tpm-chip.c:35:12: note: declared here
35 | static int tpm_request_locality(struct tpm_chip *chip)
| ^~~~~~~~~~~~~~~~~~~~
vim +/tpm_request_locality +531 drivers/char/tpm/tpm-chip.c
513
514 /*
515 * Some AMD fTPM versions may cause stutter
516 * https://www.amd.com/en/support/kb/faq/pa-410
517 *
518 * Fixes are available in two series of fTPM firmware:
519 * 6.x.y.z series: 6.0.18.6 +
520 * 3.x.y.z series: 3.57.y.5 +
521 */
522 static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
523 {
524 u32 val1, val2;
525 u64 version;
526 int ret;
527
528 if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
529 return false;
530
> 531 ret = tpm_request_locality(chip, 0);
532 if (ret)
533 return false;
534
535 ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val1, NULL);
536 if (ret)
537 goto release;
538 if (val1 != 0x414D4400U /* AMD */) {
539 ret = -ENODEV;
540 goto release;
541 }
542 ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_1, &val1, NULL);
543 if (ret)
544 goto release;
545 ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_2, &val2, NULL);
546
547 release:
548 tpm_relinquish_locality(chip);
549
550 if (ret)
551 return false;
552
553 version = ((u64)val1 << 32) | val2;
554 if ((version >> 48) == 6) {
555 if (version >= 0x0006000000180006ULL)
556 return false;
557 } else if ((version >> 48) == 3) {
558 if (version >= 0x0003005700000005ULL)
559 return false;
560 } else {
561 return false;
562 }
563
564 dev_warn(&chip->dev,
565 "AMD fTPM version 0x%llx causes system stutter; hwrng disabled\n",
566 version);
567
568 return true;
569 }
570
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-20 20:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 20:24 [jarkko-tpmdd:master 3/3] drivers/char/tpm/tpm-chip.c:531:15: error: too many arguments to function 'tpm_request_locality' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).