Commit de88aa67 authored by Benjamin Dotan's avatar Benjamin Dotan Committed by Oded Gabbay

habanalabs/gaudi2: add gaudi2 profiler module

Add the Gaudi2 code to initialize the ASIC's profiler. The profile
receives its initialization values from the user, same as in Gaudi2,
but the code to initialize is in the driver because the configuration
space of the device is not directly exposed to the user.
Signed-off-by: default avatarBenjamin Dotan <bdotan@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 45672146
# SPDX-License-Identifier: GPL-2.0-only
HL_GAUDI2_FILES := gaudi2/gaudi2.o gaudi2/gaudi2_security.o \
gaudi2/gaudi2_coresight.o
......@@ -5032,6 +5032,10 @@ static int gaudi2_hw_init(struct hl_device *hdev)
gaudi2_init_dec(hdev);
gaudi2_enable_timestamp(hdev);
rc = gaudi2_coresight_init(hdev);
if (rc)
goto disable_queues;
rc = gaudi2_enable_msix(hdev);
if (rc)
goto disable_queues;
......@@ -9711,7 +9715,7 @@ static const struct hl_asic_funcs gaudi2_funcs = {
.mmu_invalidate_cache_range = gaudi2_mmu_invalidate_cache_range,
.mmu_prefetch_cache_range = NULL,
.send_heartbeat = gaudi2_send_heartbeat,
.debug_coresight = NULL,
.debug_coresight = gaudi2_debug_coresight,
.is_device_idle = gaudi2_is_device_idle,
.non_hard_reset_late_init = gaudi2_non_hard_reset_late_init,
.hw_queues_lock = gaudi2_hw_queues_lock,
......@@ -9726,7 +9730,7 @@ static const struct hl_asic_funcs gaudi2_funcs = {
.init_iatu = gaudi2_init_iatu,
.rreg = hl_rreg,
.wreg = hl_wreg,
.halt_coresight = NULL,
.halt_coresight = gaudi2_halt_coresight,
.ctx_init = gaudi2_ctx_init,
.ctx_fini = gaudi2_ctx_fini,
.pre_schedule_cs = gaudi2_pre_schedule_cs,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Markdown is supported
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