mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-17 11:25:04 +08:00
Fix build with SMP disabled and preemption enabled.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
0964ce24d0
commit
b188ffe876
@ -637,15 +637,18 @@ static struct gdb_bp_save async_bp;
|
|||||||
* and only one can be active at a time.
|
* and only one can be active at a time.
|
||||||
*/
|
*/
|
||||||
extern spinlock_t smp_call_lock;
|
extern spinlock_t smp_call_lock;
|
||||||
|
|
||||||
void set_async_breakpoint(unsigned long *epc)
|
void set_async_breakpoint(unsigned long *epc)
|
||||||
{
|
{
|
||||||
/* skip breaking into userland */
|
/* skip breaking into userland */
|
||||||
if ((*epc & 0x80000000) == 0)
|
if ((*epc & 0x80000000) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
/* avoid deadlock if someone is make IPC */
|
/* avoid deadlock if someone is make IPC */
|
||||||
if (spin_is_locked(&smp_call_lock))
|
if (spin_is_locked(&smp_call_lock))
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
async_bp.addr = *epc;
|
async_bp.addr = *epc;
|
||||||
*epc = (unsigned long)async_breakpoint;
|
*epc = (unsigned long)async_breakpoint;
|
||||||
|
Loading…
Reference in New Issue
Block a user