From: Stephen Warren Date: Fri, 12 Feb 2016 21:27:56 +0000 (-0700) Subject: x86: fix memalign() parameter order X-Git-Tag: v2016.03-rc3~81 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4fd64d02b2bb7fe583c1246c79b9658223d96442;p=u-boot 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: 45b5a37836d5 ("x86: Add multi-processor init") Signed-off-by: Stephen Warren Reviewed-by: Bin Meng Reviewed-by: Simon Glass Tested-by: Bin Meng --- diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 7917350bff..fc2fb5bf44 100644 --- a/arch/x86/cpu/mp_init.c +++ b/arch/x86/cpu/mp_init.c @@ -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);