svn commit: r237843 - projects/altix2/sys/kern
Marcel Moolenaar
marcel at FreeBSD.org
Sat Jun 30 15:55:41 UTC 2012
Author: marcel
Date: Sat Jun 30 15:55:40 2012
New Revision: 237843
URL: http://svn.freebsd.org/changeset/base/237843
Log:
Add some section headers. I expect this file to grow fairly rapidly
now that I can focus on the various load functions and with it the
bounce buffering support. Having something to search for as a way
to jump through this file seems like a good idea.
Modified:
projects/altix2/sys/kern/subr_busdma.c
Modified: projects/altix2/sys/kern/subr_busdma.c
==============================================================================
--- projects/altix2/sys/kern/subr_busdma.c Sat Jun 30 14:55:36 2012 (r237842)
+++ projects/altix2/sys/kern/subr_busdma.c Sat Jun 30 15:55:40 2012 (r237843)
@@ -41,6 +41,10 @@ __FBSDID("$FreeBSD$");
#include "busdma_if.h"
+/*
+ * Section 1: Private types.
+ */
+
struct busdma_tag {
struct busdma_tag *dt_chain;
struct busdma_tag *dt_child;
@@ -76,6 +80,10 @@ struct busdma_md {
#define BUSDMA_MD_FLAG_USED \
(BUSDMA_MD_FLAG_ALLOCATED | BUSDMA_MD_FLAG_LOADED)
+/*
+ * Section 2: Private data.
+ */
+
static struct busdma_tag busdma_root_tag = {
.dt_maxaddr = ~0UL,
.dt_align = 1,
@@ -106,6 +114,10 @@ static struct busdma_tag busdma_root_tag
static MALLOC_DEFINE(M_BUSDMA_MD, "busdma_md", "DMA memory descriptors");
static MALLOC_DEFINE(M_BUSDMA_TAG, "busdma_tag", "DMA tags");
+/*
+ * Section 3: Private functions.
+ */
+
static void
_busdma_mtag_dump(const char *func, device_t dev, struct busdma_mtag *mtag)
{
@@ -282,6 +294,10 @@ _busdma_iommu_map(device_t leaf, struct
return (error);
}
+/*
+ * Section 4: Public interface.
+ */
+
int
busdma_tag_create(device_t dev, bus_addr_t align, bus_addr_t bndry,
bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, bus_size_t maxsegsz,
More information about the svn-src-projects
mailing list