]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
MIPS: Malta: fix alignment of the devicetree buffer
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 2 Sep 2021 07:19:51 +0000 (09:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 09:48:02 +0000 (11:48 +0200)
[ Upstream commit bea6a94a279bcbe6b2cde348782b28baf12255a5 ]

Starting with following patch MIPS Malta is not able to boot:
| commit 79edff12060fe7772af08607eff50c0e2486c5ba
| Author: Rob Herring <robh@kernel.org>
| scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9

The reason is the alignment test added to the fdt_ro_probe_(). To fix
this issue, we need to make sure that fdt_buf is aligned.

Since the dtc patch was designed to uncover potential issue, I handle
initial MIPS Malta patch as initial bug.

Fixes: e81a8c7dabac ("MIPS: Malta: Setup RAM regions via DT")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/mti-malta/malta-dtshim.c

index 7859b6e498634a8fd9f3f3d0d1ff708c189dd2b6..5b5d78a7882a45f2b6cbb761e69b29125905eb74 100644 (file)
@@ -26,7 +26,7 @@
 #define  ROCIT_CONFIG_GEN1_MEMMAP_SHIFT        8
 #define  ROCIT_CONFIG_GEN1_MEMMAP_MASK (0xf << 8)
 
-static unsigned char fdt_buf[16 << 10] __initdata;
+static unsigned char fdt_buf[16 << 10] __initdata __aligned(8);
 
 /* determined physical memory size, not overridden by command line args         */
 extern unsigned long physical_memsize;