Skip to content
Snippets Groups Projects
Commit 4fd64d02 authored by Stephen Warren's avatar Stephen Warren Committed by Bin Meng
Browse files

x86: fix memalign() parameter order


Purely by code inspection, it looks like the parameter order to memalign()
is swapped; its parameters are (align, size). 4096 is a likely desired
alignment, and a variable named size sounds like a size:-)

Fixes: 45b5a378 ("x86: Add multi-processor init")
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 20680b56
No related branches found
No related tags found
No related merge requests found
......@@ -243,7 +243,7 @@ static int load_sipi_vector(atomic_t **ap_countp, int num_cpus)
params->stack_size = CONFIG_AP_STACK_SIZE;
size = params->stack_size * num_cpus;
stack = memalign(size, 4096);
stack = memalign(4096, size);
if (!stack)
return -ENOMEM;
params->stack_top = (u32)(stack + size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment