Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56599
b: refs/heads/master
c: 39d2070
h: refs/heads/master
i:
  56597: 7449083
  56595: 7c5e95a
  56591: fb20c33
v: v3
  • Loading branch information
Christoph Hellwig authored and Paul Mackerras committed May 17, 2007
1 parent c021792 commit 278cea5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d561ed46ea33c223def2eb8e2b09ea108a4d70b
refs/heads/master: 39d207036c76ff16650772b83fb1a12ab788ca26
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/platforms/iseries/viopath.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static void handleMonitorEvent(struct HvLpEvent *event);
* if system_state is not SYSTEM_RUNNING, then wait_atomic is used ...
*/
struct alloc_parms {
struct semaphore sem;
struct completion done;
int number;
atomic_t wait_atomic;
int used_wait_atomic;
Expand Down Expand Up @@ -465,7 +465,7 @@ static void viopath_donealloc(void *parm, int number)
if (parmsp->used_wait_atomic)
atomic_set(&parmsp->wait_atomic, 0);
else
up(&parmsp->sem);
complete(&parmsp->done);
}

static int allocateEvents(HvLpIndex remoteLp, int numEvents)
Expand All @@ -477,15 +477,15 @@ static int allocateEvents(HvLpIndex remoteLp, int numEvents)
atomic_set(&parms.wait_atomic, 1);
} else {
parms.used_wait_atomic = 0;
init_MUTEX_LOCKED(&parms.sem);
init_completion(&parms.done);
}
mf_allocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo, 250, /* It would be nice to put a real number here! */
numEvents, &viopath_donealloc, &parms);
if (system_state != SYSTEM_RUNNING) {
while (atomic_read(&parms.wait_atomic))
mb();
} else
down(&parms.sem);
wait_for_completion(&parms.done);
return parms.number;
}

Expand Down Expand Up @@ -586,10 +586,10 @@ int viopath_close(HvLpIndex remoteLp, int subtype, int numReq)
spin_unlock_irqrestore(&statuslock, flags);

parms.used_wait_atomic = 0;
init_MUTEX_LOCKED(&parms.sem);
init_completion(&parms.done);
mf_deallocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo,
numReq, &viopath_donealloc, &parms);
down(&parms.sem);
wait_for_completion(&parms.done);

spin_lock_irqsave(&statuslock, flags);
for (i = 0, numOpen = 0; i < VIO_MAX_SUBTYPES; i++)
Expand Down

0 comments on commit 278cea5

Please sign in to comment.