Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1632028imj; Fri, 8 Feb 2019 04:55:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IZeTIC1xKbdDBxXsAdkdg+Yfj+SfbhAQoaYY8HD1fcZ1b0jLM04v5PZggoh0kEcLdxzU7ub X-Received: by 2002:a17:902:ab92:: with SMTP id f18mr21898160plr.221.1549630532467; Fri, 08 Feb 2019 04:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549630532; cv=none; d=google.com; s=arc-20160816; b=wXDSInYew407023KCmJeLKP/AbTXJIKhsy1DgwrCgMFy/zyDrRq6QSEHyp5LgcYAbv X2c2d4rpV/IKjX6SwFlBSs4pPStEXwcBKqjughja/mUwqsyf6seiH6RJ8aiqg+kmUiQr w8HFhUzA41BpHw63Ll1OpnTNFu6fdPpMFiyBqVht0pYcLMUxClA47R+voRlp29NWqIhS oQ0QQVzVujcbWRlDf1F+98qHXnRupxf3qZaRLOITjToWjOBbYMyCrhPvM1xBYBwBZRjR CgsDy7CSSKoj4UL7XJ8gs8qraGnar/fzm8143omZyCV/n+YVlcd7/KL6xRRbDlS9fwS6 YTKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=Oyahhs2dPeEr1U/OySi46JgAIKGTXPGVCaOaBMFpyA0=; b=aNXhR9ciLhOX1IRNU+w2IjUjW0z1uAXeHMLjCBe1FQid1jvC1TEsxnu2CcnKQFat1/ cfNsbqEtkk55h0DE+8J6iZ1zr1mWlKAMEe5hjGPMhkkjC+Mq8zOvdRR9Q5TGM59ySe0v HZKooExGSF45hMHh5oVCT5LTAl+q/uBhC0HO6RlMXK/khw0gl3xytvORFMgprE5xeLyE 1HOvcsDZpX8gEdqKmB/ETaFoxVS7rui3EQo9XL9UZlPM1yVJmPl1ny4Yx7+O3WoQMEmJ d+tG429K4HM7ahMe3SAWoUE/1dNDqTc7t6Wbf8Q7I0wX0WmtHviE2npwCUwPIyQfSJyk mY9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="bprxo/Ox"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si1955877pgo.295.2019.02.08.04.55.16; Fri, 08 Feb 2019 04:55:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="bprxo/Ox"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727680AbfBHMwe (ORCPT + 99 others); Fri, 8 Feb 2019 07:52:34 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:31628 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727651AbfBHMwb (ORCPT ); Fri, 8 Feb 2019 07:52:31 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43ww7c0qQjz9v0dQ; Fri, 8 Feb 2019 13:52:28 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=bprxo/Ox; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id Ym8zmFL-Vu2Q; Fri, 8 Feb 2019 13:52:28 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 43ww7b6vPZz9v0dJ; Fri, 8 Feb 2019 13:52:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1549630348; bh=Oyahhs2dPeEr1U/OySi46JgAIKGTXPGVCaOaBMFpyA0=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=bprxo/OxZfAzvKsQOFY0n2ynzWqHTeLihY4wazpRaAxPm5EihOCF33kLxZEEaPoqk ms6fmZRD2Jzx0+uH4fQbZ3yxvGzVQ3P4rX2uJhopaYtTAPEArWKP/9oRdrLCuh7X3A h/yqdOayBLWsnXaU/japeX3nvfvVadIbcsnRdj8w= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 40E5F8B8D7; Fri, 8 Feb 2019 13:52:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id pBcDXjqKWMdq; Fri, 8 Feb 2019 13:52:29 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 23F038B756; Fri, 8 Feb 2019 13:52:29 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 115FF653E8; Fri, 8 Feb 2019 12:52:29 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v1 06/16] powerpc/40x: add exception frame marker To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 8 Feb 2019 12:52:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry in order to see interrupts in call traces as below: [ 0.013964] Call Trace: [ 0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable) [ 0.014086] [c0745dc0] [c007aa20] tick_handle_periodic+0x20/0x9c [ 0.014181] [c0745de0] [c0009cd0] timer_interrupt+0xa0/0x264 [ 0.014258] [c0745e10] [c000e484] ret_from_except+0x0/0x14 [ 0.014390] --- interrupt: 901 at console_unlock.part.7+0x3f4/0x528 [ 0.014390] LR = console_unlock.part.7+0x3f0/0x528 [ 0.014455] [c0745ee0] [c0050334] console_unlock.part.7+0x114/0x528 (unreliable) [ 0.014542] [c0745f30] [c00524e0] register_console+0x3d8/0x44c [ 0.014625] [c0745f60] [c0675aac] cpm_uart_console_init+0x18/0x2c [ 0.014709] [c0745f70] [c06614f4] console_init+0x114/0x1cc [ 0.014795] [c0745fb0] [c0658b68] start_kernel+0x300/0x3d8 [ 0.014864] [c0745ff0] [c00022cc] start_here+0x44/0x98 Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 59f6f53f1ac2..f3bfb695f952 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S @@ -132,6 +132,9 @@ _ENTRY(saved_ksp_limit) tovirt(r1,r11); /* set new kernel sp */ \ rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ stw r0,GPR0(r11); \ + lis r10, STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */\ + addi r10, r10, STACK_FRAME_REGS_MARKER@l; \ + stw r10, 8(r11); \ SAVE_4GPRS(3, r11); \ SAVE_2GPRS(7, r11) @@ -174,6 +177,9 @@ _ENTRY(saved_ksp_limit) tovirt(r1,r11); \ rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ stw r0,GPR0(r11); \ + lis r10, STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */\ + addi r10, r10, STACK_FRAME_REGS_MARKER@l; \ + stw r10, 8(r11); \ SAVE_4GPRS(3, r11); \ SAVE_2GPRS(7, r11) -- 2.13.3