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

Commit 44fcbe83 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

hvc_dcc: Disable preemption when cheking for smp_processor_id



smp_processor_id() complains if called from a preemptible
context. Hence, disable the preemption just before calling
this and enable it back later.

Change-Id: I6721796d11186eb15021b37d5ea8250afa0edda0
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent 1462003e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -72,12 +72,18 @@ static bool hvc_dcc_check(void)

	static bool dcc_core0_available;

	preempt_disable();

	/*
	 * If we're not on core 0, but we previously confirmed that DCC is
	 * active, then just return true.
	 */
	if (smp_processor_id() && dcc_core0_available)
	if (smp_processor_id() && dcc_core0_available) {
		preempt_enable();
		return true;
	}

	preempt_enable();

	/* Write a test character to check if it is handled */
	__dcc_putchar('\n');