From patchwork Wed Nov 25 02:46:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 548377 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7AC5B1402B8 for ; Wed, 25 Nov 2015 13:47:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ukRu7SmR; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 592DB1A03CD for ; Wed, 25 Nov 2015 13:47:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ukRu7SmR; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C56861A032F for ; Wed, 25 Nov 2015 13:46:39 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ukRu7SmR; dkim-atps=neutral Received: by pacej9 with SMTP id ej9so41540213pac.2 for ; Tue, 24 Nov 2015 18:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=LCMFbimgnDxJ81FUUhE49JmAUxE7NLmZ4MzabwgOjR0=; b=ukRu7SmRwvC1hrpz2qdaCnKFQvYUhbdp2FwFsKHnRsU+GRT63Vpva/bmdNjchr8X83 t9/6kG2t3H24ia9KM3zCD8CCn1Iz2EJ1waXgmAPFycw68cy22RqTPqaLTKK5D1a3b+pX o9D/lFD3zLdyhXOCyrmEy1/4sydhRNMn4gdaJXDdXJTAJvYnDBBaSea1LHI4CCnck9xx TizA4RmQOIEohyaCBmSUegnSdGZRlMVPTN2dSyuJTAZzD/SEIX2q7z6cs0w0NySTsqzw 3C6Q18B+k03CzKMBFVcgynwaouepcAb/uAa/rt4/dYCXRZ289encGWvLPHIl+11LriHo FX6g== X-Received: by 10.98.89.196 with SMTP id k65mr28053461pfj.12.1448419597213; Tue, 24 Nov 2015 18:46:37 -0800 (PST) Received: from circle.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id 132sm16920629pfc.63.2015.11.24.18.46.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Nov 2015 18:46:36 -0800 (PST) From: Rashmica Gupta To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2] powerpc: Append linux_banner to exception information in xmon. Date: Wed, 25 Nov 2015 13:46:25 +1100 Message-Id: <1448419585-5181-1-git-send-email-rashmicy@gmail.com> X-Mailer: git-send-email 2.5.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Currently if you are in xmon without an oops etc. to view the kernel version you have to type "d $linux_banner" - not necessarily obvious. As this is useful information, append to the output of "e" command. Example output: $mon> e cpu 0x1: Vector: 0 at [c0000000f879ba80] pc: c000000000081718: sysrq_handle_xmon+0x68/0x80 lr: c000000000081718: sysrq_handle_xmon+0x68/0x80 sp: c0000000f879bbe0 msr: 8000000000009033 current = 0xc0000000f604d5c0 paca = 0xc00000000fdc0480 softe: 0 irq_happened: 0x01 pid = 2467, comm = bash Linux version 4.4.0-rc2-00008-gc51af91c3ab3-dirty (rashmica@circle) (gcc version 5.1.1 20150629 (GCC) ) #45 SMP Wed Nov 25 10:25:12 AEDT 2015 Signed-off-by: Rashmica Gupta Acked-by: Stewart Smith --- Added example output and word wrapping. arch/powerpc/xmon/xmon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index df05bd2fca07..6d3d9d031aea 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -1528,6 +1528,8 @@ static void excprint(struct pt_regs *fp) if (trap == 0x700) print_bug_trap(fp); + + printf(linux_banner); } static void prregs(struct pt_regs *fp)