All of lore.kernel.org
 help / color / mirror / Atom feed
* [thesofproject:pr/2989 4/4] sound/soc/sof/intel/hda-loader.c:423:8: error: 'sof_core_debug' undeclared
@ 2021-11-26 12:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-26 12:28 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/thesofproject/linux pr/2989
head:   01cee2172bbc9a584634311ae57d11280ead3c72
commit: 01cee2172bbc9a584634311ae57d11280ead3c72 [4/4] ASoC: SOF: add flag to disable IMR restore to sof_debug
config: x86_64-sof-customedconfig-sof-defconfig (https://download.01.org/0day-ci/archive/20211126/202111262053.adRWG49P-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/thesofproject/linux/commit/01cee2172bbc9a584634311ae57d11280ead3c72
        git remote add thesofproject https://github.com/thesofproject/linux
        git fetch --no-tags thesofproject pr/2989
        git checkout 01cee2172bbc9a584634311ae57d11280ead3c72
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/sof/intel/

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

All errors (new ones prefixed by >>):

   sound/soc/sof/intel/hda-loader.c: In function 'hda_dsp_cl_boot_firmware':
>> sound/soc/sof/intel/hda-loader.c:423:8: error: 'sof_core_debug' undeclared (first use in this function)
     423 |      !(sof_core_debug & SOF_DBG_IGNORE_D3_PERSISTENT) &&
         |        ^~~~~~~~~~~~~~
   sound/soc/sof/intel/hda-loader.c:423:8: note: each undeclared identifier is reported only once for each function it appears in


vim +/sof_core_debug +423 sound/soc/sof/intel/hda-loader.c

   411	
   412	int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
   413	{
   414		struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
   415		struct snd_sof_pdata *plat_data = sdev->pdata;
   416		const struct sof_dev_desc *desc = plat_data->desc;
   417		const struct sof_intel_dsp_desc *chip_info;
   418		struct hdac_ext_stream *hext_stream;
   419		struct firmware stripped_firmware;
   420		int ret, ret1, i;
   421	
   422		if ((sdev->fw_ready.flags & SOF_IPC_INFO_D3_PERSISTENT) &&
 > 423		    !(sof_core_debug & SOF_DBG_IGNORE_D3_PERSISTENT) &&
   424		    !sdev->first_boot) {
   425			dev_dbg(sdev->dev, "IMR restore supported, booting from IMR directly\n");
   426			return hda_dsp_boot_imr(sdev);
   427		}
   428	
   429		chip_info = desc->chip_info;
   430	
   431		if (plat_data->fw->size <= plat_data->fw_offset) {
   432			dev_err(sdev->dev, "error: firmware size must be greater than firmware offset\n");
   433			return -EINVAL;
   434		}
   435	
   436		stripped_firmware.data = plat_data->fw->data + plat_data->fw_offset;
   437		stripped_firmware.size = plat_data->fw->size - plat_data->fw_offset;
   438	
   439		/* init for booting wait */
   440		init_waitqueue_head(&sdev->boot_wait);
   441	
   442		/* prepare DMA for code loader stream */
   443		hext_stream = cl_stream_prepare(sdev, HDA_CL_STREAM_FORMAT, stripped_firmware.size,
   444						&sdev->dmab, SNDRV_PCM_STREAM_PLAYBACK);
   445		if (IS_ERR(hext_stream)) {
   446			dev_err(sdev->dev, "error: dma prepare for fw loading failed\n");
   447			return PTR_ERR(hext_stream);
   448		}
   449	
   450		memcpy(sdev->dmab.area, stripped_firmware.data,
   451		       stripped_firmware.size);
   452	
   453		/* try ROM init a few times before giving up */
   454		for (i = 0; i < HDA_FW_BOOT_ATTEMPTS; i++) {
   455			dev_dbg(sdev->dev,
   456				"Attempting iteration %d of Core En/ROM load...\n", i);
   457	
   458			hda->boot_iteration = i + 1;
   459			ret = cl_dsp_init(sdev, hext_stream->hstream.stream_tag);
   460	
   461			/* don't retry anymore if successful */
   462			if (!ret)
   463				break;
   464		}
   465	
   466		if (i == HDA_FW_BOOT_ATTEMPTS) {
   467			dev_err(sdev->dev, "error: dsp init failed after %d attempts with err: %d\n",
   468				i, ret);
   469			goto cleanup;
   470		}
   471	
   472		hda_sdw_wakeen_resume(sdev);
   473	
   474		/*
   475		 * Set the boot_iteration to the last attempt, indicating that the
   476		 * DSP ROM has been initialized and from this point there will be no
   477		 * retry done to boot.
   478		 *
   479		 * Continue with code loading and firmware boot
   480		 */
   481		hda->boot_iteration = HDA_FW_BOOT_ATTEMPTS;
   482		ret = cl_copy_fw(sdev, hext_stream);
   483		if (!ret)
   484			dev_dbg(sdev->dev, "Firmware download successful, booting...\n");
   485		else
   486			snd_sof_dsp_dbg_dump(sdev, "Firmware download failed",
   487					     SOF_DBG_DUMP_PCI | SOF_DBG_DUMP_MBOX);
   488	
   489	cleanup:
   490		/*
   491		 * Perform codeloader stream cleanup.
   492		 * This should be done even if firmware loading fails.
   493		 * If the cleanup also fails, we return the initial error
   494		 */
   495		ret1 = cl_cleanup(sdev, &sdev->dmab, hext_stream);
   496		if (ret1 < 0) {
   497			dev_err(sdev->dev, "error: Code loader DSP cleanup failed\n");
   498	
   499			/* set return value to indicate cleanup failure */
   500			if (!ret)
   501				ret = ret1;
   502		}
   503	
   504		/*
   505		 * return primary core id if both fw copy
   506		 * and stream clean up are successful
   507		 */
   508		if (!ret)
   509			return chip_info->init_core_mask;
   510	
   511		/* disable DSP */
   512		snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR,
   513					SOF_HDA_REG_PP_PPCTL,
   514					SOF_HDA_PPCTL_GPROCEN, 0);
   515		return ret;
   516	}
   517	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

only message in thread, other threads:[~2021-11-26 12:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-26 12:28 [thesofproject:pr/2989 4/4] sound/soc/sof/intel/hda-loader.c:423:8: error: 'sof_core_debug' undeclared kernel 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.