diff options
author | alfred <alfred@FreeBSD.org> | 2002-04-19 22:58:09 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-04-19 22:58:09 +0000 |
commit | 0375b27808811837d0671020660b59c60cbc047c (patch) | |
tree | aa35f1ea25a2a38d406821ab2e2b6e99375e4f47 | |
parent | b986d07861eecdef69a75b36aa1d84a75c44e519 (diff) | |
download | FreeBSD-src-0375b27808811837d0671020660b59c60cbc047c.zip FreeBSD-src-0375b27808811837d0671020660b59c60cbc047c.tar.gz |
Clean up:
Comment run_filter() to explain what it does.
Remove chatty comments.
void busdma_swi() { } -> void busdma_swi(void) { }
-rw-r--r-- | sys/amd64/amd64/busdma_machdep.c | 14 | ||||
-rw-r--r-- | sys/i386/i386/busdma_machdep.c | 14 |
2 files changed, 20 insertions, 8 deletions
diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c index a3340b4..a8f892d 100644 --- a/sys/amd64/amd64/busdma_machdep.c +++ b/sys/amd64/amd64/busdma_machdep.c @@ -101,6 +101,14 @@ static vm_offset_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); +/* + * Return true if a match is made. + * + * To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'. + * + * If paddr is within the bounds of the dma tag then call the filter callback + * to check for a match, if there is no filter callback then assume a match. + */ static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) { @@ -347,7 +355,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, /* * Free a piece of memory and it's allociated dmamap, that was allocated - * via bus_dmamem_alloc. + * via bus_dmamem_alloc. Make the same choice for free/contigfree. */ void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) @@ -358,8 +366,6 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) */ if (map != NULL) panic("bus_dmamem_free: Invalid map freed\n"); - /* XXX There is no "contigfree" and "free" doesn't work */ - /* There is too a contigfree, and we need to use it here. */ if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) free(vaddr, M_DEVBUF); else @@ -652,7 +658,7 @@ free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage) } void -busdma_swi() +busdma_swi(void) { int s; struct bus_dmamap *map; diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c index a3340b4..a8f892d 100644 --- a/sys/i386/i386/busdma_machdep.c +++ b/sys/i386/i386/busdma_machdep.c @@ -101,6 +101,14 @@ static vm_offset_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); +/* + * Return true if a match is made. + * + * To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'. + * + * If paddr is within the bounds of the dma tag then call the filter callback + * to check for a match, if there is no filter callback then assume a match. + */ static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) { @@ -347,7 +355,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, /* * Free a piece of memory and it's allociated dmamap, that was allocated - * via bus_dmamem_alloc. + * via bus_dmamem_alloc. Make the same choice for free/contigfree. */ void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) @@ -358,8 +366,6 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) */ if (map != NULL) panic("bus_dmamem_free: Invalid map freed\n"); - /* XXX There is no "contigfree" and "free" doesn't work */ - /* There is too a contigfree, and we need to use it here. */ if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) free(vaddr, M_DEVBUF); else @@ -652,7 +658,7 @@ free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage) } void -busdma_swi() +busdma_swi(void) { int s; struct bus_dmamap *map; |