Skip to contentSkip to conversation

powerpc: Export __spin_yield

PATCH In review Suresh E. Warrier 2 participants 4 messages Feb 24, 2015 1 message not in the archive PowerPC

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 powerpc: Export __spin_yield

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

---
 arch/powerpc/lib/locks.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/lib/locks.c +1 -0
index bb7cfec..d100de8 100644
@@ -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...
Signature · 1 line
1.8.3.4
#2 lore raw
Quoted 2 lines · Suresh E. Warrier

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 17 lines
---
 arch/powerpc/lib/locks.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/lib/locks.c +1 -0
index bb7cfec..d100de8 100644
@@ -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...
#3 lore raw
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 2 lines · Suresh E. Warrier

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

#4 lore raw
Quoted 11 lines · Suresh E. Warrier
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 2 lines · Suresh E. Warrier

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.

Quoted 4 lines

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.