Commit 79fc7a9f authored by Omer Shpigelman's avatar Omer Shpigelman Committed by Oded Gabbay
Browse files

habanalabs: add gaudi profiler module



Add the GAUDI code to initialize the ASIC's profiler. The profile receives
its initialization values from the user, same as in Goya, 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 avatarOmer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent 3a3a5bf1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
subdir-ccflags-y += -I$(src)

HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o
 No newline at end of file
HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \
	gaudi/gaudi_coresight.o
+2 −2
Original line number Diff line number Diff line
@@ -7319,7 +7319,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
	.send_heartbeat = gaudi_send_heartbeat,
	.enable_clock_gating = gaudi_enable_clock_gating,
	.disable_clock_gating = gaudi_disable_clock_gating,
	.debug_coresight = NULL,
	.debug_coresight = gaudi_debug_coresight,
	.is_device_idle = gaudi_is_device_idle,
	.soft_reset_late_init = gaudi_soft_reset_late_init,
	.hw_queues_lock = gaudi_hw_queues_lock,
@@ -7333,7 +7333,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
	.init_iatu = gaudi_init_iatu,
	.rreg = hl_rreg,
	.wreg = hl_wreg,
	.halt_coresight = NULL,
	.halt_coresight = gaudi_halt_coresight,
	.get_clk_rate = gaudi_get_clk_rate,
	.get_queue_id_for_cq = gaudi_get_queue_id_for_cq,
	.read_device_fw_version = gaudi_read_device_fw_version,
+2 −0
Original line number Diff line number Diff line
@@ -252,6 +252,8 @@ void gaudi_init_security(struct hl_device *hdev);
void gaudi_add_device_attr(struct hl_device *hdev,
			struct attribute_group *dev_attr_grp);
void gaudi_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq);
int gaudi_debug_coresight(struct hl_device *hdev, void *data);
void gaudi_halt_coresight(struct hl_device *hdev);
int gaudi_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk);

#endif /* GAUDIP_H_ */
+884 −0

File added.

Preview size limit exceeded, changes collapsed.