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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/os/startup.c
          +++ new/usr/src/uts/i86pc/os/startup.c
↓ open down ↓ 110 lines elided ↑ open up ↑
 111  111  #include <sys/cpuvar.h>
 112  112  #include <sys/segments.h>
 113  113  #include <sys/clconf.h>
 114  114  #include <sys/kobj.h>
 115  115  #include <sys/kobj_lex.h>
 116  116  #include <sys/cpc_impl.h>
 117  117  #include <sys/cpu_module.h>
 118  118  #include <sys/smbios.h>
 119  119  #include <sys/debug_info.h>
 120  120  #include <sys/bootinfo.h>
 121      -#include <sys/ddi_timer.h>
      121 +#include <sys/ddi_periodic.h>
 122  122  #include <sys/systeminfo.h>
 123  123  #include <sys/multiboot.h>
 124  124  
 125  125  #ifdef  __xpv
 126  126  
 127  127  #include <sys/hypervisor.h>
 128  128  #include <sys/xen_mmu.h>
 129  129  #include <sys/evtchn_impl.h>
 130  130  #include <sys/gnttab.h>
 131  131  #include <sys/xpv_panic.h>
↓ open down ↓ 2110 lines elided ↑ open up ↑
2242 2242  #endif
2243 2243  
2244 2244          (void) add_avsoftintr((void *)&softlevel1_hdl, 1, softlevel1,
2245 2245              "softlevel1", NULL, NULL); /* XXX to be moved later */
2246 2246  
2247 2247          /*
2248 2248           * Register software interrupt handlers for ddi_periodic_add(9F).
2249 2249           * Software interrupts up to the level 10 are supported.
2250 2250           */
2251 2251          for (i = DDI_IPL_1; i <= DDI_IPL_10; i++) {
2252      -                /*
2253      -                 * The constant string "ddi_periodic", below, is only used to
2254      -                 * print debugging information.  Generating a dynamic string
2255      -                 * for each soft level is a waste of kernel memory.
2256      -                 */
2257 2252                  (void) add_avsoftintr((void *)&softlevel_hdl[i-1], i,
2258 2253                      (avfunc)ddi_periodic_softintr, "ddi_periodic",
2259 2254                      (caddr_t)(uintptr_t)i, NULL);
2260 2255          }
2261 2256  
2262 2257  #if !defined(__xpv)
2263 2258          if (modload("drv", "amd_iommu") < 0) {
2264 2259                  PRM_POINT("No AMD IOMMU present\n");
2265 2260          } else if (ddi_hold_installed_driver(ddi_name_to_major(
2266 2261              "amd_iommu")) == NULL) {
↓ open down ↓ 974 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX