Skip to content

ASoC: SOF: add new SOF_IPC_PANIC_ASSERT code - #762

Merged
plbossart merged 1 commit into
thesofproject:topic/sof-devfrom
tlauda:topic/sof-panic-assert
Apr 5, 2019
Merged

plbossart merged 1 commit into
thesofproject:topic/sof-devfrom
tlauda:topic/sof-panic-assert

Conversation

@tlauda

@tlauda tlauda commented Mar 30, 2019

Copy link
Copy Markdown

Adds new SOF_IPC_PANIC_ASSERT code to align with
FW. It is caused by failed assertion inside of FW.

Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com

Adds new SOF_IPC_PANIC_ASSERT code to align with
FW. It is caused by failed assertion inside of FW.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>

@plbossart plbossart left a comment

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.

not sure if this is a real ABI change, the kernel should have a different behavior if it was.

Comment thread sound/soc/sof/core.c
{SOF_IPC_PANIC_STACK, "stack overflow"},
{SOF_IPC_PANIC_IDLE, "can't enter idle"},
{SOF_IPC_PANIC_WFI, "invalid wait state"},
{SOF_IPC_PANIC_ASSERT, "assertion failed"},

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.

I wonder if a new kernel should not use the new codes if they are sent by an older firmware? Maybe we want to tag when each code was added so that the kernel can filter out too recent ones as unknown. If the kernel does not do anything selective then it's not an ABI change.

@xiulipan

xiulipan commented Apr 1, 2019

Copy link
Copy Markdown

@plbossart
I think the ABI change can be minor. If some unknown panic message is sent, the kernel will fallback to dump the exact value but not the parsed message.

@plbossart

Copy link
Copy Markdown
Member

@xiulipan the case I am thinking of is an old firmware with a recent kernel. This has to be supported, and I am not sure the newer kernel should use codes that were introduced after the firmware in use was released. Newer codes should be treated as unknown, otherwise the kernel might report weird issues

@xiulipan

xiulipan commented Apr 2, 2019

Copy link
Copy Markdown

@plbossart
I think in this case, no error will happen. FW will never send some message with the newer format and kernel won't parse it anyway.

@tlauda

tlauda commented Apr 2, 2019

Copy link
Copy Markdown
Author

@plbossart I don't see it's happening. Kernel will just treat this as uknown as you mentioned.

@plbossart

plbossart commented Apr 2, 2019 via email

Copy link
Copy Markdown
Member

@plbossart plbossart left a comment

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.

it seems that no one got my question on handling codes in backwards compatible ways, so will merge for now. I have bigger battles to fight.

@plbossart
plbossart merged commit 8310732 into thesofproject:topic/sof-dev Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants