diff options
| author | Christoph Hellwig <hch@lst.de> | 2018-09-25 16:30:08 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-09-26 10:45:11 -0400 |
| commit | c39ae60dfbda66922f644193b91850abcd4d588c (patch) | |
| tree | 2a3eafebe82a25988083d79cdd74ca2b0fa696db | |
| parent | 20e3267601f95ff62d7a3116a17a680e9f5cbcc9 (diff) | |
block: remove ARCH_BIOVEC_PHYS_MERGEABLE
Take the Xen check into the core code instead of delegating it to
the architectures.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | arch/arm/include/asm/io.h | 3 | ||||
| -rw-r--r-- | arch/arm64/include/asm/io.h | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/io.h | 3 | ||||
| -rw-r--r-- | block/blk.h | 7 | ||||
| -rw-r--r-- | drivers/xen/biomerge.c | 2 |
5 files changed, 3 insertions, 15 deletions
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index cf5cd88e7289..6ae7674da0d6 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
| @@ -459,9 +459,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); | |||
| 459 | 459 | ||
| 460 | #include <asm-generic/io.h> | 460 | #include <asm-generic/io.h> |
| 461 | 461 | ||
| 462 | #define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | ||
| 463 | (!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2)) | ||
| 464 | |||
| 465 | #ifdef CONFIG_MMU | 462 | #ifdef CONFIG_MMU |
| 466 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | 463 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE |
| 467 | extern int valid_phys_addr_range(phys_addr_t addr, size_t size); | 464 | extern int valid_phys_addr_range(phys_addr_t addr, size_t size); |
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 06119ee511cd..18f6ae6a43f1 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h | |||
| @@ -205,8 +205,5 @@ extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); | |||
| 205 | 205 | ||
| 206 | extern int devmem_is_allowed(unsigned long pfn); | 206 | extern int devmem_is_allowed(unsigned long pfn); |
| 207 | 207 | ||
| 208 | #define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | ||
| 209 | (!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2)) | ||
| 210 | |||
| 211 | #endif /* __KERNEL__ */ | 208 | #endif /* __KERNEL__ */ |
| 212 | #endif /* __ASM_IO_H */ | 209 | #endif /* __ASM_IO_H */ |
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index abdb501a551d..232d8e9ee8a0 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
| @@ -371,9 +371,6 @@ extern bool is_early_ioremap_ptep(pte_t *ptep); | |||
| 371 | 371 | ||
| 372 | #ifdef CONFIG_XEN | 372 | #ifdef CONFIG_XEN |
| 373 | #include <xen/xen.h> | 373 | #include <xen/xen.h> |
| 374 | |||
| 375 | #define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | ||
| 376 | (!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2)) | ||
| 377 | #endif /* CONFIG_XEN */ | 374 | #endif /* CONFIG_XEN */ |
| 378 | 375 | ||
| 379 | #define IO_SPACE_LIMIT 0xffff | 376 | #define IO_SPACE_LIMIT 0xffff |
diff --git a/block/blk.h b/block/blk.h index 50f74ce60453..58c030f727e9 100644 --- a/block/blk.h +++ b/block/blk.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <linux/idr.h> | 5 | #include <linux/idr.h> |
| 6 | #include <linux/blk-mq.h> | 6 | #include <linux/blk-mq.h> |
| 7 | #include <xen/xen.h> | ||
| 7 | #include "blk-mq.h" | 8 | #include "blk-mq.h" |
| 8 | 9 | ||
| 9 | /* Amount of time in which a process may batch requests */ | 10 | /* Amount of time in which a process may batch requests */ |
| @@ -149,10 +150,6 @@ static inline void blk_queue_enter_live(struct request_queue *q) | |||
| 149 | percpu_ref_get(&q->q_usage_counter); | 150 | percpu_ref_get(&q->q_usage_counter); |
| 150 | } | 151 | } |
| 151 | 152 | ||
| 152 | #ifndef ARCH_BIOVEC_PHYS_MERGEABLE | ||
| 153 | #define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) true | ||
| 154 | #endif | ||
| 155 | |||
| 156 | static inline bool biovec_phys_mergeable(struct request_queue *q, | 153 | static inline bool biovec_phys_mergeable(struct request_queue *q, |
| 157 | struct bio_vec *vec1, struct bio_vec *vec2) | 154 | struct bio_vec *vec1, struct bio_vec *vec2) |
| 158 | { | 155 | { |
| @@ -162,7 +159,7 @@ static inline bool biovec_phys_mergeable(struct request_queue *q, | |||
| 162 | 159 | ||
| 163 | if (addr1 + vec1->bv_len != addr2) | 160 | if (addr1 + vec1->bv_len != addr2) |
| 164 | return false; | 161 | return false; |
| 165 | if (!ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2)) | 162 | if (xen_domain() && !xen_biovec_phys_mergeable(vec1, vec2)) |
| 166 | return false; | 163 | return false; |
| 167 | if ((addr1 | mask) != ((addr2 + vec2->bv_len - 1) | mask)) | 164 | if ((addr1 | mask) != ((addr2 + vec2->bv_len - 1) | mask)) |
| 168 | return false; | 165 | return false; |
diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c index 399c4e30f723..f3fbb700f569 100644 --- a/drivers/xen/biomerge.c +++ b/drivers/xen/biomerge.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | #include <linux/bio.h> | 2 | #include <linux/bio.h> |
| 3 | #include <linux/io.h> | ||
| 4 | #include <linux/export.h> | 3 | #include <linux/export.h> |
| 4 | #include <xen/xen.h> | ||
| 5 | #include <xen/page.h> | 5 | #include <xen/page.h> |
| 6 | 6 | ||
| 7 | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, | 7 | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, |
