Use the 64-bit function to detect a power-of-two. This allows use of a full 4GB MTRR on 32-bit machines.
Signed-off-by: Simon Glass <s...@chromium.org> --- (no changes since v1) arch/x86/cpu/mtrr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c index d05263c8eab..5eab3cc1953 100644 --- a/arch/x86/cpu/mtrr.c +++ b/arch/x86/cpu/mtrr.c @@ -195,7 +195,7 @@ int mtrr_add_request(int type, uint64_t start, uint64_t size) if (!gd->arch.has_mtrr) return -ENOSYS; - if (!is_power_of_2(size)) + if (!is_power_of_2_u64(size)) return -EINVAL; if (gd->arch.mtrr_req_count == MAX_MTRR_REQUESTS) -- 2.43.0