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: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
parent
1462003eed
commit
44fcbe837a
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user