All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-review:UPDATE-20191113-052754/Jerry-Snitselaar/tpm_tis-turn-on-TPM-before-calling-tpm_get_timeouts/20191113-052550 1/1] drivers/char/tpm/tpm_tis_core.c:1060:4: error: implicit declaration of function 'tpm_stop_chip'
@ 2019-11-12 22:47 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-12 22:47 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6372 bytes --]

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20191113-052754/Jerry-Snitselaar/tpm_tis-turn-on-TPM-before-calling-tpm_get_timeouts/20191113-052550
head:   4d007703f2b5e89029ba74d0239292d7212fd81a
commit: 4d007703f2b5e89029ba74d0239292d7212fd81a [1/1] tpm_tis: turn on TPM before calling tpm_get_timeouts
config: x86_64-randconfig-a004-201945 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        git checkout 4d007703f2b5e89029ba74d0239292d7212fd81a
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/char/tpm/tpm_tis_core.c: In function 'tpm_tis_core_init':
>> drivers/char/tpm/tpm_tis_core.c:1060:4: error: implicit declaration of function 'tpm_stop_chip' [-Werror=implicit-function-declaration]
       tpm_stop_chip(chip);
       ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/tpm_stop_chip +1060 drivers/char/tpm/tpm_tis_core.c

   951	
   952		chip->hwrng.quality = priv->rng_quality;
   953	
   954		/* Maximum timeouts */
   955		chip->timeout_a = msecs_to_jiffies(TIS_TIMEOUT_A_MAX);
   956		chip->timeout_b = msecs_to_jiffies(TIS_TIMEOUT_B_MAX);
   957		chip->timeout_c = msecs_to_jiffies(TIS_TIMEOUT_C_MAX);
   958		chip->timeout_d = msecs_to_jiffies(TIS_TIMEOUT_D_MAX);
   959		priv->phy_ops = phy_ops;
   960		dev_set_drvdata(&chip->dev, priv);
   961	
   962		if (is_bsw()) {
   963			priv->ilb_base_addr = ioremap(INTEL_LEGACY_BLK_BASE_ADDR,
   964						ILB_REMAP_SIZE);
   965			if (!priv->ilb_base_addr)
   966				return -ENOMEM;
   967	
   968			clkrun_val = ioread32(priv->ilb_base_addr + LPC_CNTRL_OFFSET);
   969			/* Check if CLKRUN# is already not enabled in the LPC bus */
   970			if (!(clkrun_val & LPC_CLKRUN_EN)) {
   971				iounmap(priv->ilb_base_addr);
   972				priv->ilb_base_addr = NULL;
   973			}
   974		}
   975	
   976		if (chip->ops->clk_enable != NULL)
   977			chip->ops->clk_enable(chip, true);
   978	
   979		if (wait_startup(chip, 0) != 0) {
   980			rc = -ENODEV;
   981			goto out_err;
   982		}
   983	
   984		/* Take control of the TPM's interrupt hardware and shut it off */
   985		rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask);
   986		if (rc < 0)
   987			goto out_err;
   988	
   989		intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
   990			   TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
   991		intmask &= ~TPM_GLOBAL_INT_ENABLE;
   992		tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask);
   993	
   994		rc = tpm_chip_start(chip);
   995		if (rc)
   996			goto out_err;
   997		rc = tpm2_probe(chip);
   998		tpm_chip_stop(chip);
   999		if (rc)
  1000			goto out_err;
  1001	
  1002		rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor);
  1003		if (rc < 0)
  1004			goto out_err;
  1005	
  1006		priv->manufacturer_id = vendor;
  1007	
  1008		rc = tpm_tis_read8(priv, TPM_RID(0), &rid);
  1009		if (rc < 0)
  1010			goto out_err;
  1011	
  1012		dev_info(dev, "%s TPM (device-id 0x%X, rev-id %d)\n",
  1013			 (chip->flags & TPM_CHIP_FLAG_TPM2) ? "2.0" : "1.2",
  1014			 vendor >> 16, rid);
  1015	
  1016		probe = probe_itpm(chip);
  1017		if (probe < 0) {
  1018			rc = -ENODEV;
  1019			goto out_err;
  1020		}
  1021	
  1022		/* Figure out the capabilities */
  1023		rc = tpm_tis_read32(priv, TPM_INTF_CAPS(priv->locality), &intfcaps);
  1024		if (rc < 0)
  1025			goto out_err;
  1026	
  1027		dev_dbg(dev, "TPM interface capabilities (0x%x):\n",
  1028			intfcaps);
  1029		if (intfcaps & TPM_INTF_BURST_COUNT_STATIC)
  1030			dev_dbg(dev, "\tBurst Count Static\n");
  1031		if (intfcaps & TPM_INTF_CMD_READY_INT)
  1032			dev_dbg(dev, "\tCommand Ready Int Support\n");
  1033		if (intfcaps & TPM_INTF_INT_EDGE_FALLING)
  1034			dev_dbg(dev, "\tInterrupt Edge Falling\n");
  1035		if (intfcaps & TPM_INTF_INT_EDGE_RISING)
  1036			dev_dbg(dev, "\tInterrupt Edge Rising\n");
  1037		if (intfcaps & TPM_INTF_INT_LEVEL_LOW)
  1038			dev_dbg(dev, "\tInterrupt Level Low\n");
  1039		if (intfcaps & TPM_INTF_INT_LEVEL_HIGH)
  1040			dev_dbg(dev, "\tInterrupt Level High\n");
  1041		if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT)
  1042			dev_dbg(dev, "\tLocality Change Int Support\n");
  1043		if (intfcaps & TPM_INTF_STS_VALID_INT)
  1044			dev_dbg(dev, "\tSts Valid Int Support\n");
  1045		if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
  1046			dev_dbg(dev, "\tData Avail Int Support\n");
  1047	
  1048		/* INTERRUPT Setup */
  1049		init_waitqueue_head(&priv->read_queue);
  1050		init_waitqueue_head(&priv->int_queue);
  1051		if (irq != -1) {
  1052			/* Before doing irq testing issue a command to the TPM in polling mode
  1053			 * to make sure it works. May as well use that command to set the
  1054			 * proper timeouts for the driver.
  1055			 */
  1056			tpm_chip_start(chip);
  1057			if (tpm_get_timeouts(chip)) {
  1058				dev_err(dev, "Could not get TPM timeouts and durations\n");
  1059				rc = -ENODEV;
> 1060				tpm_stop_chip(chip);
  1061				goto out_err;
  1062			}
  1063	
  1064			chip->flags |= TPM_CHIP_FLAG_IRQ;
  1065			if (irq) {
  1066				tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
  1067							 irq);
  1068				if (!(chip->flags & TPM_CHIP_FLAG_IRQ))
  1069					dev_err(&chip->dev, FW_BUG
  1070						"TPM interrupt not working, polling instead\n");
  1071			} else {
  1072				tpm_tis_probe_irq(chip, intmask);
  1073			}
  1074			tpm_chip_stop(chip);
  1075		}
  1076	
  1077		rc = tpm_chip_register(chip);
  1078		if (rc)
  1079			goto out_err;
  1080	
  1081		if (chip->ops->clk_enable != NULL)
  1082			chip->ops->clk_enable(chip, false);
  1083	
  1084		return 0;
  1085	out_err:
  1086		if ((chip->ops != NULL) && (chip->ops->clk_enable != NULL))
  1087			chip->ops->clk_enable(chip, false);
  1088	
  1089		tpm_tis_remove(chip);
  1090	
  1091		return rc;
  1092	}
  1093	EXPORT_SYMBOL_GPL(tpm_tis_core_init);
  1094	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32442 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-12 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 22:47 [linux-review:UPDATE-20191113-052754/Jerry-Snitselaar/tpm_tis-turn-on-TPM-before-calling-tpm_get_timeouts/20191113-052550 1/1] drivers/char/tpm/tpm_tis_core.c:1060:4: error: implicit declaration of function 'tpm_stop_chip' kbuild test robot

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.