public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] microblaze: Fix built-in DTB alignment to be 8-byte aligned
@ 2021-02-13  1:16 Rob Herring
  2021-02-16  6:44 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2021-02-13  1:16 UTC (permalink / raw)
  To: devicetree; +Cc: linux-kernel, Guenter Roeck, Michal Simek

Commit 79edff12060f ("scripts/dtc: Update to upstream version
v1.6.0-51-g183df9e9c2b9") broke booting on Microblaze systems depending on
the build. The problem is libfdt gained an 8-byte starting alignment check,
but the Microblaze built-in DTB area is only 4-byte aligned. This affected
not just built-in DTBs as bootloader passed DTBs are copied into the
built-in DTB region.

Other arches using built-in DTBs use a common linker macro which has
sufficient alignment.

Fixes: 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Rob Herring <robh@kernel.org>
---
As the commit is in my tree, I'll take this via the DT tree.

 arch/microblaze/kernel/vmlinux.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index df07b3d06cd6..fb31747ec092 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -45,7 +45,7 @@ SECTIONS {
 		_etext = . ;
 	}
 
-	. = ALIGN (4) ;
+	. = ALIGN (8) ;
 	__fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
 		_fdt_start = . ;		/* place for fdt blob */
 		*(__fdt_blob) ;			/* Any link-placed DTB */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] microblaze: Fix built-in DTB alignment to be 8-byte aligned
  2021-02-13  1:16 [PATCH] microblaze: Fix built-in DTB alignment to be 8-byte aligned Rob Herring
@ 2021-02-16  6:44 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2021-02-16  6:44 UTC (permalink / raw)
  To: Rob Herring; +Cc: DTML, LKML, Guenter Roeck

so 13. 2. 2021 v 2:16 odesílatel Rob Herring <robh@kernel.org> napsal:
>
> Commit 79edff12060f ("scripts/dtc: Update to upstream version
> v1.6.0-51-g183df9e9c2b9") broke booting on Microblaze systems depending on
> the build. The problem is libfdt gained an 8-byte starting alignment check,
> but the Microblaze built-in DTB area is only 4-byte aligned. This affected
> not just built-in DTBs as bootloader passed DTBs are copied into the
> built-in DTB region.
>
> Other arches using built-in DTBs use a common linker macro which has
> sufficient alignment.
>
> Fixes: 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> Cc: Michal Simek <monstr@monstr.eu>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> As the commit is in my tree, I'll take this via the DT tree.
>
>  arch/microblaze/kernel/vmlinux.lds.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
> index df07b3d06cd6..fb31747ec092 100644
> --- a/arch/microblaze/kernel/vmlinux.lds.S
> +++ b/arch/microblaze/kernel/vmlinux.lds.S
> @@ -45,7 +45,7 @@ SECTIONS {
>                 _etext = . ;
>         }
>
> -       . = ALIGN (4) ;
> +       . = ALIGN (8) ;
>         __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
>                 _fdt_start = . ;                /* place for fdt blob */
>                 *(__fdt_blob) ;                 /* Any link-placed DTB */
> --
> 2.27.0
>

Applied.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-16  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-13  1:16 [PATCH] microblaze: Fix built-in DTB alignment to be 8-byte aligned Rob Herring
2021-02-16  6:44 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox