Skip to content

Conversation

@lgirdwood
Copy link
Member

Some IPC logging updates that go alongside ABI compatibility support. Also includes fixing a false positive IPC trace_error.

Copy link
Member

Choose a reason for hiding this comment

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

And all MAJOR versions of the IPC ABI (up to a certain age to be determined by market information)

Copy link
Member

Choose a reason for hiding this comment

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

Not sure I see what the size check has to do with the ABI?
It's still useful not to trust the kernel, isn't it? Even for development it helps identify mismatches.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this has to work both ways since the driver also has to trust the FW too. We have 2 situations (for MINOR, PATCH updates) we need to deal with :

  1. Sender sends larger IPC than receiver expects - Easy to deal with as receiver only uses what it knows and by default ignores any new data.
  2. Sender sends smaller IPC than receiver expects - More complex, but receiver should pad any missing data as 0 i.e. all MINOR/PATCH ABI additions require non zero data to activate.

Copy link
Member

Choose a reason for hiding this comment

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

Agree, but we are doing neither. The patch just removes all checks and does not add padding or overrides.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixing that now but will be new PR. Will need something similar in the kernel.

Copy link
Member

Choose a reason for hiding this comment

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

ah ok then, didn't realize there was a planned follow-up

Improve trace for IPC.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
On receiving an IPC IRQ the handler currently does not check the
IRQ mask. This means notification received ACKs (i.e. for trace updates)
from the host may be reported as duplicate host command IPCs.

Fix this by checking IPC IRQ mask.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@xiulipan
Copy link
Contributor

SOFCI TEST

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

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

LGTM, only a cosmetic comment on %d vs. %u

"pcm_dev ID = %u not found.",
pcm_params->comp_id);
trace_ipc_error("ipc: comp %d not found", pcm_params->comp_id);
return -ENODEV;
Copy link
Member

Choose a reason for hiding this comment

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

nit-pick: you've replaced %u by %d in the format, is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will fix incrementally.

goto out;

trace_ipc("ipc: not rx -> 0x%x", msg->header);

Copy link
Member

Choose a reason for hiding this comment

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

for my education, have we stopped using the 3 letter code for errors? If yes, we might want to revisit all the drivers to provide more meaningful information that Sst or ssr for SSP start / resume

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, that's something we have todo - I'm hoping this can be the example to copy.

@lgirdwood lgirdwood merged commit 977fdd5 into master Nov 16, 2018
@lgirdwood lgirdwood deleted the topic/ipc-updates branch November 17, 2018 09:38
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.

5 participants