[PATCH] [2/21] SCSI-ISA-DMA: Add blk_q_mask | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
[Merge note: this patch will be in a SCSI patchkit and in the core
mask allocator patchkit. They are equivalent. If one of them
is merged first simply drop it in the other]
Converts the queue bounce_pfn to a DMA mask suitable for the mask allocator
Signed-off-by: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Andi Kleen <andi@xxxxxxxxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
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
@@ -890,6 +890,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-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Kernel Newbies] [Linux SCSI Target Infrastructure] [Share Photos] [IDE] [Security] [Git] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Linux ATA RAID] [Samba] [Video 4 Linux] [Device Mapper] [Linux Resources]
![]() |
![]() |