Print this page
OS-2366 ddi_periodic_add(9F) is entirely rubbish

@@ -20,10 +20,13 @@
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
+ */
 
 #include <sys/sysmacros.h>
 #include <sys/stack.h>
 #include <sys/cpuvar.h>
 #include <sys/ivintr.h>

@@ -41,11 +44,11 @@
 #include <sys/x_call.h>
 #include <vm/seg_kp.h>
 #include <sys/debug.h>
 #include <sys/cyclic.h>
 #include <sys/kdi_impl.h>
-#include <sys/ddi_timer.h>
+#include <sys/ddi_periodic.h>
 
 #include <sys/cpu_sgnblk_defs.h>
 
 /* Global locks which protect the interrupt distribution lists */
 static kmutex_t intr_dist_lock;

@@ -117,11 +120,12 @@
         /*
          * Register these software interrupts for ddi timer.
          * Software interrupts up to the level 10 are supported.
          */
         for (i = DDI_IPL_1; i <= DDI_IPL_10; i++) {
-                siron_inum[i-1] = add_softintr(i, (softintrfunc)timer_softintr,
+                siron_inum[i - 1] = add_softintr(i,
+                    (softintrfunc)ddi_periodic_softintr,
                     (caddr_t)(uintptr_t)(i), SOFTINT_ST);
         }
 
         siron1_inum = add_softintr(PIL_1, softlevel1, 0, SOFTINT_ST);
         poke_cpu_inum = add_softintr(PIL_13, poke_cpu_intr, 0, SOFTINT_MT);