msm: move printk out of spin lock low_water_lock
cpu3 stuck in printk more time in spin lock low_water_lock cause cpu0 get spin lock fail and system crashed. CRs-Fixed: 521570 Change-Id: I75356a4b4171ae2888ce6cce792f569b5ca8cdcf Signed-off-by: Tingting Yang <tingting@codeaurora.org>
This commit is contained in:
parent
14ca8f3c0b
commit
b6b8ce11c9
|
@ -685,6 +685,7 @@ static void check_stack_usage(void)
|
|||
static DEFINE_SPINLOCK(low_water_lock);
|
||||
static int lowest_to_date = THREAD_SIZE;
|
||||
unsigned long free;
|
||||
int islower = false;
|
||||
|
||||
free = stack_not_used(current);
|
||||
|
||||
|
@ -693,12 +694,16 @@ static void check_stack_usage(void)
|
|||
|
||||
spin_lock(&low_water_lock);
|
||||
if (free < lowest_to_date) {
|
||||
lowest_to_date = free;
|
||||
islower = true;
|
||||
}
|
||||
spin_unlock(&low_water_lock);
|
||||
|
||||
if (islower) {
|
||||
printk(KERN_WARNING "%s (%d) used greatest stack depth: "
|
||||
"%lu bytes left\n",
|
||||
current->comm, task_pid_nr(current), free);
|
||||
lowest_to_date = free;
|
||||
}
|
||||
spin_unlock(&low_water_lock);
|
||||
}
|
||||
#else
|
||||
static inline void check_stack_usage(void) {}
|
||||
|
|
Loading…
Reference in New Issue