summaryrefslogtreecommitdiff
path: root/big-little
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2012-03-12 12:24:14 +0000
committerDietmar Eggemann <dietmar.eggemann@arm.com>2012-05-22 10:43:46 +0100
commite04a36300f5899c1d661005d91752167005c6796 (patch)
treeea6cb8965d0aebffd253161b132e5c0bc231e0e9 /big-little
parent66a66968cbebd8d140d2f8843419829c01b81731 (diff)
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>
Diffstat (limited to 'big-little')
-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;