|
@@ -548,7 +548,7 @@ static int gic_starting_cpu(unsigned int cpu)
|
|
|
static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask,
|
|
|
unsigned long cluster_id)
|
|
|
{
|
|
|
- int cpu = *base_cpu;
|
|
|
+ int next_cpu, cpu = *base_cpu;
|
|
|
unsigned long mpidr = cpu_logical_map(cpu);
|
|
|
u16 tlist = 0;
|
|
|
|
|
@@ -562,9 +562,10 @@ static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask,
|
|
|
|
|
|
tlist |= 1 << (mpidr & 0xf);
|
|
|
|
|
|
- cpu = cpumask_next(cpu, mask);
|
|
|
- if (cpu >= nr_cpu_ids)
|
|
|
+ next_cpu = cpumask_next(cpu, mask);
|
|
|
+ if (next_cpu >= nr_cpu_ids)
|
|
|
goto out;
|
|
|
+ cpu = next_cpu;
|
|
|
|
|
|
mpidr = cpu_logical_map(cpu);
|
|
|
|