From patchwork Sun Mar 19 07:15:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 9632483 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 C7C5E60132 for ; Sun, 19 Mar 2017 07:18:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADE1E28338 for ; Sun, 19 Mar 2017 07:18:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C54A28419; Sun, 19 Mar 2017 07:18:01 +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_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 CF0E728338 for ; Sun, 19 Mar 2017 07:18:00 +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:Date:Message-ID:Subject: From:To: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=mioKlyLRpZUuPkb0pamV0dzp0ydOiRtf7ZSwzCWlhOk=; b=rp3OwhUueuNKW1 hYm/J4so4VQC3s/YBFCYO51fv6VatNdqzSlWtI2sISqjIbz4fugLueS/aZNBC9QHW63khK0/Fi8Uj gJ5vWC+VDpG8Q3eUrai2yKGdSoDn8vSqP3xYUBjizeBz0E2uUevNuf5T12qv1xbVlhzXXDVf1DKLM vC4cdUzn12OrcdtVDO89aVLT8/1/nR11ZK5C4McBX0nFn+zrrhlNBPJ6QrpG2FfecbQr5dkbkyRwO 2DijyYa0zJcloZcyIGik+TAQu7lgtrYZAtXZXDvv9IaR6vlQF3Kq2O2/LcwuM7wV4My2+clizjFsH 6t6w7qLW/ZD9Kw3+cqIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cpV6C-0008Ce-Is; Sun, 19 Mar 2017 07:17:56 +0000 Received: from [45.249.212.189] (helo=dggrg03-dlp.huawei.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cpV68-0008AM-QM for linux-arm-kernel@lists.infradead.org; Sun, 19 Mar 2017 07:17:55 +0000 Received: from 172.30.72.54 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.54]) by dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AKG83799; Sun, 19 Mar 2017 15:15:36 +0800 (CST) Received: from [127.0.0.1] (10.177.23.32) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sun, 19 Mar 2017 15:15:32 +0800 To: Catalin Marinas , Will Deacon , Mark Rutland , , "linux-kernel@vger.kernel.org" From: Ding Tianhong Subject: [PATCH] arm64: add dump_stack to show_regs Message-ID: Date: Sun, 19 Mar 2017 15:15:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.58CE3019.001F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: def3ff0a563453d81ee815905fb4be92 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170319_001753_183008_E958BCCC X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. 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 Recently I found that when the system trigger a soft lockup in interrupt, there is only showing the regs, but no stack trace, it is very difficult to locate the problem: =========================================== [10072.999437] NMI watchdog: BUG: soft lockup - CPU#16 stuck for 23s! [ksoftirqd/16:88] ..... [10073.041254] CPU: 16 PID: 88 Comm: ksoftirqd/16 Tainted: G 4.x.x #1 [10073.041258] Hardware name: xxxxx, BIOS 1.17 01/04/2017 [10073.041261] task: ffff803f6cb06200 ti: ffff803f6cb50000 task.ti: ffff803f6cb50000 [10073.041274] PC is at _raw_spin_unlock_irqrestore+0x24/0x30 [10073.041280] LR is at blk_run_queue+0x3c/0x48 [10073.041282] pc : [] lr : [] pstate: 60000145 [10073.041285] sp : ffff803f6cb53b20 [10073.041286] x29: ffff803f6cb53b20 x28: 0000000000001000 [10073.041290] x27: 0000000000000000 x26: ffff800001226000 [10073.041294] x25: 0000000000000000 x24: 0000000000000140 [10073.041297] x23: ffff803f62e108c8 x22: ffff800001037000 [10073.041302] x21: ffff843f66800040 x20: 0000000000000140 [10073.041305] x19: ffff803f62e108c8 x18: 0000000000000007 [10073.041309] x17: 000000000000000e x16: 0000000000000001 [10073.041312] x15: 0000000000000019 x14: 0000000000000033 [10073.041317] x13: 000000000000004c x12: 0000000000000000 [10073.041320] x11: 0000000000001000 x10: 0000000000000010 [10073.041323] x9 : ffff8000004f3a7c x8 : ffff803f69b59120 [10073.041327] x7 : 0000000000000000 x6 : 0000000000000002 [10073.041331] x5 : 0000000000000244 x4 : 00000000000244d9 [10073.041334] x3 : ffff843f653ab918 x2 : 0000000000004074 [10073.041337] x1 : 0000000000000140 x0 : ffff803f62e10e58 =============================================== So add the general dump_stack to show_regs to support showing the stack. Signed-off-by: Ding Tianhong --- arch/arm64/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 043d373..60c5c26 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -212,6 +212,7 @@ void show_regs(struct pt_regs * regs) { printk("\n"); __show_regs(regs); + dump_stack(); } static void tls_thread_flush(void)