ChangeSet 1.2065.3.4, 2005/03/12 08:21:41-08:00, [EMAIL PROTECTED]
[PATCH] ppc64: don't use in_atomic()
in_atomic() in viopath.c was just used to determine if we had
initialised
enough to be able to wait in a semaphore (i.e. schedule). Thus it can
be
replaced now with checking system_state for SYSTEM_RUNNING.
Test booted on iSeries (which is the only place it is used).
Signed-off-by: Stephen Rothwell <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
viopath.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -Nru a/arch/ppc64/kernel/viopath.c b/arch/ppc64/kernel/viopath.c
--- a/arch/ppc64/kernel/viopath.c 2005-03-12 21:25:07 -08:00
+++ b/arch/ppc64/kernel/viopath.c 2005-03-12 21:25:07 -08:00
@@ -79,7 +79,7 @@
/*
* We use this structure to handle asynchronous responses. The caller
* blocks on the semaphore and the handler posts the semaphore. However,
- * if in_atomic() is true in the caller, then wait_atomic is used ...
+ * if system_state is not SYSTEM_RUNNING, then wait_atomic is used ...
*/
struct doneAllocParms_t {
struct semaphore *sem;
@@ -465,7 +465,7 @@
DECLARE_MUTEX_LOCKED(Semaphore);
atomic_t wait_atomic;
- if (in_atomic()) {
+ if (system_state != SYSTEM_RUNNING) {
parms.used_wait_atomic = 1;
atomic_set(&wait_atomic, 1);
parms.wait_atomic = &wait_atomic;
@@ -475,7 +475,7 @@
}
mf_allocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo, 250, /* It
would be nice to put a real number here! */
numEvents, &viopath_donealloc, &parms);
- if (in_atomic()) {
+ if (system_state != SYSTEM_RUNNING) {
while (atomic_read(&wait_atomic))
mb();
} else
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html