diff options
author | Andi Kleen <ak@suse.de> | 2006-06-21 08:48:09 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-06-23 11:10:39 -0400 |
commit | 8269730b389d4793348d521140f9c76fb1828249 (patch) | |
tree | c10c9441a16265f698dd4a38014c9d3026ee07c0 /block | |
parent | dd67d051529387f6e44d22d1d5540ef281965fdd (diff) |
[BLOCK] Fix bounce limit address check
Do a safer check for when to enable DMA. Currently we enable ISA DMA
for cases that do not need it, resulting in OOM conditions when ZONE_DMA
runs out of space.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block')
-rw-r--r-- | block/ll_rw_blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 2270bb451385..0603ab2f3692 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -638,7 +638,7 @@ void blk_queue_bounce_limit(request_queue_t *q, u64 dma_addr) | |||
638 | /* Assume anything <= 4GB can be handled by IOMMU. | 638 | /* Assume anything <= 4GB can be handled by IOMMU. |
639 | Actually some IOMMUs can handle everything, but I don't | 639 | Actually some IOMMUs can handle everything, but I don't |
640 | know of a way to test this here. */ | 640 | know of a way to test this here. */ |
641 | if (bounce_pfn < (0xffffffff>>PAGE_SHIFT)) | 641 | if (bounce_pfn < (min_t(u64,0xffffffff,BLK_BOUNCE_HIGH) >> PAGE_SHIFT)) |
642 | dma = 1; | 642 | dma = 1; |
643 | q->bounce_pfn = max_low_pfn; | 643 | q->bounce_pfn = max_low_pfn; |
644 | #else | 644 | #else |