Skip to content
Commit a1195ae3 authored by Kumar Gala's avatar Kumar Gala Committed by Carles Cufí
Browse files

smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS



Change for loops of the form:

for (i = 0; i < CONFIG_MP_NUM_CPUS; i++)
   ...

to

unsigned int num_cpus = arch_num_cpus();
for (i = 0; i < num_cpus; i++)
   ...

We do the call outside of the for loop so that it only happens once,
rather than on every iteration.

Signed-off-by: default avatarKumar Gala <kumar.gala@intel.com>
parent 77dcf91f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment