Bug 201495

Summary: Initramfs support broken on ARMv7
Product: Platform Specific/Hardware Reporter: Guillaume GARDET (guillaume.gardet)
Component: ARMAssignee: linux-arm-kernel (linux-arm-kernel)
Status: NEW ---    
Severity: normal CC: guillaume.gardet, iamjoonsoo.kim, labbott, matwey.kornilov, mhocko, will.deacon
Priority: P1    
Hardware: ARM   
OS: Linux   
Kernel Version: 4.17-rc7 and later Subsystem:
Regression: No Bisected commit-id:

Description Guillaume GARDET 2018-10-23 13:16:13 UTC
On armv7, it is not possible to boot with initrd since commit d883c6cf3b39f1f42506e82ad2779fb88004acf3: 
  Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE"
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d883c6cf3b39f1f42506e82ad2779fb88004acf3


Kernel 4.17-rc7 is the first broken version. I tested kernel 4.19.0 and the problem is still present.


The problem is the initrd is overwritten by kernel (verified by partial dump), so the kernel does not find the initrd anymore at the expected address. So, kernel is relocated and overwrite initrd.
Please note that all initial addresses (fdt, kernel and initrd) are fine to avoid overlapping. 


It is worth to note that switching from CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE to CONFIG_CC_OPTIMIZE_FOR_SIZE make it work properly.


This bug was initially reported in openSUSE bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1104833