forked from luck/tmp_suning_uos_patched
cf9bfe55f2
The current implementation of synchronise_count_{master,slave} blocks
slave CPUs in early boot until all of them come up. This no longer
works because blocking a CPU with interrupts off after notifying the
CPU to be online causes problems with the current kernel.
Specifically, after the workqueue changes
(commit a08489c569
"Pull workqueue changes from Tejun Heo")
the CPU_ONLINE notification callback workqueue_cpu_up_callback()
will hang on wait_for_completion(&idle_rebind.done), if the slave
CPUs are blocked for synchronize_count_slave().
The changes are to update synchronize_count_{master,slave}() to handle
one CPU at a time and to call synchronise_count_master() in __cpu_up()
so that the CPU_ONLINE notification goes out only after the COP0 COUNT
register is synchronized.
[ralf@linux-mips.org: This matter only to those few platforms which are
using the cp0 counter as their clocksource which are XLP, XLR and MIPS'
CMP solution.]
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4216/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
31 lines
604 B
C
31 lines
604 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2008 by Ralf Baechle (ralf@linux-mips.org)
|
|
*/
|
|
#ifndef __ASM_R4K_TYPES_H
|
|
#define __ASM_R4K_TYPES_H
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
#ifdef CONFIG_SYNC_R4K
|
|
|
|
extern void synchronise_count_master(int cpu);
|
|
extern void synchronise_count_slave(int cpu);
|
|
|
|
#else
|
|
|
|
static inline void synchronise_count_master(int cpu)
|
|
{
|
|
}
|
|
|
|
static inline void synchronise_count_slave(int cpu)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* __ASM_R4K_TYPES_H */
|