summaryrefslogtreecommitdiff
path: root/include/linux/cpu_rmap.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-29 11:33:37 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-29 11:33:37 +1100
commitdfd0436ad0ce139467b124c646fa65ee2635e14a (patch)
treeabf9d83c704417cdd484243c12aeffee6b185aba /include/linux/cpu_rmap.h
parentb9818c3312da66f4b83a4a2e8650628be1237cb5 (diff)
parent689dfa894c57842a05bf6dc9f97e6bb71ec5f386 (diff)
Merge branch 'merge' into next
Merge "merge" branch to bring in various bug fixes that are going into 3.8
Diffstat (limited to 'include/linux/cpu_rmap.h')
-rw-r--r--include/linux/cpu_rmap.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h
index ac3bbb5b9502..1739510d8994 100644
--- a/include/linux/cpu_rmap.h
+++ b/include/linux/cpu_rmap.h
@@ -13,9 +13,11 @@
#include <linux/cpumask.h>
#include <linux/gfp.h>
#include <linux/slab.h>
+#include <linux/kref.h>
/**
* struct cpu_rmap - CPU affinity reverse-map
+ * @refcount: kref for object
* @size: Number of objects to be reverse-mapped
* @used: Number of objects added
* @obj: Pointer to array of object pointers
@@ -23,6 +25,7 @@
* based on affinity masks
*/
struct cpu_rmap {
+ struct kref refcount;
u16 size, used;
void **obj;
struct {
@@ -33,15 +36,7 @@ struct cpu_rmap {
#define CPU_RMAP_DIST_INF 0xffff
extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags);
-
-/**
- * free_cpu_rmap - free CPU affinity reverse-map
- * @rmap: Reverse-map allocated with alloc_cpu_rmap(), or %NULL
- */
-static inline void free_cpu_rmap(struct cpu_rmap *rmap)
-{
- kfree(rmap);
-}
+extern int cpu_rmap_put(struct cpu_rmap *rmap);
extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj);
extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index,