Commit 1ec353d5 authored by Himanshu Chauhan's avatar Himanshu Chauhan Committed by Anup Patel
Browse files

lib: sbi: Use mask to check the free bit during trigger allocation

The trigger allocation function uses bit shift instead of mask to check the
mapped status of the triggers. This causes index 0 to be return always. As a
result, the older triggers are overwritten.

Use the mask for MAPPED field in state word to check if the trigger is mapped.

Fixes: 97f234f1

 ("lib: sbi: Introduce the SBI debug triggers extension support")
Signed-off-by: default avatarHimanshu Chauhan <hchauhan@ventanamicro.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent bb90a9eb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment