Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34f078e3 authored by Bojun Pan's avatar Bojun Pan Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa4: fix the unclock gsi IPA register access



The while loop in gsi_handle_irq will cause an extra register
read after handle last interrupt. This read can be the unclocked
read. The fix is to take out the while loop.

Change-Id: If4b3bb127ee66648d24b8ca7c16bd6fec42d9fcc
Signed-off-by: default avatarBojun Pan <bojunp@codeaurora.org>
parent 3f9631cc
Loading
Loading
Loading
Loading
+21 −35
Original line number Diff line number Diff line
@@ -811,22 +811,19 @@ static void gsi_handle_general(int ee)
			GSI_EE_n_CNTXT_GSI_IRQ_CLR_OFFS(ee));
}

#define GSI_ISR_MAX_ITER 50

static void gsi_handle_irq(void)
{
	uint32_t type;
	int ee = gsi_ctx->per.ee;
	unsigned long cnt = 0;

	while (1) {
	if (!gsi_ctx->per.clk_status_cb())
			break;
		return;

	type = gsi_readl(gsi_ctx->base +
		GSI_EE_n_CNTXT_TYPE_IRQ_OFFS(ee));

	if (!type)
			break;
		return;

	GSIDBG_LOW("type 0x%x\n", type);

@@ -850,17 +847,6 @@ static void gsi_handle_irq(void)

	if (type & GSI_EE_n_CNTXT_TYPE_IRQ_GENERAL_BMSK)
		gsi_handle_general(ee);

		if (unlikely(++cnt > GSI_ISR_MAX_ITER)) {
			/*
			 * Max number of spurious interrupts from hardware.
			 * Unexpected hardware state.
			 */
			GSIERR("Too many spurious interrupt from GSI HW\n");
			GSI_ASSERT();
		}

	}
}

static irqreturn_t gsi_isr(int irq, void *ctxt)