Repository navigation
ASoC: SOF: add new SOF_IPC_PANIC_ASSERT code - #762
Conversation
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
left a comment
There was a problem hiding this comment.
not sure if this is a real ABI change, the kernel should have a different behavior if it was.
| {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"}, |
There was a problem hiding this comment.
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.
|
@plbossart |
|
@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 |
|
@plbossart |
|
@plbossart I don't see it's happening. Kernel will just treat this as uknown as you mentioned. |
|
On 4/2/19 5:34 AM, xiulipan wrote:
@plbossart <https://github.com/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.
currently we deal with "unknown" messages since the firmware can send
garbled values. If those values end-up matching the new codes then you
have a misleading error report...
In general we should not assume that errors will not happen, or formats
will be respected. Murphy's Law applies here. When you deal with errors,
you should only deal with the codes you know as valid for a specific
firmware version.
|
plbossart
left a comment
There was a problem hiding this comment.
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.
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