powerpc: Export __spin_yield
authorSuresh E. Warrier <warrier@linux.vnet.ibm.com>
Wed, 25 Feb 2015 23:23:53 +0000 (17:23 -0600)
committerAlexander Graf <agraf@suse.de>
Tue, 21 Apr 2015 13:21:28 +0000 (15:21 +0200)
Export __spin_yield so that the arch_spin_unlock() function can
be invoked from a module. This will be required for modules where
we want to take a lock that is also is acquired in hypervisor
real mode. Because we want to avoid running any lockdep code
(which may not be safe in real mode), this lock needs to be
an arch_spinlock_t instead of a normal spinlock.

Signed-off-by: Suresh Warrier <warrier@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/lib/locks.c

index 170a0346f7561ff345ec9faa57fe4e55af9d9d46..f7deebdf33651fd3f1c5038267117341d84bdf79 100644 (file)
@@ -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_GPL(__spin_yield);
 
 /*
  * Waiting for a read lock or a write lock on a rwlock...