summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-17 21:28:53 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-17 21:28:53 +0200
commit2c52de4f914806c040f62d9fc3ee88081a7aa56b (patch)
treee40aa496fe958e313e082340c4d1689e56143f2f /driver
parent8ad813673ae155ce0e601ae864466a59ce7afa95 (diff)
downloadipecamera-2c52de4f914806c040f62d9fc3ee88081a7aa56b.tar.gz
ipecamera-2c52de4f914806c040f62d9fc3ee88081a7aa56b.tar.bz2
ipecamera-2c52de4f914806c040f62d9fc3ee88081a7aa56b.tar.xz
ipecamera-2c52de4f914806c040f62d9fc3ee88081a7aa56b.zip
List kernel buffers
Diffstat (limited to 'driver')
-rw-r--r--driver/common.h7
-rw-r--r--driver/sysfs.c2
2 files changed, 1 insertions, 8 deletions
diff --git a/driver/common.h b/driver/common.h
index 5787618..3d26a97 100644
--- a/driver/common.h
+++ b/driver/common.h
@@ -6,13 +6,6 @@
/*************************************************************************/
/* Private data types and structures */
-#define KMEM_REF_HW 0x80000000 /**< Special reference to indicate hardware access */
-#define KMEM_REF_COUNT 0x0FFFFFFF /**< Mask of reference counter (mmap/munmap), couting in mmaped memory pages */
-
-#define KMEM_MODE_REUSABLE 0x80000000 /**< Indicates reusable buffer */
-#define KMEM_MODE_EXCLUSIVE 0x40000000 /**< Only a single process is allowed to mmap the buffer */
-#define KMEM_MODE_PERSISTENT 0x20000000 /**< Persistent mode instructs kmem_free to preserve buffer in memory */
-#define KMEM_MODE_COUNT 0x0FFFFFFF /**< Mask of reuse counter (alloc/free) */
/* Define an entry in the kmem list (this list is per device) */
/* This list keeps references to the allocated kernel buffers */
diff --git a/driver/sysfs.c b/driver/sysfs.c
index ab0925c..59536ab 100644
--- a/driver/sysfs.c
+++ b/driver/sysfs.c
@@ -98,7 +98,7 @@ static SYSFS_GET_FUNCTION(pcidriver_show_kmem_entry)
int id = simple_strtol(attr->attr.name + strlen("kbuf"), NULL, 10);
pcidriver_kmem_entry_t *entry = pcidriver_kmem_find_entry_id(privdata, id);
if (entry)
- return snprintf(buf, PAGE_SIZE, "buffer: %d\ntype: %lu\nuse: 0x%lx\nitem: %lu\nsize: %lu\nrefs: %lu\nhw ref: %i\nmode: %lx\n", id, entry->type, entry->use, entry->item, entry->size, entry->refs&KMEM_REF_COUNT, (entry->refs&KMEM_REF_HW)?1:0, entry->mode);
+ return snprintf(buf, PAGE_SIZE, "buffer: %d\ntype: %lu\nuse: 0x%lx\nitem: %lu\nsize: %lu\nrefs: %lu\nhw ref: %i\nmode: 0x%lx\n", id, entry->type, entry->use, entry->item, entry->size, entry->refs&KMEM_REF_COUNT, (entry->refs&KMEM_REF_HW)?1:0, entry->mode);
else
return snprintf(buf, PAGE_SIZE, "I am in the kmem_entry show function for buffer %d\n", id);
#else