lkml.org 
[lkml]   [2012]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectIn function cpu_stop_cpu_callback, BUG_ON(stopper->thread || stopper->enabled || !list_empty(&stopper->works)) is triggered while restarting sometimes.
From
In function cpu_stop_cpu_callback, BUG_ON(stopper->thread ||
stopper->enabled || !list_empty(&stopper->works)) is triggered
sometimes.
/* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
..................................
switch (action & ~CPU_TASKS_FROZEN) {
case CPU_UP_PREPARE:
BUG_ON(stopper->thread || stopper->enabled ||
!list_empty(&stopper->works));
.................................
}

Before actually hardware restarting, machine_restart(cmd) will be called.

void machine_restart(char *cmd)
{
machine_shutdown();
arm_pm_restart(reboot_mode, cmd);
......................
}

after machine_shutdown(), all other cpus are set offline only by
settting the cpumask. if userspace software which regulators cpu are
running before arm_pm_restart(), it may set set another cpu online and
cpu_up(cpu) is called. At this situation, BUG_ON(stopper->thread ||
stopper->enabled || !list_empty(&stopper->works)) is triggered in
cpu_stop_cpu_callback.

Is it needed to preempt disable before calling machine_shutdown()?


\
 
 \ /
  Last update: 2012-08-02 20:01    [W:0.026 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site