Skip to content

Commit 499243b

Browse files
ukleinekgclement
authored andcommitted
ARM: mvebu: Warn about memory chunks too small for DDR training
For each memory region the first 10K are reserved for DDR training. Emit a warning if the area happens to be smaller than these 10K. This should not happen, but if it does this message simplifies diagnosing the problem. This fixes a W=1 compiler error: arch/arm/mach-mvebu/board-v7.c: In function ‘mvebu_scan_mem’: arch/arm/mach-mvebu/board-v7.c:84:27: error: variable ‘size’ set but not used [-Werror=unused-but-set-variable] 84 | u64 base, size; | ^~~~ Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Gregory CLEMENT <[email protected]>
1 parent 8400291 commit 499243b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/arm/mach-mvebu/board-v7.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ static int __init mvebu_scan_mem(unsigned long node, const char *uname,
8686
base = dt_mem_next_cell(dt_root_addr_cells, &reg);
8787
size = dt_mem_next_cell(dt_root_size_cells, &reg);
8888

89+
if (size < MVEBU_DDR_TRAINING_AREA_SZ)
90+
pr_warn("Too little memory to reserve for DDR training\n");
91+
8992
memblock_reserve(base, MVEBU_DDR_TRAINING_AREA_SZ);
9093
}
9194

0 commit comments

Comments
 (0)