Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idc: zephyr: set of fixes to IDC in multicore scenario #8753

Closed
wants to merge 3 commits into from

Commits on Jan 17, 2024

  1. idc: zephyr: add a timeout to blocking IDC send

    Replace infinite wait with a time-limited wait. In case a blocking
    IDC message is not handled within IDC_TIMEOUT, return an error
    instead of waiting. This allows to debug stuck core-to-core communication
    easier.
    
    Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    kv2019i committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    d469ec0 View commit details
    Browse the repository at this point in the history
  2. idc: zephyr: remove unnecessary cache invd/flush calls

    The IDC message objects are stored to static "idc_work", so
    the cache operations are unnecessary when pointers to these
    messages are passed around.
    
    Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    kv2019i committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    72e31f3 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. idc: zephyr: fix race between IDC p4wq worker and new msg submission

    A race exists between submitting a new IDC message and completion
    of a previous message. The p4wq interface mandates k_p4wq_wait() must
    be called to claim back ownership of the work object.  The SOF IDC
    code does not do this, but relies on the caller not to send multiple
    IDC messages to the same destination core.
    
    Add appropriate calls to k_p4wq_wait() to handle this issue. If caller
    wants to send an IDC in blocking mode, also call k_p4wq_wait() in
    blocking mode. If non-blocking, return -EBUSY immediately.
    
    The check for CPU status is moved earlier in the function. No pointing
    in waiting for p4wq semaphore if the target core is already powered
    down, so do the power state check as the first step.
    
    Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    kv2019i committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    342553c View commit details
    Browse the repository at this point in the history