Print this page
OS-2366 ddi_periodic_add(9F) is entirely rubbish
@@ -2243,18 +2243,22 @@
(void) add_avsoftintr((void *)&softlevel1_hdl, 1, softlevel1,
"softlevel1", NULL, NULL); /* XXX to be moved later */
/*
- * Register these software interrupts for ddi timer.
+ * Register software interrupt handlers for ddi_periodic_add(9F).
* Software interrupts up to the level 10 are supported.
*/
for (i = DDI_IPL_1; i <= DDI_IPL_10; i++) {
- char name[sizeof ("timer_softintr") + 2];
- (void) sprintf(name, "timer_softintr%02d", i);
+ /*
+ * The constant string "ddi_periodic", below, is only used to
+ * print debugging information. Generating a dynamic string
+ * for each soft level is a waste of kernel memory.
+ */
(void) add_avsoftintr((void *)&softlevel_hdl[i-1], i,
- (avfunc)timer_softintr, name, (caddr_t)(uintptr_t)i, NULL);
+ (avfunc)ddi_periodic_softintr, "ddi_periodic",
+ (caddr_t)(uintptr_t)i, NULL);
}
#if !defined(__xpv)
if (modload("drv", "amd_iommu") < 0) {
PRM_POINT("No AMD IOMMU present\n");