]> www.infradead.org Git - users/jedix/linux-maple.git/commit
accel/habanalabs/gaudi2: fix spmu mask creation
authorOded Gabbay <ogabbay@kernel.org>
Thu, 28 Sep 2023 13:12:30 +0000 (16:12 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 9 Oct 2023 09:37:24 +0000 (12:37 +0300)
commit4db74c0fdeb8138f6438d42a015c5dcdb2e6874c
tree1693c7b99677349c5083089e474fa75c48cfa185
parent0426e03126fba3e3e8c549504283f7213d31831f
accel/habanalabs/gaudi2: fix spmu mask creation

event_types_num received from the user can be 0. In that case, the
event_mask should be 0.

In addition, to create a correct mask we need to match the number
of event types to the bit location such that bit 0 represents a single
event type, bit 1 represents 2 types and so on.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Ofir Bitton <obitton@habana.ai>
drivers/accel/habanalabs/gaudi2/gaudi2_coresight.c