Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
	broonie@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, perex@perex.cz, tiwai@suse.com,
	srini@kernel.org, alexey.klimov@linaro.org,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Subject: Re: [PATCH 12/12] ASoC: qcom: q6asm: Use guard() for spin locks
Date: Sun, 19 Oct 2025 12:18:32 +0800	[thread overview]
Message-ID: <202510191117.BTexj8De-lkp@intel.com> (raw)
In-Reply-To: <20251017085307.4325-13-srinivas.kandagatla@oss.qualcomm.com>

Hi Srinivas,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on linus/master v6.18-rc1 next-20251017]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Srinivas-Kandagatla/ASoC-qdsp6-q6asm-do-not-sleep-while-atomic/20251017-170114
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20251017085307.4325-13-srinivas.kandagatla%40oss.qualcomm.com
patch subject: [PATCH 12/12] ASoC: qcom: q6asm: Use guard() for spin locks
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20251019/202510191117.BTexj8De-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251019/202510191117.BTexj8De-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510191117.BTexj8De-lkp@intel.com/

All errors (new ones prefixed by >>):

   sound/soc/qcom/qdsp6/q6asm.c: In function 'q6asm_stream_callback':
>> sound/soc/qcom/qdsp6/q6asm.c:687:41: error: 'struct audio_port_data' has no member named 'hw_ptr'
     687 |                         atomic_set(&port->hw_ptr, token + 1);
         |                                         ^~


vim +687 sound/soc/qcom/qdsp6/q6asm.c

   590	
   591	static int32_t q6asm_stream_callback(struct apr_device *adev,
   592					     struct apr_resp_pkt *data,
   593					     int session_id)
   594	{
   595		struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
   596		struct aprv2_ibasic_rsp_result_t *result;
   597		struct apr_hdr *hdr = &data->hdr;
   598		struct audio_port_data *port;
   599		struct audio_client *ac;
   600		uint32_t client_event = 0;
   601		int ret = 0;
   602	
   603		ac = q6asm_get_audio_client(q6asm, session_id);
   604		if (!ac)/* Audio client might already be freed by now */
   605			return 0;
   606	
   607		result = data->payload;
   608	
   609		switch (hdr->opcode) {
   610		case APR_BASIC_RSP_RESULT:
   611			switch (result->opcode) {
   612			case ASM_SESSION_CMD_PAUSE:
   613				client_event = ASM_CLIENT_EVENT_CMD_PAUSE_DONE;
   614				break;
   615			case ASM_SESSION_CMD_SUSPEND:
   616				client_event = ASM_CLIENT_EVENT_CMD_SUSPEND_DONE;
   617				break;
   618			case ASM_STREAM_CMD_FLUSH:
   619				client_event = ASM_CLIENT_EVENT_CMD_FLUSH_DONE;
   620				break;
   621			case ASM_SESSION_CMD_RUN_V2:
   622				client_event = ASM_CLIENT_EVENT_CMD_RUN_DONE;
   623				break;
   624			case ASM_STREAM_CMD_CLOSE:
   625				client_event = ASM_CLIENT_EVENT_CMD_CLOSE_DONE;
   626				break;
   627			case ASM_STREAM_CMD_FLUSH_READBUFS:
   628				client_event = ASM_CLIENT_EVENT_CMD_OUT_FLUSH_DONE;
   629				break;
   630			case ASM_STREAM_CMD_OPEN_WRITE_V3:
   631			case ASM_STREAM_CMD_OPEN_READ_V3:
   632			case ASM_STREAM_CMD_OPEN_READWRITE_V2:
   633			case ASM_STREAM_CMD_SET_ENCDEC_PARAM:
   634			case ASM_DATA_CMD_MEDIA_FMT_UPDATE_V2:
   635			case ASM_DATA_CMD_REMOVE_INITIAL_SILENCE:
   636			case ASM_DATA_CMD_REMOVE_TRAILING_SILENCE:
   637				if (result->status != 0) {
   638					dev_err(ac->dev,
   639						"cmd = 0x%x returned error = 0x%x\n",
   640						result->opcode, result->status);
   641					ac->result = *result;
   642					wake_up(&ac->cmd_wait);
   643					ret = 0;
   644					goto done;
   645				}
   646				break;
   647			default:
   648				dev_err(ac->dev, "command[0x%x] not expecting rsp\n",
   649					result->opcode);
   650				break;
   651			}
   652	
   653			ac->result = *result;
   654			wake_up(&ac->cmd_wait);
   655	
   656			if (ac->cb)
   657				ac->cb(client_event, hdr->token,
   658				       data->payload, ac->priv);
   659	
   660			ret = 0;
   661			goto done;
   662	
   663		case ASM_DATA_EVENT_WRITE_DONE_V2:
   664			client_event = ASM_CLIENT_EVENT_DATA_WRITE_DONE;
   665			if (ac->io_mode & ASM_SYNC_IO_MODE) {
   666				phys_addr_t phys;
   667				int token = hdr->token & ASM_WRITE_TOKEN_MASK;
   668	
   669				guard(spinlock_irqsave)(&ac->lock);
   670	
   671				port =  &ac->port[SNDRV_PCM_STREAM_PLAYBACK];
   672	
   673				if (!port->buf) {
   674					ret = 0;
   675					goto done;
   676				}
   677	
   678				phys = port->buf[token].phys;
   679	
   680				if (lower_32_bits(phys) != result->opcode ||
   681				    upper_32_bits(phys) != result->status) {
   682					dev_err(ac->dev, "Expected addr %pa\n",
   683						&port->buf[token].phys);
   684					ret = -EINVAL;
   685					goto done;
   686				}
 > 687				atomic_set(&port->hw_ptr, token + 1);
   688			}
   689			break;
   690		case ASM_DATA_EVENT_READ_DONE_V2:
   691			client_event = ASM_CLIENT_EVENT_DATA_READ_DONE;
   692			if (ac->io_mode & ASM_SYNC_IO_MODE) {
   693				struct asm_data_cmd_read_v2_done *done = data->payload;
   694				phys_addr_t phys;
   695	
   696				guard(spinlock_irqsave)(&ac->lock);
   697				port =  &ac->port[SNDRV_PCM_STREAM_CAPTURE];
   698				if (!port->buf) {
   699					ret = 0;
   700					goto done;
   701				}
   702	
   703				phys = port->buf[hdr->token].phys;
   704	
   705				if (upper_32_bits(phys) != done->buf_addr_msw ||
   706				    lower_32_bits(phys) != done->buf_addr_lsw) {
   707					dev_err(ac->dev, "Expected addr %pa %08x-%08x\n",
   708						&port->buf[hdr->token].phys,
   709						done->buf_addr_lsw,
   710						done->buf_addr_msw);
   711					ret = -EINVAL;
   712					goto done;
   713				}
   714			}
   715	
   716			break;
   717		case ASM_DATA_EVENT_RENDERED_EOS:
   718			client_event = ASM_CLIENT_EVENT_CMD_EOS_DONE;
   719			break;
   720		}
   721	
   722		if (ac->cb)
   723			ac->cb(client_event, hdr->token, data->payload, ac->priv);
   724	
   725	done:
   726		kref_put(&ac->refcount, q6asm_audio_client_release);
   727		return ret;
   728	}
   729	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-10-19  4:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  8:52 [PATCH 00/12] ASoC: qcom: q6dsp: few cleanups Srinivas Kandagatla
2025-10-17  8:52 ` [PATCH 01/12] ASoC: qdsp6: q6asm: do not sleep while atomic Srinivas Kandagatla
2025-10-17  8:52 ` [PATCH 02/12] ASoc: qcom: audioreach: remove unused variables Srinivas Kandagatla
2025-10-17  8:52 ` [PATCH 03/12] ASoc: qcom: audioreach: Use automatic cleanup of kfree() Srinivas Kandagatla
2025-10-17  8:52 ` [PATCH 04/12] ASoc: qcom: q6adm: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 05/12] ASoc: qcom: q6afe: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 06/12] ASoc: qcom: q6apm: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 07/12] ASoc: qcom: q6prm: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 08/12] ASoc: qcom: q6asm: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 09/12] ASoC: qcom: q6afe: Use guard() for spin locks Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 10/12] ASoC: qcom: q6apm-dai: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 11/12] ASoC: qcom: q6asm-dai: " Srinivas Kandagatla
2025-10-17  8:53 ` [PATCH 12/12] ASoC: qcom: q6asm: " Srinivas Kandagatla
2025-10-19  4:18   ` kernel test robot [this message]
2025-10-20 10:29     ` Srinivas Kandagatla
2025-10-21 11:37 ` (subset) [PATCH 00/12] ASoC: qcom: q6dsp: few cleanups Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202510191117.BTexj8De-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexey.klimov@linaro.org \
    --cc=broonie@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=srini@kernel.org \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox