linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Suresh E. Warrier" <warrier@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc: Export __spin_yield
Date: Wed, 25 Feb 2015 17:23:53 -0600	[thread overview]
Message-ID: <54EE5989.7010800@linux.vnet.ibm.com> (raw)

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>
---
Replaced export to EXPORT_SYMBOL_GPL
Updated commit log to explain what kind of modules will need
to use the arch_spin_unlock() function

 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..f31bcee 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_GPL(__spin_yield);
 
 /*
  * Waiting for a read lock or a write lock on a rwlock...
-- 
1.8.3.4

             reply	other threads:[~2015-02-25 23:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 23:23 Suresh E. Warrier [this message]
2015-03-19 23:08 ` [PATCH] powerpc: Export __spin_yield Paul Mackerras
2015-03-30 10:17   ` Geert Uytterhoeven
2015-03-30 10:57     ` Benjamin Herrenschmidt
     [not found] <1424477465-9199-2-git-send-email-warrier@linux.vnet.ibm.com>
2015-02-24  0:10 ` Suresh E. Warrier
2015-02-24  3:38   ` Benjamin Herrenschmidt
2015-02-24 16:37     ` Suresh E. Warrier
2015-02-24 21:11       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54EE5989.7010800@linux.vnet.ibm.com \
    --to=warrier@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).