Skip to content

Commit

Permalink
powerpc: Export __spin_yield
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Suresh E. Warrier authored and Alexander Graf committed Apr 21, 2015
1 parent b79013b commit ae75116
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/lib/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down

0 comments on commit ae75116

Please sign in to comment.