aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2002-04-19 22:58:09 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2002-04-19 22:58:09 +0000
commit74d618ca439b0c02463113903b2c94ff4379b122 (patch)
treeaa35f1ea25a2a38d406821ab2e2b6e99375e4f47
parent9cd64fb3ddcaea518f1ba4f8ceb93289d5527d3c (diff)
downloadsrc-74d618ca439b0c02463113903b2c94ff4379b122.tar.gz
src-74d618ca439b0c02463113903b2c94ff4379b122.zip
Clean up:
Comment run_filter() to explain what it does. Remove chatty comments. void busdma_swi() { } -> void busdma_swi(void) { }
Notes
Notes: svn path=/head/; revision=95076
-rw-r--r--sys/amd64/amd64/busdma_machdep.c14
-rw-r--r--sys/i386/i386/busdma_machdep.c14
2 files changed, 20 insertions, 8 deletions
diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c
index a3340b422d8d..a8f892d5431b 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 a3340b422d8d..a8f892d5431b 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;