Commit 8ea9c15b8e3ad32bb6a2f0a4dbb3995ffa55f815
Committed by
Priyanka Jain
1 parent
da46c77d7d
Exists in
smarc_8mq_lf_v2020.04
and in
4 other branches
board: lx2160a: Don't program the GIC RD tables if failed to reserve memory
Program the GIC redistributor tables only when succeeded to reserve memory for them, otherwise kernel will lose the chance to program them using allocated memory. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
board/freescale/lx2160a/lx2160a.c
... | ... | @@ -726,6 +726,7 @@ |
726 | 726 | u64 mc_memory_size = 0; |
727 | 727 | u16 total_memory_banks; |
728 | 728 | u64 gic_lpi_base; |
729 | + int ret; | |
729 | 730 | |
730 | 731 | ft_cpu_setup(blob, bd); |
731 | 732 | |
... | ... | @@ -747,8 +748,9 @@ |
747 | 748 | |
748 | 749 | #ifdef CONFIG_GIC_V3_ITS |
749 | 750 | gic_lpi_base = gd->arch.resv_ram - GIC_LPI_SIZE; |
750 | - gic_lpi_tables_init(gic_lpi_base, cpu_numcores()); | |
751 | - fdt_fixup_gic_lpi_memory(blob, gic_lpi_base); | |
751 | + ret = fdt_fixup_gic_lpi_memory(blob, gic_lpi_base); | |
752 | + if (!ret && gic_lpi_tables_init(gic_lpi_base, cpu_numcores())) | |
753 | + debug("%s: failed to init gic-lpi-tables\n", __func__); | |
752 | 754 | #endif |
753 | 755 | |
754 | 756 | #ifdef CONFIG_RESV_RAM |