Commit 0e418ab7 authored by Tomer Tayar's avatar Tomer Tayar Committed by Oded Gabbay
Browse files

accel/habanalabs: remove '\n' when passing strings to gaudi2_print_event()



Remove all '\n' from strings which are passed as arguments to
gaudi2_print_event(), because the newline character is added internally
in this function.

Signed-off-by: default avatarTomer Tayar <ttayar@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent af5e675f
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -7634,7 +7634,7 @@ static bool gaudi2_handle_ecc_event(struct hl_device *hdev, u16 event_type,
	memory_wrapper_idx = ecc_data->memory_wrapper_idx;

	gaudi2_print_event(hdev, event_type, !ecc_data->is_critical,
		"ECC error detected. address: %#llx. Syndrom: %#llx. block id %u. critical %u.\n",
		"ECC error detected. address: %#llx. Syndrom: %#llx. block id %u. critical %u.",
		ecc_address, ecc_syndrom, memory_wrapper_idx, ecc_data->is_critical);

	return !!ecc_data->is_critical;
@@ -8925,7 +8925,7 @@ static int gaudi2_handle_sm_err(struct hl_device *hdev, u16 event_type, u8 sm_in
				continue;

			gaudi2_print_event(hdev, event_type, true,
				"err cause: %s. %s: 0x%X\n",
				"err cause: %s. %s: 0x%X",
				gaudi2_sm_sei_cause[i].cause_name,
				gaudi2_sm_sei_cause[i].log_name,
				sei_cause_log);
@@ -9131,12 +9131,12 @@ static bool gaudi2_handle_hbm_mc_sei_err(struct hl_device *hdev, u16 event_type,
	if (cause_idx > GAUDI2_NUM_OF_HBM_SEI_CAUSE - 1) {
		gaudi2_print_event(hdev, event_type, true,
			"err cause: %s",
			"Invalid HBM SEI event cause (%d) provided by FW\n", cause_idx);
			"Invalid HBM SEI event cause (%d) provided by FW", cause_idx);
		return true;
	}

	gaudi2_print_event(hdev, event_type, !sei_data->hdr.is_critical,
		"System %s Error Interrupt - HBM(%u) MC(%u) MC_CH(%u) MC_PC(%u). Error cause: %s\n",
		"System %s Error Interrupt - HBM(%u) MC(%u) MC_CH(%u) MC_PC(%u). Error cause: %s",
		sei_data->hdr.is_critical ? "Critical" : "Non-critical",
		hbm_id, mc_id, sei_data->hdr.mc_channel, sei_data->hdr.mc_pseudo_channel,
		hbm_mc_sei_cause[cause_idx]);
@@ -9260,7 +9260,7 @@ static void gaudi2_print_out_of_sync_info(struct hl_device *hdev, u16 event_type
	struct hl_hw_queue *q = &hdev->kernel_queues[GAUDI2_QUEUE_ID_CPU_PQ];

	gaudi2_print_event(hdev, event_type, false,
		"FW: pi=%u, ci=%u, LKD: pi=%u, ci=%d\n",
		"FW: pi=%u, ci=%u, LKD: pi=%u, ci=%d",
		le32_to_cpu(sync_err->pi), le32_to_cpu(sync_err->ci),
		q->pi, atomic_read(&q->ci));
}
@@ -9274,7 +9274,7 @@ static int gaudi2_handle_pcie_p2p_msix(struct hl_device *hdev, u16 event_type)

	if (p2p_intr) {
		gaudi2_print_event(hdev, event_type, true,
			"pcie p2p transaction terminated due to security, req_id(0x%x)\n",
			"pcie p2p transaction terminated due to security, req_id(0x%x)",
			RREG32(mmPCIE_WRAP_P2P_REQ_ID));

		WREG32(mmPCIE_WRAP_P2P_INTR, 0x1);
@@ -9283,7 +9283,7 @@ static int gaudi2_handle_pcie_p2p_msix(struct hl_device *hdev, u16 event_type)

	if (msix_gw_intr) {
		gaudi2_print_event(hdev, event_type, true,
			"pcie msi-x gen denied due to vector num check failure, vec(0x%X)\n",
			"pcie msi-x gen denied due to vector num check failure, vec(0x%X)",
			RREG32(mmPCIE_WRAP_MSIX_GW_VEC));

		WREG32(mmPCIE_WRAP_MSIX_GW_INTR, 0x1);
@@ -9345,7 +9345,7 @@ static void gaudi2_print_cpu_pkt_failure_info(struct hl_device *hdev, u16 event_
	struct hl_hw_queue *q = &hdev->kernel_queues[GAUDI2_QUEUE_ID_CPU_PQ];

	gaudi2_print_event(hdev, event_type, false,
		"FW reported sanity check failure, FW: pi=%u, ci=%u, LKD: pi=%u, ci=%d\n",
		"FW reported sanity check failure, FW: pi=%u, ci=%u, LKD: pi=%u, ci=%d",
		le32_to_cpu(sync_err->pi), le32_to_cpu(sync_err->ci), q->pi, atomic_read(&q->ci));
}

@@ -9365,11 +9365,11 @@ static int hl_arc_event_handle(struct hl_device *hdev, u16 event_type,
		q = (struct hl_engine_arc_dccm_queue_full_irq *) &payload;

		gaudi2_print_event(hdev, event_type, true,
				"ARC DCCM Full event: EngId: %u, Intr_type: %u, Qidx: %u\n",
				"ARC DCCM Full event: EngId: %u, Intr_type: %u, Qidx: %u",
				engine_id, intr_type, q->queue_index);
		return 1;
	default:
		gaudi2_print_event(hdev, event_type, true, "Unknown ARC event type\n");
		gaudi2_print_event(hdev, event_type, true, "Unknown ARC event type");
		return 0;
	}
}
@@ -9800,7 +9800,7 @@ static void gaudi2_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_ent
		gaudi2_print_event(hdev, event_type, true, "%d", event_type);
	else if (error_count == 0)
		gaudi2_print_event(hdev, event_type, true,
				"No error cause for H/W event %u\n", event_type);
				"No error cause for H/W event %u", event_type);

	if ((gaudi2_irq_map_table[event_type].reset != EVENT_RESET_TYPE_NONE) ||
				reset_required) {