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

Commit 2f8b4700 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

mhi: core: Disable preemption while processing data events



If data processing of an event is scheduled out because core
is busy handling multiple irqs, this can starves the processing
of MHI M0 state change event on another core. Fix this issue by
disabling irq on the core processing data events.

Change-Id: I4d784d2c343d4a9c50741f3e72df4c373993ae79
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent a1702ceb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1553,13 +1553,14 @@ void mhi_ev_task(unsigned long data)
{
	struct mhi_event *mhi_event = (struct mhi_event *)data;
	struct mhi_controller *mhi_cntrl = mhi_event->mhi_cntrl;
	unsigned long flags;

	MHI_VERB("Enter for ev_index:%d\n", mhi_event->er_index);

	/* process all pending events */
	spin_lock_bh(&mhi_event->lock);
	spin_lock_irqsave(&mhi_event->lock, flags);
	mhi_event->process_event(mhi_cntrl, mhi_event, U32_MAX);
	spin_unlock_bh(&mhi_event->lock);
	spin_unlock_irqrestore(&mhi_event->lock, flags);
}

void mhi_ctrl_ev_task(unsigned long data)