summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2012-03-12 12:24:14 +0000
committerDave Martin <dave.martin@linaro.org>2012-04-19 11:18:43 +0100
commit7b7b457278ea485f8be2f4740f46f90c34b667bb (patch)
treeea6cb8965d0aebffd253161b132e5c0bc231e0e9
parent0a882a843005804a9d97030664755f913ddc0e8c (diff)
downloadswitcher-7b7b457278ea485f8be2f4740f46f90c34b667bb.tar.gz
Virqmig: Fixed code to find out whether an irq has been migrated
Shifts applied to the cpu interface mask to determine whether an irq in the mask has been re-targetted was incorrect. Also the original and new cpu interface ids were being calculated wrongly due to the same problem Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
-rw-r--r--big-little/common/vgiclib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/big-little/common/vgiclib.c b/big-little/common/vgiclib.c
index a55fcc4..bde8089 100644
--- a/big-little/common/vgiclib.c
+++ b/big-little/common/vgiclib.c
@@ -167,10 +167,10 @@ static unsigned set_mig_irq_info(unsigned orig, unsigned curr, unsigned icdiptr_
unsigned desc = 0, cpu_id = read_cpuid();
for (ctr = 0; ctr < MAX_MIG_IRQS; ctr++) {
- if ((diff >> (ctr << 2)) & 0xff) {
+ if ((diff >> (ctr << 3)) & 0xff) {
migrated_irqs[cpu_id][ctr].id = icdiptr_offset + ctr;
- migrated_irqs[cpu_id][ctr].src_cpuif = bitindex(orig);
- migrated_irqs[cpu_id][ctr].dest_cpuif = bitindex(curr);
+ migrated_irqs[cpu_id][ctr].src_cpuif = bitindex((orig >> (ctr << 3)) & 0xff);
+ migrated_irqs[cpu_id][ctr].dest_cpuif = bitindex((curr >> (ctr << 3)) & 0xff);
desc = dequeue_virq(migrated_irqs[cpu_id][ctr].id, cpu_id);
if (desc) {
migrated_irqs[cpu_id][ctr].desc = desc;