[PATCH] powerpc: Export __spin_yield

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE4185d

4 messages, 2 authors, 2015-02-24 · open the first message on its own page

[PATCH] powerpc: Export __spin_yield

From: Suresh E. Warrier <hidden>
Date: 2015-02-24 00:10:24

Export __spin_yield so that the arch_spin_unlock() function
can be invoked from a module.

Signed-off-by: Suresh Warrier <redacted>
---
 arch/powerpc/lib/locks.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c
index bb7cfec..d100de8 100644
--- a/arch/powerpc/lib/locks.c
+++ b/arch/powerpc/lib/locks.c
@@ -41,6 +41,7 @@ void __spin_yield(arch_spinlock_t *lock)
 	plpar_hcall_norets(H_CONFER,
 		get_hard_smp_processor_id(holder_cpu), yield_count);
 }
+EXPORT_SYMBOL(__spin_yield);

 /*
  * Waiting for a read lock or a write lock on a rwlock...
-- 
1.8.3.4

Re: [PATCH] powerpc: Export __spin_yield

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2015-02-24 03:38:49

On Mon, 2015-02-23 at 18:10 -0600, Suresh E. Warrier wrote:
Export __spin_yield so that the arch_spin_unlock() function
can be invoked from a module.
Make it EXPORT_SYMBOL_GPL. Also explain why a module might need it
quoted hunk
Signed-off-by: Suresh Warrier <redacted>
---
 arch/powerpc/lib/locks.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c
index bb7cfec..d100de8 100644
--- a/arch/powerpc/lib/locks.c
+++ b/arch/powerpc/lib/locks.c
@@ -41,6 +41,7 @@ void __spin_yield(arch_spinlock_t *lock)
 	plpar_hcall_norets(H_CONFER,
 		get_hard_smp_processor_id(holder_cpu), yield_count);
 }
+EXPORT_SYMBOL(__spin_yield);

 /*
  * Waiting for a read lock or a write lock on a rwlock...

Re: [PATCH] powerpc: Export __spin_yield

From: Suresh E. Warrier <hidden>
Date: 2015-02-24 16:37:55

On 02/23/2015 09:38 PM, Benjamin Herrenschmidt wrote:
On Mon, 2015-02-23 at 18:10 -0600, Suresh E. Warrier wrote:
quoted
Export __spin_yield so that the arch_spin_unlock() function
can be invoked from a module.
Make it EXPORT_SYMBOL_GPL. Also explain why a module might need it
Sure, I will change that to EXPORT_SYMBOL_GPL. Just curious, though, 
there is another symbol arch_spin_unlock_wait that is exported from
the file without the _GPL prefix. Any idea why?

I have mentioned that this needs to be exported to call the 
arch_spin_unlock() function from a module. What additional information
do you think will be useful here ? Are you looking at something
that explains why a module might need to call arch_spin_unlock()?

Thanks.
-suresh

Re: [PATCH] powerpc: Export __spin_yield

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2015-02-24 21:11:59

On Tue, 2015-02-24 at 10:37 -0600, Suresh E. Warrier wrote:
On 02/23/2015 09:38 PM, Benjamin Herrenschmidt wrote:
quoted
On Mon, 2015-02-23 at 18:10 -0600, Suresh E. Warrier wrote:
quoted
Export __spin_yield so that the arch_spin_unlock() function
can be invoked from a module.
Make it EXPORT_SYMBOL_GPL. Also explain why a module might need it
Sure, I will change that to EXPORT_SYMBOL_GPL. Just curious, though, 
there is another symbol arch_spin_unlock_wait that is exported from
the file without the _GPL prefix. Any idea why?
Nope. Not sure how come we did that.
I have mentioned that this needs to be exported to call the 
arch_spin_unlock() function from a module. What additional information
do you think will be useful here ? Are you looking at something
that explains why a module might need to call arch_spin_unlock()?
What kind of module might need it...

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help