From patchwork Tue Mar 20 10:04:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur LAMBERT X-Patchwork-Id: 10296773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1719660385 for ; Tue, 20 Mar 2018 10:06:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0402E28E90 for ; Tue, 20 Mar 2018 10:06:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECCA3294BB; Tue, 20 Mar 2018 10:06:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E54B28E90 for ; Tue, 20 Mar 2018 10:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fU/uXqNaVfTWTSDQXiMB+8iW7PxRg8fy+EnQ/R2cjcs=; b=MREhHjQ+EadsSy iqD0wSFD9B8GXcPwFGUo5v/H/ahACEP1IG5nkFN5DKjbhMvsj0NGOoH2fDQV5Ni6QGVVBRVuBR6kn mO+br53CjvdidyBhzUfKmsYDAVHnEGLP60s0AmHhPJAvL6J+/FP6Rm5uoy2/AxnHNNL56LOTnGaQi O1hNy9ZToWBdGQMEeJykLBasoBOnB8bYvF2LJZ/mcQ42V6u66VBiIEhA7tOj6MW1r4bvIhw+zZcTX uvxK+Xc2iq5/NNUNHJm98w7nQKWRvgAlgGReJk0O0CNd9y5C2vQhwZ9Ssfv0ztaZ/bZ0oMzevMIP7 tqDB5QymCTh1TqXcvs/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyE9W-0005pp-AV; Tue, 20 Mar 2018 10:05:58 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyE8H-00040h-Kz for linux-arm-kernel@lists.infradead.org; Tue, 20 Mar 2018 10:04:48 +0000 Received: by mail-wm0-x234.google.com with SMTP id e194so2177531wmd.3 for ; Tue, 20 Mar 2018 03:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=A37kglKLajlM+6JM45P0XXwkSCz1DW6ynsKpAPtVh5U=; b=PXvWTQqWSiGMDQJheajmHCnPKIN+pgNJEGJXXG/yNfSXh1n10avhk8nQYbYMzvopEZ a2XWVnbj+FZOC1QrZlPWF2WYKv9MXRqjMJtKgux0E5Ru6vA64fC5/TrCdGxQay0+OKol u9B+U6avvu4iG31Cdlg2ESgoxlaC59V+rO34FzFe77r40TGW/U+t/eTBycfC87s7nQTV uCtZ6NXCgie4L0W00KA+ZpObEUq68OpooR7/eZyp63Rs+tFjralgwdkyvv38MMuZL2yC MOreQAL8EH1ZCRdw8OguCz446qTApzCjaxwyxmTANEQSjnsVOmM4Ief+YG0v4v3NUK29 89dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=A37kglKLajlM+6JM45P0XXwkSCz1DW6ynsKpAPtVh5U=; b=npNFXHnM7pxiTYlJxFT16aFkYdWjYGGZxVHUxGaFt5sIaltCN9U9KpJ13ZtfYHVWU8 dXYT2ZV8AEMZ/k5fmd+wFcMg6XI+c/sSWWvc8AI9URv416D6L2W2zhGWOR1z77TclY6Z 9QZ5khCfipECxErU82h4aw5VsSc5Poi9PG9HnAKeXG+DQYYRfkzJWknKFkn/sWbtfF0U Sjlf1tEDtBdj+jsCac4NcsJy9MpUCjNGKYEFG+kC/3eBIZ/bxr8fu5hvMLQg17iISSMw +sS3UJuWevmYojKku2cvStCFWULNh5T2j2KjP6/C2aAz7m4f8oyVsAHkpjyEvYKr0DIv xK9A== X-Gm-Message-State: AElRT7HyWp/kgiv9acdiMPJ0tCw1MtmidET3ezkjrluscU3pc2Eov/5e xSESSWectvPXiLbRb/+r/mY11iJx X-Google-Smtp-Source: AG47ELuL9a0uyG+k2pg8gu0jGPUuzu7kvOuc3pT10A42aiMfyq8KGFvRv3RSrJpgICF2sB5hFIFzgg== X-Received: by 10.28.74.88 with SMTP id x85mr1583425wma.106.1521540268893; Tue, 20 Mar 2018 03:04:28 -0700 (PDT) Received: from localhost (221-9-170-95.reverse.btadsl.fr. [95.170.9.221]) by smtp.gmail.com with ESMTPSA id g7sm962002wrb.78.2018.03.20.03.04.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 03:04:28 -0700 (PDT) Date: Tue, 20 Mar 2018 11:04:27 +0100 From: Arthur LAMBERT To: linux-arm-kernel@lists.infradead.org Subject: issue with kexec/kdump on imx6ull Message-ID: <20180320100427.GA21933@arthur-bzh> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180320_030442_415202_31AC46AF X-CRM114-Status: GOOD ( 14.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I am trying to use kexec/kdump on imx6ull evaluation kit without success. kernel : git://git.freescale.com/imx/linux-imx.git kernel tag : rel_imx_4.9.x_1.0.0_ga defconfig : imx_v7 device tree : imx6ull-14x14-evk First I enable kexec/kdump in kernel config and add crashkernel to kernel command line : [arthur * dreem] diff -Naur arch/arm/configs/imx_v7_defconfig defconfig crashkernel initialization is a success : # dmesg | grep -i crash Reserving 50MB of memory at 2176MB for crashkernel (System RAM: 512MB) Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw crashkernel=50M I used a script to load kernel in crashkernel area with kexec : # cat kx.sh #!/bin/sh DUMPK_CMDLINE="console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw maxcpus=1 reset_devices init=/sbin/init" kexec --type zImage \ -p /root/zImage \ --dtb=/root/imx6ull-14x14-evk.dtb \ --append="${DUMPK_CMDLINE}" [ $? -ne 0 ] && { echo "kexec failed." ; exit 1 } echo "$0: kexec: success, dump kernel loaded." exit 0 I used the same kernel && device tree in kexec that the current one : # mkdir kernel # mount /dev/mmcblk1p1 kernel # cp kernel/zImage /root/. # cp kernel/imx6ull-14x14-evk.dtb /root/. # # sync # umount kernel # rm -r kernel I run the test : # sh kx.sh kx.sh: kexec: success, dump kernel loaded. # I trigger a kernel panic to test the kdump feature : # echo c > /proc/sysrq-trigger sysrq: SysRq : Trigger a crash Unable to handle kernel NULL pointer dereference at virtual address 00000000 (...) Loading crashdump kernel... Bye! No more output after that. In my opinion the kernel loaded with kexec is frozen during init. Is there a mistake in my process ? Is there a freeze during the kernel init ? How can I debug this kind of issue ? Thanks, Arthur. --- arch/arm/configs/imx_v7_defconfig 2017-09-07 11:46:46.000000000 +0200 +++ defconfig 2018-03-19 18:33:22.776513159 +0100 @@ -1,4 +1,3 @@ -CONFIG_KERNEL_LZO=y CONFIG_SYSVIPC=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y @@ -36,7 +35,10 @@ CONFIG_AEABI=y CONFIG_HIGHMEM=y CONFIG_CMA=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_CMDLINE="console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw crashkernel=50M" +CONFIG_CMDLINE_FORCE=y +CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y @@ -416,6 +418,7 @@ CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=y +CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y # CONFIG_SCHED_DEBUG is not set