Bug 7619 - System hangs during booting kernel using kexec (cgtqmx6)
Summary: System hangs during booting kernel using kexec (cgtqmx6)
Status: RESOLVED FIXED
Alias: None
Product: Kernel
Classification: Yocto Project Subprojects
Component: linux-yocto (show other bugs)
Version: 1.7
Hardware: Other arm
: Medium+ major
Target Milestone: 2.0
Assignee: Otavio Salvador
QA Contact: Alexandru Georgescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-04-16 12:50 UTC by Maksym Zhelieznyi
Modified: 2015-11-04 16:05 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maksym Zhelieznyi 2015-04-16 12:50:34 UTC
I try to reboot system with avoiding U-boot stage using kexec for this:

kexec -l --append="`/proc/cmdline`" --dtb=/boot/devicetree-uImage-imx6q-qmx6.dtb /boot/uImage
umount -a
kexec -e

After executing last command system just hangs without any massages. Also there is output in the serial port:

Starting new kernel
Disabling non-boot CPUs ...
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Bye!


Hardware - Congatec qmx6 016103 (conga-QMX6/QC-1G eMMC4)
kernel 3.10.17
kexec-tools version is 2.0.7 released 10 april 2015
CONFIG_KEXEC option is already enabled in the kernel config
Comment 1 Maksym Zhelieznyi 2015-04-16 13:25:08 UTC
Current Kernel command line is:
console=ttymxc1,115200 fbcon=rotate:0 video=mxcfb0:dev=ldb,1280x800MR@60,LDB-WXGA,if=RGB24 video=mxcfb1:dev=hdmi,1280x800@60,if=RGB24 root=/dev/mmcblk0p1 rootwait ro
Comment 2 Otavio Salvador 2015-09-24 16:34:35 UTC
This is fixed in Congatec 3.14.28 kernel.
Comment 3 Alexandru Georgescu 2015-11-03 08:33:15 UTC
Hi Otavio, Maksym,

Could you point us a hint on how to verify this?
e.g. what HW did you use and the steps required?
Comment 4 Maksym Zhelieznyi 2015-11-04 15:47:16 UTC
Hi Alexandru,

Hardware is Congatec qmx6 dual/quad (http://www.congatec.com/en/products/qseven/conga-qmx6.html)
Steps are described in the bug description

-best regards,
 Maksym
Comment 5 Otavio Salvador 2015-11-04 16:05:38 UTC
(In reply to comment #3)
> Could you point us a hint on how to verify this?
> e.g. what HW did you use and the steps required?

This is hardware dependant, so it cannot be easily verified without the board.

The commit which fixes the issue is:

Author: Geert Uytterhoeven <geert@linux-m68k.org>
Date:   Wed Apr 1 13:36:57 2015 +0100

    ARM: 8338/1: kexec: Relax SMP validation to improve DT compatibility
    
    When trying to kexec into a new kernel on a platform where multiple CPU
    cores are present, but no SMP bringup code is available yet, the
    kexec_load system call fails with:
    
        kexec_load failed: Invalid argument
    
    The SMP test added to machine_kexec_prepare() in commit 2103f6cba61a8b8b
    ("ARM: 7807/1: kexec: validate CPU hotplug support") wants to prohibit
    kexec on SMP platforms where it cannot disable secondary CPUs.
    However, this test is too strict: if the secondary CPUs couldn't be
    enabled in the first place, there's no need to disable them later at
    kexec time.  Hence skip the test in the absence of SMP bringup code.
    
    This allows to add all CPU cores to the DTS from the beginning, without
    having to implement SMP bringup first, improving DT compatibility.
    
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: Stephen Warren <swarren@nvidia.com>
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    [cherry-picked fee3fd4fd2ad13 from 4.1-rc1]
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>