Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp898340imm; Fri, 27 Jul 2018 08:00:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpffm6wc3gh7nSut4nl8nprrMwn/EF/wC2PuZYF1xBMn9Jip5D24LXFdvn8H3Hy/sWTAvnh+ X-Received: by 2002:a17:902:4401:: with SMTP id k1-v6mr4537127pld.97.1532703650076; Fri, 27 Jul 2018 08:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532703650; cv=none; d=google.com; s=arc-20160816; b=eolNiewthxzwjTKoS0Wl+KmTUDvn6AY28MNdFKX1A9Vszr4NgBluEwhW0Bz0r3m2Wq Url0xLypC4/ZzHj7Ph46sqPG2mSm/z6BITGTL9tNDPPWJGuLjbvofJH22VvTvqEJLLwc 1hOj0ltph8lNJCPp5pyBY9k0uE/uR6fZAiMTlxcKh/tG5L9PRzD6XvnzpRpQsiIKii2E 2vd7Xq8pe3Cm2Yyict56+DlCgPdZbinYbseQIBcYjpl6700vLvoiVc5z7PAVXfFgIH0N oXS84Mcvz0cs/Ri7vHqOxKIk3f6wchNYEJkpwIBUTQm6jw+4JGuUz6Bvx6fFVByvn90S epvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=CJMGUII9bYFFHDp+4s3VxAmkCQ1NoJWJFMvfJH3RtgA=; b=udkB+KWOCb0RaA2xiQWXzUsINzlVlYMUGJg1vInixGO4kF6G2qfRTxC0SZWkm7jlee saTzFAqjF7uC0BrbUW13XmHlni0Gedj16P+k8Fsx/mkGDne2blJEsmtMyJy2Dz+vK9Wq AsSsrqUBDuxkbCJjnoFLqrqIT++ZQhlLcyjtIUKagUWuDgAsh0RsMoiO6sW1SsilqqDc tjMNuqr4aqBaaiugMqDth5cFnz8RoazpX5rtiQxT8mKwfibHUlPcXJ0XwjnyJvgbAMOw buYlzbeZz0zMLmNJsfx46EaiwmTaIgOWeM60b44E74Haxiyhf+jiIH6NAreW/Sswrkki y0bA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14-v6si3540254plp.489.2018.07.27.08.00.35; Fri, 27 Jul 2018 08:00:50 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388841AbeG0QVm (ORCPT + 99 others); Fri, 27 Jul 2018 12:21:42 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37820 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388282AbeG0QVl (ORCPT ); Fri, 27 Jul 2018 12:21:41 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6RExNST035510 for ; Fri, 27 Jul 2018 10:59:23 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kg4n8txv9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Jul 2018 10:59:22 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jul 2018 10:59:13 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 27 Jul 2018 10:59:08 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6REx7pd5636846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 27 Jul 2018 14:59:07 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82520AC059; Fri, 27 Jul 2018 10:59:50 -0400 (EDT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C593AAC064; Fri, 27 Jul 2018 10:59:44 -0400 (EDT) Received: from kermit-br-ibm-com.ibmmodules.com (unknown [9.80.82.251]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 27 Jul 2018 10:59:44 -0400 (EDT) From: Murilo Opsfelder Araujo To: linux-kernel@vger.kernel.org Cc: "Alastair D'Silva" , Andrew Donnellan , Balbir Singh , Benjamin Herrenschmidt , Christophe Leroy , Cyril Bur , "Eric W . Biederman" , Michael Ellerman , Michael Neuling , Murilo Opsfelder Araujo , Nicholas Piggin , Paul Mackerras , Simon Guo , Sukadev Bhattiprolu , "Tobin C . Harding" , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 04/10] powerpc/traps: Use REG_FMT in show_signal_msg() Date: Fri, 27 Jul 2018 11:58:05 -0300 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180727145811.12334-1-muriloo@linux.ibm.com> References: <20180727145811.12334-1-muriloo@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18072714-2213-0000-0000-000002D0C570 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009438; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01066907; UDB=6.00548186; IPR=6.00844774; MB=3.00022354; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-27 14:59:12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072714-2214-0000-0000-00005AFBFF6D Message-Id: <20180727145811.12334-5-muriloo@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-27_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807270154 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the message format by using REG_FMT as the register format. This avoids having two different formats and avoids checking for MSR_64BIT. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/traps.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 4faab4705774..047d980ac776 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -311,17 +311,13 @@ static bool show_unhandled_signals_ratelimited(void) static void show_signal_msg(int signr, struct pt_regs *regs, int code, unsigned long addr) { - const char fmt32[] = KERN_INFO "%s[%d]: unhandled signal %d " \ - "at %08lx nip %08lx lr %08lx code %x\n"; - const char fmt64[] = KERN_INFO "%s[%d]: unhandled signal %d " \ - "at %016lx nip %016lx lr %016lx code %x\n"; - if (!unhandled_signal(current, signr)) return; - printk(regs->msr & MSR_64BIT ? fmt64 : fmt32, - current->comm, current->pid, signr, - addr, regs->nip, regs->link, code); + pr_info("%s[%d]: unhandled signal %d at "REG_FMT \ + " nip "REG_FMT" lr "REG_FMT" code %x\n", + current->comm, current->pid, signr, addr, + regs->nip, regs->link, code); } void _exception_pkey(int signr, struct pt_regs *regs, int code, -- 2.17.1