• farah kassabri's avatar
    accel/habanalabs: Allow single timestamp registration request at a time · eaa43a06
    farah kassabri authored
    Protect against concurrency of user requesting to register a timestamp
    offset (where the driver fills the timestamp when the command submission
    has finished executing) to a specific user interrupt ID. The
    protection is basically to allow only one timestamp registration
    request to be handled at a time.
    
    This is needed because the user can decide to re-use a timestamp
    offset (register an already registered offset, to a different
    interrupt ID). This means the request will cause the timestamp node to
    move from one interrupt list to another interrupt list. In such
    scenario, without proper protection, we could end up adding the same
    node twice to the interrupts wait lists.
    Signed-off-by: default avatarfarah kassabri <fkassabri@habana.ai>
    Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    eaa43a06
context.c 10.2 KB