Skip to contentSkip to conversation

Export percpu-refcount functions

PATCH New Matias Bjorling 3 participants 4 messages Oct 11, 2013 – Oct 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Export percpu-refcount functions

ERROR: "percpu_ref_kill_and_confirm" [...] undefined!

Working on a driver that needs them, but other modules might benefit as well.

Matias Bjorling (1):
percpu-refcount: Export symbols

 lib/percpu-refcount.c | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 percpu-refcount: Export symbols

Need to be exported for being used within modules.

---
 lib/percpu-refcount.c | 3 +++
 1 file changed, 3 insertions(+)
lib/percpu-refcount.c +3 -0
index 7deeb62..25b9ac7 100644
@@ -53,6 +53,7 @@ int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release)
 	ref->release = release;
 	return 0;
 }
+EXPORT_SYMBOL(percpu_ref_init);
 
 /**
  * percpu_ref_cancel_init - cancel percpu_ref_init()
@@ -84,6 +85,7 @@ void percpu_ref_cancel_init(struct percpu_ref *ref)
 		free_percpu(ref->pcpu_count);
 	}
 }
+EXPORT_SYMBOL(percpu_ref_cancel_init);
 
 static void percpu_ref_kill_rcu(struct rcu_head *rcu)
 {
@@ -156,3 +158,4 @@ void percpu_ref_kill_and_confirm(struct percpu_ref *ref,
 
 	call_rcu_sched(&ref->rcu, percpu_ref_kill_rcu);
 }
+EXPORT_SYMBOL(percpu_ref_kill_and_confirm);
Signature · 1 line
1.8.1.2
#2 lore raw

Re: [PATCH] percpu-refcount: Export symbols

Quoted 3 lines · Matias Bjorling

Need to be exported for being used within modules.

I will bite... Why not EXPORT_SYMBOL_GPL()?

Thanx, Paul

Quoted 32 lines
---
 lib/percpu-refcount.c | 3 +++
 1 file changed, 3 insertions(+)
lib/percpu-refcount.c +3 -0
index 7deeb62..25b9ac7 100644
@@ -53,6 +53,7 @@ int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release)
 	ref->release = release;
 	return 0;
 }
+EXPORT_SYMBOL(percpu_ref_init);
 
 /**
  * percpu_ref_cancel_init - cancel percpu_ref_init()
@@ -84,6 +85,7 @@ void percpu_ref_cancel_init(struct percpu_ref *ref)
 		free_percpu(ref->pcpu_count);
 	}
 }
+EXPORT_SYMBOL(percpu_ref_cancel_init);
 
 static void percpu_ref_kill_rcu(struct rcu_head *rcu)
 {
@@ -156,3 +158,4 @@ void percpu_ref_kill_and_confirm(struct percpu_ref *ref,
 
 	call_rcu_sched(&ref->rcu, percpu_ref_kill_rcu);
 }
+EXPORT_SYMBOL(percpu_ref_kill_and_confirm);
Signature · 1 line
1.8.1.2
maintainer
#3 lore raw

Re: [PATCH] percpu-refcount: Export symbols

Quoted 6 lines · Paul E. McKenney
Quoted 3 lines · Matias Bjorling

Need to be exported for being used within modules.

I will bite... Why not EXPORT_SYMBOL_GPL()?

Seconded. Please use EXPORT_SYMBOL_GPL.

Thanks.

Signature · 1 line
tejun