Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143960
b: refs/heads/master
c: cd0aca2
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Apr 22, 2009
1 parent 76f3084 commit 8624ab8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25636e282fe95508cae96bb27f86407aef935817
refs/heads/master: cd0aca2d550f238d80ba58e7dcade4ea3d0a3aa7
20 changes: 11 additions & 9 deletions trunk/block/blk-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,26 +156,28 @@ EXPORT_SYMBOL(blk_queue_make_request);

/**
* blk_queue_bounce_limit - set bounce buffer limit for queue
* @q: the request queue for the device
* @dma_addr: bus address limit
* @q: the request queue for the device
* @dma_mask: the maximum address the device can handle
*
* Description:
* Different hardware can have different requirements as to what pages
* it can do I/O directly to. A low level driver can call
* blk_queue_bounce_limit to have lower memory pages allocated as bounce
* buffers for doing I/O to pages residing above @dma_addr.
* buffers for doing I/O to pages residing above @dma_mask.
**/
void blk_queue_bounce_limit(struct request_queue *q, u64 dma_addr)
void blk_queue_bounce_limit(struct request_queue *q, u64 dma_mask)
{
unsigned long b_pfn = dma_addr >> PAGE_SHIFT;
unsigned long b_pfn = dma_mask >> PAGE_SHIFT;
int dma = 0;

q->bounce_gfp = GFP_NOIO;
#if BITS_PER_LONG == 64
/* Assume anything <= 4GB can be handled by IOMMU.
Actually some IOMMUs can handle everything, but I don't
know of a way to test this here. */
if (b_pfn < (min_t(u64, 0x100000000UL, BLK_BOUNCE_HIGH) >> PAGE_SHIFT))
/*
* Assume anything <= 4GB can be handled by IOMMU. Actually
* some IOMMUs can handle everything, but I don't know of a
* way to test this here.
*/
if (b_pfn < (min_t(u64, 0xffffffffUL, BLK_BOUNCE_HIGH) >> PAGE_SHIFT))
dma = 1;
q->bounce_pfn = max_low_pfn;
#else
Expand Down

0 comments on commit 8624ab8

Please sign in to comment.