[PATCH] [4/7] Add blk_q_mask

From: Andi Kleen
Date: Fri Mar 07 2008 - 04:25:24 EST



Converts the queue bounce_pfn to a DMA mask suitable for the mask allocator

Signed-off-by: Andi Kleen <ak@xxxxxxx>

---
include/linux/blkdev.h | 5 +++++
1 file changed, 5 insertions(+)

Index: linux/include/linux/blkdev.h
===================================================================
--- linux.orig/include/linux/blkdev.h
+++ linux/include/linux/blkdev.h
@@ -814,6 +814,11 @@ static inline unsigned int block_size(st
return bdev->bd_block_size;
}

+static inline u64 blk_q_mask(struct request_queue *q)
+{
+ return ~(-1LL << (PAGE_SHIFT + fls64(q->bounce_pfn)));
+}
+
typedef struct {struct page *v;} Sector;

unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/