Commit b188ffe876382ecc009ceb4fe033fd6ec7ba4ede

Authored by Ralf Baechle
1 parent 0964ce24d0

Fix build with SMP disabled and preemption enabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

arch/mips/kernel/gdb-stub.c
... ... @@ -637,15 +637,18 @@
637 637 * and only one can be active at a time.
638 638 */
639 639 extern spinlock_t smp_call_lock;
  640 +
640 641 void set_async_breakpoint(unsigned long *epc)
641 642 {
642 643 /* skip breaking into userland */
643 644 if ((*epc & 0x80000000) == 0)
644 645 return;
645 646  
  647 +#ifdef CONFIG_SMP
646 648 /* avoid deadlock if someone is make IPC */
647 649 if (spin_is_locked(&smp_call_lock))
648 650 return;
  651 +#endif
649 652  
650 653 async_bp.addr = *epc;
651 654 *epc = (unsigned long)async_breakpoint;