summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid_raid0.c
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2010-03-25 22:44:57 +0000
committeroga <oga@openbsd.org>2010-03-25 22:44:57 +0000
commit8e6426bbb534ec424f4f089bb437323623f7864e (patch)
tree1100a86d99a960e049860c8900303d82ff887d43 /sys/dev/softraid_raid0.c
parentThe "\\" escape sequence is low-level roff, don't use it in mdoc(7); (diff)
downloadwireguard-openbsd-8e6426bbb534ec424f4f089bb437323623f7864e.tar.xz
wireguard-openbsd-8e6426bbb534ec424f4f089bb437323623f7864e.zip
Make the i386 and amd64 bus_dma functions for isa less stupid:
1) when you have a wrapper function in a dmatag that just calls the _bus_dmamem original, you don't need it, just put the original function in the tag 2) don't trunc_page the avail_end/ISA_BOUNCE_THRESHOLD stuff (see icb for a discussion of why this is wrong about 00:00 gmt). make i386 and amd64 both do this the same (the amd64 way is cleaner and makes the third diff actually possible without a lot of pain). just do dmamem_alloc_range(0, threshold) and if that fails do a alloc_range(0, -1) and assume we'll bounce to pick up the pieces. Also using avail_end for alloc_range is not nice (miod has been trying to avoid these abuses iirc), so just use (paddr_t)-1, which is equivalent since you want "any" memory. 3) now this is the funny one. consider point 2. then considering why using the same bloody function to allocate your bouncebuffer is just f'ing wrong. instead allocate with alloc_range(0, threshold) to make sure that our bouncebuffer is actually uner 16megs. ok deraadt@, kettenis@. Tested by several people.
Diffstat (limited to 'sys/dev/softraid_raid0.c')
0 files changed, 0 insertions, 0 deletions