Commit f92131c3 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Jens Axboe

bio: define __BIOVEC_PHYS_MERGEABLE

Define __BIOVEC_PHYS_MERGEABLE as the default implementation of
BIOVEC_PHYS_MERGEABLE, so that its available for reuse within an
arch-specific definition of BIOVEC_PHYS_MERGEABLE.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 43381785
...@@ -236,12 +236,16 @@ static inline void *bio_data(struct bio *bio) ...@@ -236,12 +236,16 @@ static inline void *bio_data(struct bio *bio)
#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
/* Default implementation of BIOVEC_PHYS_MERGEABLE */
#define __BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
/* /*
* allow arch override, for eg virtualized architectures (put in asm/io.h) * allow arch override, for eg virtualized architectures (put in asm/io.h)
*/ */
#ifndef BIOVEC_PHYS_MERGEABLE #ifndef BIOVEC_PHYS_MERGEABLE
#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) __BIOVEC_PHYS_MERGEABLE(vec1, vec2)
#endif #endif
#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment