Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276142
b: refs/heads/master
c: 2674dd0
h: refs/heads/master
v: v3
  • Loading branch information
Javi Merino authored and Russell King committed Nov 21, 2011
1 parent e0cac29 commit be6d46c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: fa0ce4035d4897b0642132866d896a906429f45e
refs/heads/master: 2674dd0b1c07d8b8dfb4872fc7b41841f05cb957
8 changes: 7 additions & 1 deletion trunk/arch/arm/common/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,11 @@ static inline int _alloc_event(struct pl330_thread *thrd)
return -1;
}

static bool _chan_ns(const struct pl330_info *pi, int i)
{
return pi->pcfg.irq_ns & (1 << i);
}

/* Upon success, returns IdentityToken for the
* allocated channel, NULL otherwise.
*/
Expand All @@ -1647,7 +1652,8 @@ void *pl330_request_channel(const struct pl330_info *pi)

for (i = 0; i < chans; i++) {
thrd = &pl330->channels[i];
if (thrd->free) {
if ((thrd->free) && (!_manager_ns(thrd) ||
_chan_ns(pi, i))) {
thrd->ev = _alloc_event(thrd);
if (thrd->ev >= 0) {
thrd->free = false;
Expand Down

0 comments on commit be6d46c

Please sign in to comment.