diff options
author | Javi Merino <javi.merino@arm.com> | 2011-11-16 12:21:24 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-21 13:12:19 +0000 |
commit | 2674dd0b1c07d8b8dfb4872fc7b41841f05cb957 (patch) | |
tree | ffdc74f7dacca1eadda885a61f5f06c3fb048772 /arch | |
parent | fa0ce4035d4897b0642132866d896a906429f45e (diff) | |
download | linux-3.10-2674dd0b1c07d8b8dfb4872fc7b41841f05cb957.tar.gz linux-3.10-2674dd0b1c07d8b8dfb4872fc7b41841f05cb957.tar.bz2 linux-3.10-2674dd0b1c07d8b8dfb4872fc7b41841f05cb957.zip |
ARM: 7163/2: PL330: Only register usable channels
When the manager is running non-secure, the only channels that can
issue interrupts are the ones that have a 1 in their corresponding bit
in Configuration Register 3. The other ones will generate an abort
when trying to signal the end of the transaction so they are useless
in non-secure mode.
Reference: <1320244259-10496-2-git-send-email-javi.merino@arm.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/common/pl330.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 7129cfbdacd..f748a385693 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c @@ -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. */ @@ -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; |