summaryrefslogtreecommitdiffstats
path: root/pcilib/kmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/kmem.h')
-rw-r--r--pcilib/kmem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/pcilib/kmem.h b/pcilib/kmem.h
index 8299379..9cd1971 100644
--- a/pcilib/kmem.h
+++ b/pcilib/kmem.h
@@ -1,6 +1,8 @@
#ifndef _PCILIB_KMEM_H
#define _PCILIB_KMEM_H
+#include <stdint.h>
+
typedef struct pcilib_s pcilib_t;
typedef struct pcilib_kmem_list_s pcilib_kmem_list_t;
@@ -14,7 +16,8 @@ typedef enum {
#define PCILIB_KMEM_TYPE_MASK 0xFFFF0000
#define PCILIB_KMEM_USE(type, subtype) ((pcilib_kmem_use_t)(((type) << 16)|(subtype)))
-
+#define PCILIB_KMEM_USE_TYPE(use) (use >> 16)
+#define PCILIB_KMEM_USE_SUBTYPE(use) (use & 0xFFFF)
typedef enum {
PCILIB_KMEM_TYPE_CONSISTENT = 0x00000,
@@ -31,6 +34,7 @@ typedef enum {
PCILIB_KMEM_USE_DMA_RING = 1,
PCILIB_KMEM_USE_DMA_PAGES = 2,
PCILIB_KMEM_USE_SOFTWARE_REGISTERS = 3,
+ PCILIB_KMEM_USE_LOCKS = 4,
PCILIB_KMEM_USE_USER = 0x10
} pcilib_kmem_use_t;