Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1010269imm; Fri, 27 Jul 2018 09:41:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpejfVITmHsurhbear2LoNxteeD3+7xxCM76G3ZmV/DsxYB0LHgBBFpoKLBvpMJBAAL05gOd X-Received: by 2002:a17:902:7795:: with SMTP id o21-v6mr6714386pll.2.1532709685276; Fri, 27 Jul 2018 09:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532709685; cv=none; d=google.com; s=arc-20160816; b=hKSPTU2TVkrhHYHkaLHXnaLmqO+OSUjoIqbYhr/vVIZwqpzDM99ynQipTdBG4lobDo 2qOQlZqgDFpBWF3F+4k6oEvZS9vzBYtKgM6B4WHMUpFWnjPQblB6IH/+UjiczOOoUxGn aiy+gR6qIEeIDBsLWcmD5A8sGkhzfLC0YWYJb3mo3adk3EasZeLLa+wU/9DvGjGT1dz5 K3yKawY8tM/SGlAdJHvVvhk0rp6mhKvB1RsC8iofkn+c4w++7Pd3QvwIM6h8pLwcnwIR yfRNpuOC/2szP24X+0Oq3YQB2q8NCvVJ5M7zLJ0bt8chrHf+13FMZq9sjIXkauQtSp/G M/8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:user-agent:in-reply-to:references :subject:cc:to:from:message-id:date:arc-authentication-results; bh=ygwrr+gmHz0wWqaFyptb8uCgWjbnCSx821e2ZeUsV3A=; b=yYRpMSO7TLhCuI5/5Chp+qwXLXwRJAhey+7leI4R37z+WoWfyvJH5TadGzD9ScQURP e1QkyVqokrVRRWuDoRjFuEceMLAwEK7tshHsBXjVvVJw5gULul4caaETLoItSxnzsC8D cZixW7HI6/AfLOdKzrzJMo2VIpzHqBlQ/+rEbICaizGFw0S1LXZS+i1/wvONZFcLv9e7 MBvaKEjWmX+FRVIudmSFW6U1HgtaYXgHxy9SktJmaUdQjwrTrTLlXcLGXFxGko6v5/52 rJtfj1cXvZlr6LlGEBYOn5eQVUJAELawo42F5fJssFpScSlDBaQUV5XPHhyY5HS7qPVK L+Lw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11-v6si3702823plp.108.2018.07.27.09.41.10; Fri, 27 Jul 2018 09:41:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732167AbeG0SDF convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Jul 2018 14:03:05 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:16067 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730510AbeG0SDF (ORCPT ); Fri, 27 Jul 2018 14:03:05 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 41cZSz7465z9ty7q; Fri, 27 Jul 2018 18:40:19 +0200 (CEST) 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 Q00rF5ueDD0k; Fri, 27 Jul 2018 18:40:19 +0200 (CEST) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 41cZSz6RvQz9ty76; Fri, 27 Jul 2018 18:40:19 +0200 (CEST) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 8728144; Fri, 27 Jul 2018 18:40:23 +0200 (CEST) Received: from 37-169-90-232.coucou-networks.fr (37-169-90-232.coucou-networks.fr [37.169.90.232]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Fri, 27 Jul 2018 18:40:23 +0200 Date: Fri, 27 Jul 2018 18:40:23 +0200 Message-ID: <20180727184023.Horde.KRXPzZpG18uxt_B9sy_FBg5@messagerie.si.c-s.fr> From: LEROY Christophe To: Murilo Opsfelder Araujo Cc: linuxppc-dev@lists.ozlabs.org, "Tobin C . Harding" , Sukadev Bhattiprolu , Simon Guo , Paul Mackerras , Nicholas Piggin , Michael Neuling , Michael Ellerman , "Eric W . Biederman" , Cyril Bur , Benjamin Herrenschmidt , Balbir Singh , Andrew Donnellan , Alastair D'Silva , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 04/10] powerpc/traps: Use REG_FMT in show_signal_msg() References: <20180727145811.12334-1-muriloo@linux.ibm.com> <20180727145811.12334-5-muriloo@linux.ibm.com> In-Reply-To: <20180727145811.12334-5-muriloo@linux.ibm.com> User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Murilo Opsfelder Araujo a écrit : > Simplify the message format by using REG_FMT as the register format. This > avoids having two different formats and avoids checking for MSR_64BIT. Are you sure it is what we want ? Won't it change the behaviour for a 32 bits app running on a 64bits kernel ? Christophe > > 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