summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-03-25 22:44:58 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-03-25 22:44:58 +0000
commitf477292ed82c5aeb90ff7c13194259da9f8cc94c (patch)
tree89daeb8f4b463880817f6392395b90ec355c6d5a /sys/dev/acpi
parent7b68292916de8c4eca8a13c6aa756f093a881c90 (diff)
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/acpi')
0 files changed, 0 insertions, 0 deletions