Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a87a2b5
ASoC: SOF: Move the definition of enum snd_sof_fw_state to global header
Aug 13, 2021
4d512ec
ASoC: SOF: Introduce a macro to set the firmware state
Aug 16, 2021
44b2a43
ASoC: SOF: debug: Print out the fw_state along with the DSP dump
Aug 18, 2021
9115f5b
ASoC: SOF: Introduce new firmware state: SOF_FW_CRASHED
Aug 17, 2021
476d4c0
ASoC: soc-component: Add support module get/put on open for compresse…
Jul 23, 2021
7274b1c
ASoC: SOF: Introduce IPC SOF client support
Oct 22, 2020
6a772ce
ASoC: SOF: core/ops: Add support for client registration
Oct 22, 2020
a858cfa
ASoC: SOF: core: Unregister machine driver before IPC and debugfs
Jul 23, 2021
49abfdc
ASoC: SOF: ipc: Read and pass the whole message to handlers for IPC e…
Jul 6, 2021
11f3b3a
ASoC: SOF: clients: Add support for IPC rx and firmware state change
Jul 6, 2021
20c9323
ASoC: SOF: clients: Add support for auxdev suspend/resume handling
Jul 9, 2021
9e32894
ASoC: SOF: clients: Add API to get the SOF firmware version
Jul 7, 2021
bcaad35
ASoC: SOF: clients: Add API to manage the module refcount of SOF core
Jul 21, 2021
92a48c2
ASoC: SOF: intel: hda-trace: Pass the dma buffer pointer to hda_dsp_t…
Jul 9, 2021
9e675f2
ASoC: SOF: Split up utils.c into sof-utils and iomem-utils
Jul 15, 2021
deb5a0c
ASoC: SOF: Convert the generic IPC flood test into SOF client
Oct 22, 2020
cba8df9
ASoC: SOF: sof-client-ipc-test: Protection against removal while in use
Jul 22, 2021
64a91b8
ASoC: SOF: sof-client-ipc-test: Block the test if the firmware has cr…
Aug 20, 2021
5f585a8
ASoC: SOF: Convert the generic probe support to SOF client
Jun 9, 2021
d6a888d
ASoC: SOF: sof-client-probes: Add module parameter to enable probes s…
Aug 9, 2021
6677eec
ASoC: SOF: sof-client-probes: Protection against removal while in use
Jul 22, 2021
68d6c63
ASoC: SOF: sof-client-probes: Block the capture if the firmware is cr…
Aug 20, 2021
39459f7
ASoC: SOF: Add optional SOF client for dma-trace support
Jul 6, 2021
9e6b984
ASoC: SOF: imx: Enable SOF client version of dma-trace
Aug 18, 2021
e8bab41
ASoC: SOF: Switch to the client driver for dma-trace support
Jul 19, 2021
5c75bc5
ASoC: SOF: sof-client-dma-trace: Add protection against file/module r…
Jul 21, 2021
b3089af
ASoC: SOF: sof-client-dma-trace: Block the dtrace if the firmware has…
Aug 20, 2021
b269552
ASoC: SOF: sof-client-dma-trace: Simplify count adjustment in trace_read
Jul 16, 2021
fd4a66c
ASoC: SOF: sof-client-dma-trace: Coding style cleanups
Jul 16, 2021
5e3f492
ASoC: SOF: sof-client-ipc-test: Code cleanup for consistency
Jul 22, 2021
f763eea
ASoC: SOF: sof-client-probes: Code cleanup for consistency
Jul 22, 2021
3bd20bb
ASoC: SOF: sof-client-dma-trace: Code cleanup for consistency
Jul 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sound/soc/sof/sof-client-ipc-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ struct sof_ipc_client_data {

static int sof_ipc_dfsentry_open(struct inode *inode, struct file *file)
{
struct sof_client_dev *cdev = inode->i_private;
int ret;

if (sof_client_get_fw_state(cdev) == SOF_FW_CRASHED)
return -ENODEV;

ghost Aug 24, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happened before this test was introduced? Did we get an error or a kernel oops?

ghost Aug 26, 2021

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first IPC tx would time-out (error prints from the core) and we aborted the test (error print in the flood test).
We could print in dmesg that the test can not be run due to the fact that the firmware is thought to be crashed.

There is definitely no point of trying to execute the test in this case.


ret = debugfs_file_get(file->f_path.dentry);

ghost Jul 23, 2021

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the debugfs file be removed while open if we already prevent the core from being removed? Or is debugfs managed by a different module?

ghost Jul 23, 2021

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is owned by this module and we only remove the file when removing the module.
I will leave it like this for now, but I have a feeling that we might be fine only with the debugfs_file_get() / debugfs_file_put() alone via open/release, but I need to do some extensive testing to drop either of the calls.

ghost Jul 23, 2021

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried it with the dma-trace and removed the sof_client_core_module_get/put and left only the debugfs_file_get/put:

  • the snd_sof_dma_trace can not be removed as it's use count is increases
  • the snd_sof_pci_intel_tgl can be removed (use count is 0) and by doing that the sof-logger aborts and the dma-trace is unloading fine.

I need to recompile the firmware with debug enabled to be able to test how the ipc-flood would behave, but I kind of expect similar behavior, likely the tgl rmmod would wait until the test finishes.

ghost Aug 11, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is this patch needed or not?

ghost Aug 13, 2021

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is needed, but the sof_client_core_module_get/put canm be dropped from it.

if (unlikely(ret))
return ret;
Expand Down