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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4/os/intr.c
          +++ new/usr/src/uts/sun4/os/intr.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
       25 +/*
       26 + * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
       27 + */
  25   28  
  26   29  #include <sys/sysmacros.h>
  27   30  #include <sys/stack.h>
  28   31  #include <sys/cpuvar.h>
  29   32  #include <sys/ivintr.h>
  30   33  #include <sys/intreg.h>
  31   34  #include <sys/membar.h>
  32   35  #include <sys/kmem.h>
  33   36  #include <sys/intr.h>
  34   37  #include <sys/sunddi.h>
↓ open down ↓ 77 lines elided ↑ open up ↑
 112  115          extern uint_t softlevel1();
 113  116  
 114  117          init_ivintr();
 115  118          REGISTER_BBUS_INTR();
 116  119  
 117  120          /*
 118  121           * Register these software interrupts for ddi timer.
 119  122           * Software interrupts up to the level 10 are supported.
 120  123           */
 121  124          for (i = DDI_IPL_1; i <= DDI_IPL_10; i++) {
 122      -                siron_inum[i-1] = add_softintr(i, (softintrfunc)timer_softintr,
      125 +                siron_inum[i - 1] = add_softintr(i,
      126 +                    (softintrfunc)ddi_periodic_softintr,
 123  127                      (caddr_t)(uintptr_t)(i), SOFTINT_ST);
 124  128          }
 125  129  
 126  130          siron1_inum = add_softintr(PIL_1, softlevel1, 0, SOFTINT_ST);
 127  131          poke_cpu_inum = add_softintr(PIL_13, poke_cpu_intr, 0, SOFTINT_MT);
 128  132          siron_poke_cpu_inum = add_softintr(PIL_13,
 129  133              siron_poke_cpu_intr, 0, SOFTINT_MT);
 130  134          cp->cpu_m.poke_cpu_outstanding = B_FALSE;
 131  135  
 132  136          mutex_init(&intr_dist_lock, NULL, MUTEX_DEFAULT, NULL);
↓ open down ↓ 737 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX