- Kai Germaschewski: ISDN update (including Makefiles)
[davej-history.git] / arch / sparc64 / kernel / iommu_common.h
blob30cbd438541ef2bed8f2bcf91c37e87a3a6b16b8
1 /* $Id: iommu_common.h,v 1.1 1999/12/17 12:31:54 jj Exp $
2 * iommu_common.h: UltraSparc SBUS/PCI common iommu declarations.
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
5 */
7 #include <linux/kernel.h>
8 #include <linux/types.h>
10 #include <asm/page.h>
11 #include <asm/iommu.h>
12 #include <asm/scatterlist.h>
14 /* You are _strongly_ advised to enable the following debugging code
15 * any time you make changes to the sg code below, run it for a while
16 * with filesystems mounted read-only before buying the farm... -DaveM
18 #undef VERIFY_SG
20 #ifdef VERIFY_SG
21 int verify_lengths(struct scatterlist *sg, int nents, int npages);
22 int verify_one_map(struct scatterlist *dma_sg, struct scatterlist **__sg, int nents, iopte_t **__iopte);
23 int verify_maps(struct scatterlist *sg, int nents, iopte_t *iopte);
24 void verify_sglist(struct scatterlist *sg, int nents, iopte_t *iopte, int npages);
25 #endif
27 /* Two addresses are "virtually contiguous" if and only if:
28 * 1) They are equal, or...
29 * 2) They are both on a page boundry
31 #define VCONTIG(__X, __Y) (((__X) == (__Y)) || \
32 (((__X) | (__Y)) << (64UL - PAGE_SHIFT)) == 0UL)
34 unsigned long prepare_sg(struct scatterlist *sg, int nents);