Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7344655imm; Tue, 24 Jul 2018 12:29:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcarg1EZfgT6lHjjjSIddOvKEGayGFYDqmHFscdwfQEFRNX+t55RH8O7EI722VSuZyYxeXC X-Received: by 2002:a63:9856:: with SMTP id l22-v6mr18051016pgo.208.1532460567009; Tue, 24 Jul 2018 12:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532460566; cv=none; d=google.com; s=arc-20160816; b=PFSUMs9Kwc9ObMKBJHlBVCuyFqxdB860B2GkQrdCiy2LbXpm0AIQluroj0UlCgedRO L6qMQzW5tAEgfG2sHHQESpLboPMVn8p3adSRDsnXj0cRH+WONi5HU3Si/0bhEeP5Si1p WwvTW7MdXd+TjF5gJXpZXlOIfdaRyL6XZvb22J8JB1HUt21iG3/tgvqrEBRMrM2lzt0V ALPmyRmWeFNnIYxnaNlX0X1CFVHjNoHqXiO9yA+S5XSP5CjmijjQqUrDLEBjby+sOfze MPO94XVFny7AKv3+plAmI2xlV3yNiiY/VI0JWjI1rIbbs/MBViqoEMD8PUaI6KQgfg4d GKPA== 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=YOYIotWh2hjQkQUz4obqjUnuVXsXwnBGH/QcNo07pwvTQGuzAcw4MsOFomcZfZhLXl lAiHp4JGM/baceJoazhzhWRjP8rwnoA0uQwPKY/2H/Elzk979a0aAOfOri02M8TEJ+LO CsXbkb7s1zU896M6X6BGeQ6YhgSTJs11733cnU/jCPJG4RSDsNJV7+oyfwSos4tXFk9T waOdMmmnwGqM8ySgGabN3ZpeUBFREJs8eacumyEeq0d1afEUZSpQoBJiza3JoEFS19M/ pMU/N1zoQGXOvhzOhhxMt8FLWM7ph3SKg0pM9foMtHRiao5mE9ogI9EVOSq0fiVfBVD8 quzw== 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 i28-v6si12896469pfd.26.2018.07.24.12.29.12; Tue, 24 Jul 2018 12:29:26 -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 S2388671AbeGXUgI (ORCPT + 99 others); Tue, 24 Jul 2018 16:36:08 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48814 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388470AbeGXUgI (ORCPT ); Tue, 24 Jul 2018 16:36:08 -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 w6OJNfRx044244 for ; Tue, 24 Jul 2018 15:28:11 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ke8hjvnqk-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Jul 2018 15:28:11 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Jul 2018 15:28:10 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 24 Jul 2018 15:28:05 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6OJS4Dq9568766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Jul 2018 19:28:04 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6C23CAE05F; Tue, 24 Jul 2018 15:27:20 -0400 (EDT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBF01AE05C; Tue, 24 Jul 2018 15:27:17 -0400 (EDT) Received: from kermit-br-ibm-com.br.ibm.com (unknown [9.18.235.193]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 24 Jul 2018 15:27:17 -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 4/7] powerpc/traps: Use REG_FMT in show_signal_msg() Date: Tue, 24 Jul 2018 16:27:17 -0300 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724192720.32417-1-muriloo@linux.ibm.com> References: <20180724192720.32417-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: 18072419-0064-0000-0000-0000032F294D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009424; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01065573; UDB=6.00547380; IPR=6.00843431; MB=3.00022305; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-24 19:28:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072419-0065-0000-0000-00003A0EC673 Message-Id: <20180724192720.32417-5-muriloo@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-24_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-1807240204 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