tree:
https://github.com/thesofproject/linux pr/2515
head: f6ebe337999da298544fcce55ce23455bc2b19e0
commit: 887629dd2bee8f2f5c70ac6c4ffd5b86dbed4e01 [3/5] ASoC: SOF: update dsp core power
status in common APIs
config: arm64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/thesofproject/linux/commit/887629dd2bee8f2f5c70ac6c4ff...
git remote add linux-sof-driver
https://github.com/thesofproject/linux
git fetch --no-tags linux-sof-driver pr/2515
git checkout 887629dd2bee8f2f5c70ac6c4ffd5b86dbed4e01
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
sound/soc/sof/loader.c: In function 'snd_sof_run_firmware':
> sound/soc/sof/loader.c:814:6: warning: variable
'init_core_mask' set but not used [-Wunused-but-set-variable]
814 |
int init_core_mask;
| ^~~~~~~~~~~~~~
vim +/init_core_mask +814 sound/soc/sof/loader.c
70cd52544b95d02 Liam Girdwood 2019-04-12 810
70cd52544b95d02 Liam Girdwood 2019-04-12 811 int snd_sof_run_firmware(struct
snd_sof_dev *sdev)
70cd52544b95d02 Liam Girdwood 2019-04-12 812 {
70cd52544b95d02 Liam Girdwood 2019-04-12 813 int ret;
70cd52544b95d02 Liam Girdwood 2019-04-12 @814 int init_core_mask;
70cd52544b95d02 Liam Girdwood 2019-04-12 815
70cd52544b95d02 Liam Girdwood 2019-04-12 816
init_waitqueue_head(&sdev->boot_wait);
70cd52544b95d02 Liam Girdwood 2019-04-12 817
5c9714f637365a8 Ranjani Sridharan 2019-06-03 818 /* create read-only fw_version debugfs
to store boot version info */
70cd52544b95d02 Liam Girdwood 2019-04-12 819 if (sdev->first_boot) {
70cd52544b95d02 Liam Girdwood 2019-04-12 820 ret = snd_sof_debugfs_buf_item(sdev,
&sdev->fw_version,
70cd52544b95d02 Liam Girdwood 2019-04-12 821
sizeof(sdev->fw_version),
5c9714f637365a8 Ranjani Sridharan 2019-06-03 822 "fw_version",
0444);
70cd52544b95d02 Liam Girdwood 2019-04-12 823 /* errors are only due to memory
allocation, not debugfs */
70cd52544b95d02 Liam Girdwood 2019-04-12 824 if (ret < 0) {
70cd52544b95d02 Liam Girdwood 2019-04-12 825 dev_err(sdev->dev, "error:
snd_sof_debugfs_buf_item failed\n");
70cd52544b95d02 Liam Girdwood 2019-04-12 826 return ret;
70cd52544b95d02 Liam Girdwood 2019-04-12 827 }
70cd52544b95d02 Liam Girdwood 2019-04-12 828 }
70cd52544b95d02 Liam Girdwood 2019-04-12 829
70cd52544b95d02 Liam Girdwood 2019-04-12 830 /* perform pre fw run operations */
70cd52544b95d02 Liam Girdwood 2019-04-12 831 ret = snd_sof_dsp_pre_fw_run(sdev);
70cd52544b95d02 Liam Girdwood 2019-04-12 832 if (ret < 0) {
70cd52544b95d02 Liam Girdwood 2019-04-12 833 dev_err(sdev->dev, "error:
failed pre fw run op\n");
70cd52544b95d02 Liam Girdwood 2019-04-12 834 return ret;
70cd52544b95d02 Liam Girdwood 2019-04-12 835 }
70cd52544b95d02 Liam Girdwood 2019-04-12 836
70cd52544b95d02 Liam Girdwood 2019-04-12 837 dev_dbg(sdev->dev, "booting
DSP firmware\n");
70cd52544b95d02 Liam Girdwood 2019-04-12 838
70cd52544b95d02 Liam Girdwood 2019-04-12 839 /* boot the firmware on the DSP */
70cd52544b95d02 Liam Girdwood 2019-04-12 840 ret = snd_sof_dsp_run(sdev);
70cd52544b95d02 Liam Girdwood 2019-04-12 841 if (ret < 0) {
70cd52544b95d02 Liam Girdwood 2019-04-12 842 dev_err(sdev->dev, "error:
failed to reset DSP\n");
70cd52544b95d02 Liam Girdwood 2019-04-12 843 return ret;
70cd52544b95d02 Liam Girdwood 2019-04-12 844 }
70cd52544b95d02 Liam Girdwood 2019-04-12 845
70cd52544b95d02 Liam Girdwood 2019-04-12 846 init_core_mask = ret;
70cd52544b95d02 Liam Girdwood 2019-04-12 847
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 848 /*
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 849 * now wait for the DSP to boot. There
are 3 possible outcomes:
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 850 * 1. Boot wait times out indicating
FW boot failure.
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 851 * 2. FW boots successfully and
fw_ready op succeeds.
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 852 * 3. FW boots but fw_ready op fails.
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 853 */
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 854 ret =
wait_event_timeout(sdev->boot_wait,
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 855 sdev->fw_state >
SOF_FW_BOOT_IN_PROGRESS,
70cd52544b95d02 Liam Girdwood 2019-04-12 856
msecs_to_jiffies(sdev->boot_timeout));
70cd52544b95d02 Liam Girdwood 2019-04-12 857 if (ret == 0) {
70cd52544b95d02 Liam Girdwood 2019-04-12 858 dev_err(sdev->dev, "error:
firmware boot failure\n");
acfe976d3b24d9e Ranjani Sridharan 2020-10-30 859 snd_sof_dsp_dbg_dump(sdev,
SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX |
9055b6e3c848e39 Ranjani Sridharan 2020-10-21 860 SOF_DBG_DUMP_TEXT | SOF_DBG_DUMP_PCI
| SOF_DBG_DUMP_FORCE_ERR_LEVEL);
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 861 sdev->fw_state =
SOF_FW_BOOT_FAILED;
70cd52544b95d02 Liam Girdwood 2019-04-12 862 return -EIO;
70cd52544b95d02 Liam Girdwood 2019-04-12 863 }
70cd52544b95d02 Liam Girdwood 2019-04-12 864
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 865 if (sdev->fw_state ==
SOF_FW_BOOT_COMPLETE)
904f353d0e508fb Hans de Goede 2020-04-02 866 dev_dbg(sdev->dev, "firmware
boot complete\n");
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 867 else
6ca5cecbd1c1758 Ranjani Sridharan 2019-12-17 868 return -EIO; /* FW boots but fw_ready
op failed */
70cd52544b95d02 Liam Girdwood 2019-04-12 869
70cd52544b95d02 Liam Girdwood 2019-04-12 870 /* perform post fw run operations */
70cd52544b95d02 Liam Girdwood 2019-04-12 871 ret = snd_sof_dsp_post_fw_run(sdev);
70cd52544b95d02 Liam Girdwood 2019-04-12 872 if (ret < 0) {
70cd52544b95d02 Liam Girdwood 2019-04-12 873 dev_err(sdev->dev, "error:
failed post fw run op\n");
70cd52544b95d02 Liam Girdwood 2019-04-12 874 return ret;
70cd52544b95d02 Liam Girdwood 2019-04-12 875 }
70cd52544b95d02 Liam Girdwood 2019-04-12 876
70cd52544b95d02 Liam Girdwood 2019-04-12 877 return 0;
70cd52544b95d02 Liam Girdwood 2019-04-12 878 }
70cd52544b95d02 Liam Girdwood 2019-04-12 879 EXPORT_SYMBOL(snd_sof_run_firmware);
70cd52544b95d02 Liam Girdwood 2019-04-12 880
:::::: The code at line 814 was first introduced by commit
:::::: 70cd52544b95d02f8b20fadccb7400ce68a2cb84 ASoC: SOF: Add firmware loader support
:::::: TO: Liam Girdwood <liam.r.girdwood(a)linux.intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org