diff mbox

powerpc: Export __spin_yield

Message ID 54EBC165.3020708@linux.vnet.ibm.com (mailing list archive)
State Superseded
Headers show

Commit Message

Suresh E. Warrier Feb. 24, 2015, 12:10 a.m. UTC
Export __spin_yield so that the arch_spin_unlock() function
can be invoked from a module.

Signed-off-by: Suresh Warrier <warrier@linux.vnet.ibm.com>
---
 arch/powerpc/lib/locks.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Benjamin Herrenschmidt Feb. 24, 2015, 3:38 a.m. UTC | #1
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

> Signed-off-by: Suresh Warrier <warrier@linux.vnet.ibm.com>
> ---
>  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...
Suresh E. Warrier Feb. 24, 2015, 4:37 p.m. UTC | #2
On 02/23/2015 09:38 PM, Benjamin Herrenschmidt wrote:
> 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
> 

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
Benjamin Herrenschmidt Feb. 24, 2015, 9:11 p.m. UTC | #3
On Tue, 2015-02-24 at 10:37 -0600, Suresh E. Warrier wrote:
> On 02/23/2015 09:38 PM, Benjamin Herrenschmidt wrote:
> > 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
> > 
> 
> 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.
diff mbox

Patch

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...