We do not need to grab the kernel lock for clock interrupts on luna88k,
authoraoyama <aoyama@openbsd.org>
Tue, 23 Dec 2014 10:59:29 +0000 (10:59 +0000)
committeraoyama <aoyama@openbsd.org>
Tue, 23 Dec 2014 10:59:29 +0000 (10:59 +0000)
as same as aviion.

suggested and ok miod@

sys/arch/luna88k/luna88k/machdep.c

index 3d6c42c..1540174 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.114 2014/12/10 15:29:53 mikeb Exp $     */
+/*     $OpenBSD: machdep.c,v 1.115 2014/12/23 10:59:29 aoyama Exp $    */
 /*
  * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
  * Copyright (c) 1996 Nivas Madhur
@@ -832,10 +832,6 @@ luna88k_ext_int(struct trapframe *eframe)
                goto out;
 #endif
 
-#ifdef MULTIPROCESSOR
-       if (old_spl < IPL_SCHED)
-               __mp_lock(&kernel_lock);
-#endif
        /*
         * Service the highest interrupt, in order.
         */
@@ -857,9 +853,13 @@ luna88k_ext_int(struct trapframe *eframe)
                case 3:
 #ifdef MULTIPROCESSOR
                        if (CPU_IS_PRIMARY(ci)) {
+                               if (old_spl < IPL_SCHED)
+                                       __mp_lock(&kernel_lock);
 #endif
                                isrdispatch_autovec(cur_int_level);
 #ifdef MULTIPROCESSOR
+                               if (old_spl < IPL_SCHED)
+                                       __mp_unlock(&kernel_lock);
                        }
 #endif
                        break;
@@ -873,11 +873,6 @@ luna88k_ext_int(struct trapframe *eframe)
                cur_int_level = cur_isr >> 29;
        } while (cur_int_level != 0);
 
-#ifdef MULTIPROCESSOR
-       if (old_spl < IPL_SCHED)
-               __mp_unlock(&kernel_lock);
-#endif
-
 out:
        /*
         * process any remaining data access exceptions before