diff options
| author | Jens Axboe <axboe@suse.de> | 2004-11-14 02:27:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-14 02:27:09 -0800 |
| commit | df0d9094a3a94de6fcc63cbb6bc4a6d370dbdb11 (patch) | |
| tree | f558c6078c080872336462c7e4d5c6be5ced1d69 /include/linux/bio.h | |
| parent | 3c71442b92fea9833331a01b6c4c290f1fb67426 (diff) | |
[PATCH] allow arch override of BIOVEC_PHYS_MERGEABLE
This patch is from the Xen crew - it allows override of deciding whether
two given pages can be considered physically contigous or not. This is
similar to how we handle iommu and virtual merging.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/bio.h')
| -rw-r--r-- | include/linux/bio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 2585402c2b8b..cd8d47bf34b4 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -188,8 +188,15 @@ struct bio { #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) + +/* + * allow arch override, for eg virtualized architectures (put in asm/io.h) + */ +#ifndef BIOVEC_PHYS_MERGEABLE #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) +#endif + #define BIOVEC_VIRT_MERGEABLE(vec1, vec2) \ ((((bvec_to_phys((vec1)) + (vec1)->bv_len) | bvec_to_phys((vec2))) & (BIO_VMERGE_BOUNDARY - 1)) == 0) #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ |
