diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-12-28 21:51:25 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2021-12-28 21:51:25 +0000 |
commit | 254e4e5b77d7788c46333ae35d5e9f347e22c746 (patch) | |
tree | 22aca772b8ff6da98ea9bcc01ad3dcac398dab7d /sys/amd64/include/cpu.h | |
parent | 2262f7dcf476b48bdf3dfc5d460cc5a5e14e23cd (diff) | |
download | src-254e4e5b77d7788c46333ae35d5e9f347e22c746.tar.gz src-254e4e5b77d7788c46333ae35d5e9f347e22c746.zip |
Simplify swi for bus_dma.
When a DMA request using bounce pages completes, a swi is triggered to
schedule pending DMA requests using the just-freed bounce pages. For
a long time this bus_dma swi has been tied to a "virtual memory" swi
(swi_vm). However, all of the swi_vm implementations are the same and
consist of checking a flag (busdma_swi_pending) which is always true
and if set calling busdma_swi. I suspect this dates back to the
pre-SMPng days and that the intention was for swi_vm to serve as a
mux. However, in the current scheme there's no need for the mux.
Instead, remove swi_vm and vm_ih. Each bus_dma implementation that
uses bounce pages is responsible for creating its own swi (busdma_ih)
which it now schedules directly. This swi invokes busdma_swi directly
removing the need for busdma_swi_pending.
One consequence is that the swi now works on RISC-V which had previously
failed to invoke busdma_swi from swi_vm.
Reviewed by: imp, kib
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33447
Diffstat (limited to 'sys/amd64/include/cpu.h')
-rw-r--r-- | sys/amd64/include/cpu.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 1b8a552d3e7c..f7732435fc39 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -80,7 +80,6 @@ void cpu_halt(void); 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" |