diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -691,16 +691,6 @@ return (0); } -/* - * Software interrupt handler for queued VM system processing. - */ -void -swi_vm(void *dummy) -{ - if (busdma_swi_pending != 0) - busdma_swi(); -} - /* * Tell whether this address is in some physical memory region. * Currently used by the kernel coredump code in order to avoid diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -80,7 +80,6 @@ void cpu_lock_delay(void); void cpu_reset(void); void fork_trampoline(void); -void swi_vm(void *); /* * Return contents of in-cpu fast counter as a sort of "bogo-time" diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -114,8 +114,6 @@ bus_size_t datacount; /* client data count */ }; -int busdma_swi_pending; - struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; @@ -151,6 +149,7 @@ #endif static STAILQ_HEAD(, bounce_zone) bounce_zone_list; +static void *busdma_ih; SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Busdma parameters"); @@ -1714,6 +1713,7 @@ { struct bus_dmamap *map; struct bounce_zone *bz; + bool schedule_swi; bz = dmat->bounce_zone; bpage->datavaddr = 0; @@ -1728,6 +1728,7 @@ bpage->busaddr &= ~PAGE_MASK; } + schedule_swi = false; mtx_lock(&bounce_lock); STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); bz->free_bpages++; @@ -1737,16 +1738,17 @@ STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); - busdma_swi_pending = 1; bz->total_deferred++; - swi_sched(vm_ih, 0); + schedule_swi = true; } } mtx_unlock(&bounce_lock); + if (schedule_swi) + swi_sched(busdma_ih, 0); } -void -busdma_swi(void) +static void +busdma_swi(void *dummy __unused) { bus_dma_tag_t dmat; struct bus_dmamap *map; @@ -1764,3 +1766,13 @@ } mtx_unlock(&bounce_lock); } + +static void +start_busdma_swi(void *dummy __unused) +{ + if (swi_add(NULL, "busdma", busdma_swi, NULL, SWI_BUSDMA, INTR_MPSAFE, + &busdma_ih)) + panic("died while creating busdma swi ithread"); +} +SYSINIT(start_busdma_swi, SI_SUB_SOFTINTR, SI_ORDER_ANY, start_busdma_swi, + NULL); diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -290,17 +290,6 @@ td->td_pcb->pcb_regs.sf_r5 = (register_t)arg; /* first arg */ } -/* - * Software interrupt handler for queued VM system processing. - */ -void -swi_vm(void *dummy) -{ - - if (busdma_swi_pending) - busdma_swi(); -} - void cpu_exit(struct thread *td) { diff --git a/sys/arm/include/cpu.h b/sys/arm/include/cpu.h --- a/sys/arm/include/cpu.h +++ b/sys/arm/include/cpu.h @@ -8,7 +8,6 @@ #include void cpu_halt(void); -void swi_vm(void *); #ifdef _KERNEL #include diff --git a/sys/arm/include/md_var.h b/sys/arm/include/md_var.h --- a/sys/arm/include/md_var.h +++ b/sys/arm/include/md_var.h @@ -53,8 +53,6 @@ struct dumperinfo; struct minidumpstate; -extern int busdma_swi_pending; -void busdma_swi(void); int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); extern uint32_t initial_fpscr; diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c --- a/sys/arm64/arm64/busdma_bounce.c +++ b/sys/arm64/arm64/busdma_bounce.c @@ -90,8 +90,6 @@ STAILQ_ENTRY(bounce_page) links; }; -int busdma_swi_pending; - struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; @@ -114,6 +112,7 @@ static int total_bpages; static int busdma_zonecount; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; +static void *busdma_ih; static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Busdma parameters"); @@ -1417,6 +1416,7 @@ { struct bus_dmamap *map; struct bounce_zone *bz; + bool schedule_swi; bz = dmat->bounce_zone; bpage->datavaddr = 0; @@ -1431,6 +1431,7 @@ bpage->busaddr &= ~PAGE_MASK; } + schedule_swi = false; mtx_lock(&bounce_lock); STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); bz->free_bpages++; @@ -1440,16 +1441,17 @@ STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); - busdma_swi_pending = 1; bz->total_deferred++; - swi_sched(vm_ih, 0); + schedule_swi = true; } } mtx_unlock(&bounce_lock); + if (schedule_swi) + swi_sched(busdma_ih, 0); } -void -busdma_swi(void) +static void +busdma_swi(void *dummy __unused) { bus_dma_tag_t dmat; struct bus_dmamap *map; @@ -1469,6 +1471,16 @@ mtx_unlock(&bounce_lock); } +static void +start_busdma_swi(void *dummy __unused) +{ + if (swi_add(NULL, "busdma", busdma_swi, NULL, SWI_BUSDMA, INTR_MPSAFE, + &busdma_ih)) + panic("died while creating busdma swi ithread"); +} +SYSINIT(start_busdma_swi, SI_SUB_SOFTINTR, SI_ORDER_ANY, start_busdma_swi, + NULL); + struct bus_dma_impl bus_dma_bounce_impl = { .tag_create = bounce_bus_dma_tag_create, .tag_destroy = bounce_bus_dma_tag_destroy, diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -304,11 +304,3 @@ return (EINVAL); } - -void -swi_vm(void *v) -{ - - if (busdma_swi_pending != 0) - busdma_swi(); -} diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -170,7 +170,6 @@ void identify_cache(uint64_t); void identify_cpu(u_int); void install_cpu_errata(void); -void swi_vm(void *v); /* Functions to read the sanitised view of the special registers */ void update_special_regs(u_int); diff --git a/sys/arm64/include/md_var.h b/sys/arm64/include/md_var.h --- a/sys/arm64/include/md_var.h +++ b/sys/arm64/include/md_var.h @@ -46,8 +46,6 @@ struct dumperinfo; struct minidumpstate; -extern int busdma_swi_pending; -void busdma_swi(void); int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); void generic_bs_fault(void) __asm(__STRING(generic_bs_fault)); void generic_bs_peek_1(void) __asm(__STRING(generic_bs_peek_1)); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -651,16 +651,6 @@ return (sf_buf_process_page(m, sf_buf_invalidate)); } -/* - * Software interrupt handler for queued VM system processing. - */ -void -swi_vm(void *dummy) -{ - if (busdma_swi_pending != 0) - busdma_swi(); -} - /* * Tell whether this address is in some physical memory region. * Currently used by the kernel coredump code in order to avoid diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -75,7 +75,6 @@ void cpu_lock_delay(void); void cpu_reset(void); void fork_trampoline(void); -void swi_vm(void *); /* * Return contents of in-cpu fast counter as a sort of "bogo-time" diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -90,7 +90,6 @@ struct intr_event *clk_intr_event; struct intr_event *tty_intr_event; -void *vm_ih; struct proc *intrproc; static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads"); @@ -1639,8 +1638,6 @@ if (swi_add(&clk_intr_event, "clk", NULL, NULL, SWI_CLOCK, INTR_MPSAFE, NULL)) panic("died while creating clk swi ithread"); - if (swi_add(NULL, "vm", swi_vm, NULL, SWI_VM, INTR_MPSAFE, &vm_ih)) - panic("died while creating vm swi ithread"); } SYSINIT(start_softintr, SI_SUB_SOFTINTR, SI_ORDER_FIRST, start_softintr, NULL); diff --git a/sys/mips/include/cpu.h b/sys/mips/include/cpu.h --- a/sys/mips/include/cpu.h +++ b/sys/mips/include/cpu.h @@ -84,7 +84,6 @@ extern char btext[]; extern char etext[]; -void swi_vm(void *); void cpu_halt(void); void cpu_reset(void); diff --git a/sys/mips/include/md_var.h b/sys/mips/include/md_var.h --- a/sys/mips/include/md_var.h +++ b/sys/mips/include/md_var.h @@ -78,9 +78,6 @@ void cpu_identify(void); void cpu_switch_set_userlocal(void) __asm(__STRING(cpu_switch_set_userlocal)); -extern int busdma_swi_pending; -void busdma_swi(void); - struct dumperinfo; struct minidumpstate; int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); diff --git a/sys/mips/mips/busdma_machdep.c b/sys/mips/mips/busdma_machdep.c --- a/sys/mips/mips/busdma_machdep.c +++ b/sys/mips/mips/busdma_machdep.c @@ -117,8 +117,6 @@ bus_size_t datacount; /* client data count */ }; -int busdma_swi_pending; - struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; @@ -141,6 +139,7 @@ static int total_bpages; static int busdma_zonecount; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; +static void *busdma_ih; static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); @@ -1485,6 +1484,7 @@ { struct bus_dmamap *map; struct bounce_zone *bz; + bool schedule_swi; bz = dmat->bounce_zone; bpage->datavaddr = 0; @@ -1499,6 +1499,7 @@ bpage->busaddr &= ~PAGE_MASK; } + schedule_swi = false; mtx_lock(&bounce_lock); STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); bz->free_bpages++; @@ -1508,16 +1509,17 @@ STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); - busdma_swi_pending = 1; bz->total_deferred++; - swi_sched(vm_ih, 0); + schedule_swi = true; } } mtx_unlock(&bounce_lock); + if (schedule_swi) + swi_sched(busdma_ih, 0); } -void -busdma_swi(void) +static void +busdma_swi(void *dummy __unused) { bus_dma_tag_t dmat; struct bus_dmamap *map; @@ -1535,3 +1537,13 @@ } mtx_unlock(&bounce_lock); } + +static void +start_busdma_swi(void *dummy __unused) +{ + if (swi_add(NULL, "busdma", busdma_swi, NULL, SWI_BUSDMA, INTR_MPSAFE, + &busdma_ih)) + panic("died while creating busdma swi ithread"); +} +SYSINIT(start_busdma_swi, SI_SUB_SOFTINTR, SI_ORDER_ANY, start_busdma_swi, + NULL); diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -459,17 +459,6 @@ return (EINVAL); } -/* - * Software interrupt handler for queued VM system processing. - */ -void -swi_vm(void *dummy) -{ - - if (busdma_swi_pending) - busdma_swi(); -} - int cpu_set_user_tls(struct thread *td, void *tls_base) { diff --git a/sys/powerpc/include/cpu.h b/sys/powerpc/include/cpu.h --- a/sys/powerpc/include/cpu.h +++ b/sys/powerpc/include/cpu.h @@ -146,7 +146,6 @@ void cpu_reset(void); void flush_disable_caches(void); void fork_trampoline(void); -void swi_vm(void *); int cpu_machine_check(struct thread *, struct trapframe *, int *); diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h --- a/sys/powerpc/include/md_var.h +++ b/sys/powerpc/include/md_var.h @@ -48,7 +48,6 @@ #endif extern long Maxmem; -extern int busdma_swi_pending; extern vm_offset_t kstack0; extern vm_offset_t kstack0_phys; @@ -59,7 +58,6 @@ void __syncicache(void *, int); -void busdma_swi(void); int is_physical_memory(vm_offset_t addr); int mem_valid(vm_offset_t addr, int len); diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c --- a/sys/powerpc/powerpc/busdma_machdep.c +++ b/sys/powerpc/powerpc/busdma_machdep.c @@ -95,8 +95,6 @@ STAILQ_ENTRY(bounce_page) links; }; -int busdma_swi_pending; - struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; @@ -119,6 +117,7 @@ static int total_bpages; static int busdma_zonecount; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; +static void *busdma_ih; static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Busdma parameters"); @@ -1178,6 +1177,7 @@ { struct bus_dmamap *map; struct bounce_zone *bz; + bool schedule_swi; bz = dmat->bounce_zone; bpage->datavaddr = 0; @@ -1192,6 +1192,7 @@ bpage->busaddr &= ~PAGE_MASK; } + schedule_swi = false; mtx_lock(&bounce_lock); STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); bz->free_bpages++; @@ -1201,16 +1202,17 @@ STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); - busdma_swi_pending = 1; bz->total_deferred++; - swi_sched(vm_ih, 0); + schedule_swi = true; } } mtx_unlock(&bounce_lock); + if (schedule_swi) + swi_sched(busdma_ih, 0); } -void -busdma_swi(void) +static void +busdma_swi(void *dummy __unused) { bus_dma_tag_t dmat; struct bus_dmamap *map; @@ -1230,6 +1232,16 @@ mtx_unlock(&bounce_lock); } +static void +start_busdma_swi(void *dummy __unused) +{ + if (swi_add(NULL, "busdma", busdma_swi, NULL, SWI_BUSDMA, INTR_MPSAFE, + &busdma_ih)) + panic("died while creating busdma swi ithread"); +} +SYSINIT(start_busdma_swi, SI_SUB_SOFTINTR, SI_ORDER_ANY, start_busdma_swi, + NULL); + int bus_dma_tag_set_iommu(bus_dma_tag_t tag, device_t iommu, void *cookie) { diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -208,17 +208,6 @@ } -/* - * Software interrupt handler for queued VM system processing. - */ -void -swi_vm(void *dummy) -{ - - if (busdma_swi_pending != 0) - busdma_swi(); -} - /* * Tell whether this address is in some physical memory region. * Currently used by the kernel coredump code in order to avoid diff --git a/sys/riscv/include/cpu.h b/sys/riscv/include/cpu.h --- a/sys/riscv/include/cpu.h +++ b/sys/riscv/include/cpu.h @@ -81,7 +81,6 @@ void cpu_reset(void) __dead2; void fork_trampoline(void); void identify_cpu(void); -void swi_vm(void *v); static __inline uint64_t get_cyclecount(void) diff --git a/sys/riscv/include/md_var.h b/sys/riscv/include/md_var.h --- a/sys/riscv/include/md_var.h +++ b/sys/riscv/include/md_var.h @@ -44,7 +44,6 @@ struct dumperinfo; struct minidumpstate; -void busdma_swi(void); int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); #endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/riscv/riscv/busdma_bounce.c b/sys/riscv/riscv/busdma_bounce.c --- a/sys/riscv/riscv/busdma_bounce.c +++ b/sys/riscv/riscv/busdma_bounce.c @@ -88,8 +88,6 @@ STAILQ_ENTRY(bounce_page) links; }; -int busdma_swi_pending; - struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; @@ -112,6 +110,7 @@ static int total_bpages; static int busdma_zonecount; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; +static void *busdma_ih; static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Busdma parameters"); @@ -1260,6 +1259,7 @@ { struct bus_dmamap *map; struct bounce_zone *bz; + bool schedule_swi; bz = dmat->bounce_zone; bpage->datavaddr = 0; @@ -1274,6 +1274,7 @@ bpage->busaddr &= ~PAGE_MASK; } + schedule_swi = false; mtx_lock(&bounce_lock); STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); bz->free_bpages++; @@ -1283,16 +1284,17 @@ STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); - busdma_swi_pending = 1; bz->total_deferred++; - swi_sched(vm_ih, 0); + schedule_swi = true; } } mtx_unlock(&bounce_lock); + if (schedule_swi) + swi_sched(busdma_ih, 0); } -void -busdma_swi(void) +static void +busdma_swi(void *dummy __unused) { bus_dma_tag_t dmat; struct bus_dmamap *map; @@ -1312,6 +1314,16 @@ mtx_unlock(&bounce_lock); } +static void +start_busdma_swi(void *dummy __unused) +{ + if (swi_add(NULL, "busdma", busdma_swi, NULL, SWI_BUSDMA, INTR_MPSAFE, + &busdma_ih)) + panic("died while creating busdma swi ithread"); +} +SYSINIT(start_busdma_swi, SI_SUB_SOFTINTR, SI_ORDER_ANY, start_busdma_swi, + NULL); + struct bus_dma_impl bus_dma_bounce_impl = { .tag_create = bounce_bus_dma_tag_create, .tag_destroy = bounce_bus_dma_tag_destroy, diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -269,10 +269,3 @@ return (EINVAL); } - -void -swi_vm(void *v) -{ - - /* Nothing to do here - busdma bounce buffers are not implemented. */ -} diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h --- a/sys/sys/interrupt.h +++ b/sys/sys/interrupt.h @@ -144,7 +144,7 @@ #define SWI_TTY 0 #define SWI_NET 1 #define SWI_CAMBIO 2 -#define SWI_VM 3 +#define SWI_BUSDMA 3 #define SWI_CLOCK 4 #define SWI_TQ_FAST 5 #define SWI_TQ 6 diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -38,7 +38,6 @@ extern long Maxmem; extern u_int basemem; -extern int busdma_swi_pending; extern u_int cpu_exthigh; extern u_int cpu_feature; extern u_int cpu_feature2; @@ -115,7 +114,6 @@ bool acpi_get_fadt_bootflags(uint16_t *flagsp); void *alloc_fpusave(int flags); -void busdma_swi(void); u_int cpu_auxmsr(void); vm_paddr_t cpu_getmaxphyaddr(void); bool cpu_mwait_usable(void); diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -90,8 +90,6 @@ STAILQ_ENTRY(bounce_page) links; }; -int busdma_swi_pending; - struct bounce_zone { STAILQ_ENTRY(bounce_zone) links; STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; @@ -115,6 +113,7 @@ static int total_bpages; static int busdma_zonecount; static STAILQ_HEAD(, bounce_zone) bounce_zone_list; +static void *busdma_ih; static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Busdma parameters"); @@ -1311,6 +1310,7 @@ { struct bus_dmamap *map; struct bounce_zone *bz; + bool schedule_swi; bz = dmat->bounce_zone; bpage->datavaddr = 0; @@ -1325,6 +1325,7 @@ bpage->busaddr &= ~PAGE_MASK; } + schedule_swi = false; mtx_lock(&bounce_lock); STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); bz->free_bpages++; @@ -1334,16 +1335,17 @@ STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); - busdma_swi_pending = 1; bz->total_deferred++; - swi_sched(vm_ih, 0); + schedule_swi = true; } } mtx_unlock(&bounce_lock); + if (schedule_swi) + swi_sched(busdma_ih, 0); } -void -busdma_swi(void) +static void +busdma_swi(void *dummy __unused) { bus_dma_tag_t dmat; struct bus_dmamap *map; @@ -1363,6 +1365,16 @@ mtx_unlock(&bounce_lock); } +static void +start_busdma_swi(void *dummy __unused) +{ + if (swi_add(NULL, "busdma", busdma_swi, NULL, SWI_BUSDMA, INTR_MPSAFE, + &busdma_ih)) + panic("died while creating busdma swi ithread"); +} +SYSINIT(start_busdma_swi, SI_SUB_SOFTINTR, SI_ORDER_ANY, start_busdma_swi, + NULL); + struct bus_dma_impl bus_dma_bounce_impl = { .tag_create = bounce_bus_dma_tag_create, .tag_destroy = bounce_bus_dma_tag_destroy,