Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1709020ybb; Fri, 29 Mar 2019 09:42:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzuVP1NNpaTvhB+M2MUJhkQzLi4ELcs1RNCBYNv7ifbzcMlXzyGj967eQiNANcAQP10Nel X-Received: by 2002:a17:902:d710:: with SMTP id w16mr48466707ply.198.1553877734702; Fri, 29 Mar 2019 09:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553877734; cv=none; d=google.com; s=arc-20160816; b=dG7IHWf4efhowMVfEceKARx9RXRri17MXKuWxPucPYiYHP2Eg6warkA3y6UYM+/IRx cJnED7mzfggg9HcjwXUR2W9bKyiWSgxWLFtRR/CyUHAz24dyUghyFaLSXZ7t+lYxeI7W fmDd6Lxa3mQtPlFg97TK4A5TjIs3h+OfOsZNcLswZ/7UjiymU6GSxdnlwl2W+vmbTbt+ E0Un6OT504EAssYsz0AKuGzbhG/CZ/4dXQzcHThuhH4Y3kaITt7npTwhyFMq9NxHea3V 1ea87I+QquTje2TSJv/dIl+WaBTaoL0V3+9p4imYmyvtg/jTPnvfg5l5uUO6swADvRAk yiPQ== 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=fJwNdDqiAlgoT/1EYCI/ynpZSPt+QfYdJMVJTkDRues=; b=GKtoKohSkMOuOIvurTh1mDbMFQdfS8JBKe6oY+YFZaAQt6rI6PVuF0Un59ivKNoiS7 8o2+radH7fZRr63lXx1ofsMtDN0OkU7x+TtFSDAqjlWybUPxl3qT1vvRIWASL05/UcEW QY3fe2OyCUrzzDCtSwNLjIQebI+icJhBm5XMAgDYtVJO5bK5vJhUYDIe6V9AjOwzqaNW fQpYscO1ydcPa3nXwVkbp70Rbjqtu5vlzivBzJg98OpeX4CNfYurUd4i8ICnGmaiBaSG OHzjaDQHFZ3d9YbDbTXj0FZNbG4apUSmMwFRF5D3npYU4UASCOPK6Mwux9XHigZ5F7DC Rguw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=P6umroAd; 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 x7si2221210pgg.565.2019.03.29.09.41.58; Fri, 29 Mar 2019 09:42:14 -0700 (PDT) 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=P6umroAd; 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 S1730016AbfC2Qjg (ORCPT + 99 others); Fri, 29 Mar 2019 12:39:36 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:4784 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729811AbfC2Qi3 (ORCPT ); Fri, 29 Mar 2019 12:38:29 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44W6qk1Ytkz9tyQW; Fri, 29 Mar 2019 17:38:26 +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=P6umroAd; 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 hYkjMq0EM4Om; Fri, 29 Mar 2019 17:38:26 +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 44W6qj75g0z9tyQP; Fri, 29 Mar 2019 17:38:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1553877506; bh=fJwNdDqiAlgoT/1EYCI/ynpZSPt+QfYdJMVJTkDRues=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=P6umroAdnjNzhAY3YuCKDLWMgJSU9VOEqfdCLCYzoCGa0VFw8W4g3V/GJd0TRoV+z Je88GVm8pjEwS89ME+hzvR2iku+AHJhA71gsX4gR+aIxckp6Jn02cbRp0rJH0At2mS KKfvpWjO5RS9RLYV7P8tP9fc8FNzhs1Y8CrzZQtE= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 918838B93D; Fri, 29 Mar 2019 17:38:27 +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 sEIsK4FdQ2Y4; Fri, 29 Mar 2019 17:38:27 +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 7B2248B938; Fri, 29 Mar 2019 17:38:27 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 6CE236FC56; Fri, 29 Mar 2019 16:38:27 +0000 (UTC) Message-Id: <5d7afd5fadcf8a52576424a85a0ff580e69302ea.1553877076.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v2 05/17] 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, 29 Mar 2019 16:38:27 +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 f49b0278e995..cb95a5c17cea 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