Skip to content

Commit

Permalink
xen: provide a prototype for xen_biovec_phys_mergeable in xen.h
Browse files Browse the repository at this point in the history
Having multiple externs in arch headers is not a good way to provide
a common interface.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Sep 26, 2018
1 parent cd11b1d commit 20e3267
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions arch/arm/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);

#include <asm-generic/io.h>

struct bio_vec;
extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
const struct bio_vec *vec2);
#define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
(!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2))

Expand Down
3 changes: 0 additions & 3 deletions arch/arm64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);

extern int devmem_is_allowed(unsigned long pfn);

struct bio_vec;
extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
const struct bio_vec *vec2);
#define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
(!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2))

Expand Down
4 changes: 0 additions & 4 deletions arch/x86/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,6 @@ extern bool is_early_ioremap_ptep(pte_t *ptep);

#ifdef CONFIG_XEN
#include <xen/xen.h>
struct bio_vec;

extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
const struct bio_vec *vec2);

#define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
(!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2))
Expand Down
4 changes: 4 additions & 0 deletions include/xen/xen.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ extern uint32_t xen_start_flags;
#define xen_initial_domain() (0)
#endif /* CONFIG_XEN_DOM0 */

struct bio_vec;
bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
const struct bio_vec *vec2);

#endif /* _XEN_XEN_H */

0 comments on commit 20e3267

Please sign in to comment.