From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1109684263763695517==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [thesofproject:pr/2989 4/4] sound/soc/sof/intel/hda-loader.c:423:8: error: 'sof_core_debug' undeclared Date: Fri, 26 Nov 2021 20:28:33 +0800 Message-ID: <202111262053.adRWG49P-lkp@intel.com> List-Id: --===============1109684263763695517== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/0d= ay-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=3D1 build): # https://github.com/thesofproject/linux/commit/01cee2172bbc9a58463= 4311ae57d11280ead3c72 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=3D1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash sound/soc/= sof/intel/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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' undeclar= ed (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 =3D sdev->pdata->hw_pdata; 415 struct snd_sof_pdata *plat_data =3D sdev->pdata; 416 const struct sof_dev_desc *desc =3D 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 direct= ly\n"); 426 return hda_dsp_boot_imr(sdev); 427 } 428 = 429 chip_info =3D desc->chip_info; 430 = 431 if (plat_data->fw->size <=3D plat_data->fw_offset) { 432 dev_err(sdev->dev, "error: firmware size must be greater than firm= ware offset\n"); 433 return -EINVAL; 434 } 435 = 436 stripped_firmware.data =3D plat_data->fw->data + plat_data->fw_offs= et; 437 stripped_firmware.size =3D plat_data->fw->size - plat_data->fw_offs= et; 438 = 439 /* init for booting wait */ 440 init_waitqueue_head(&sdev->boot_wait); 441 = 442 /* prepare DMA for code loader stream */ 443 hext_stream =3D cl_stream_prepare(sdev, HDA_CL_STREAM_FORMAT, strip= ped_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 =3D 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 =3D i + 1; 459 ret =3D 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 =3D=3D 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 =3D HDA_FW_BOOT_ATTEMPTS; 482 ret =3D 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 =3D 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 =3D 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 --===============1109684263763695517==--