Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4504662imm; Mon, 30 Jul 2018 16:18:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4ji/eFeVTz6OgbPPkHASD5PuHa/RwwXmrkCF+l/jHHfUxhJxu75CHBD+STQuzFtYQWu/y X-Received: by 2002:a17:902:7106:: with SMTP id a6-v6mr18579586pll.28.1532992730437; Mon, 30 Jul 2018 16:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532992730; cv=none; d=google.com; s=arc-20160816; b=crjrHiBNP2ocADc1Yg0S7IRHq3RbxMx4LQfgIqLSyFBEcGa7d49kLddspbKfVDtSm0 4XHyR+U/8mPz/9siedt9n9BH/jmB/itCcvKF2zGF0LBNCIJviR7DsEdSoPlWN6zbgrs+ 64yoN2OiqC/fJgkEmjegR7W0lCtoJkt71K5swOIrnC6zDZdRJUzLb662ZuUFbHe6+ZpE 4xAUO9uDsue4YT1gJzDMaYXy0l6XgCVY4eLSJBb2fm2Mo9dvXxGu6a7EVFcvZmcgNNrE RfwVVotYyclLqZgeBF4nChV3XhbRkim4FBkYyatnDLEWN9puj0sCZL4KtE9ZExhUiH3c WREw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:subject:cc:to:from:date:arc-authentication-results; bh=5ow7QeuGgNtVo5Xb4pnMLeOxb1kzW3LPBK+6sPkQ9wo=; b=LzAEnU+Jsd1qvWDsJ9inTlhaLSfL+dx9T82rXZw3YXCDSTG5CZ6/o6weHGRQqwptBW C4wEb/rMlN7B2vdB05eK8XmpNIaTuq5emEsGZzWyRztflSqiR3DZwg08TApKXvepvHXE lQlFvBHpsVD3v/Ydc7kEg5cwydbDkwpmKMrKQ3cHXfsp7d+bRlPEcHza/42+475rl6eA Pgz2xiKVzsW5FX7QkDcMxvuavHnFiWu+oy+pvVIQWxyp2L5Xwp3RoklMcywKCmgxdM8o cFAYq7BPWAICLqnSbdGj1IoxqDq5APtucVXQ3EAl/+WAJuvxmq2eIBGI9cRoLxMeWcLr SXKw== 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 w26-v6si11999460pgk.372.2018.07.30.16.18.36; Mon, 30 Jul 2018 16:18: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 S1732130AbeGaAzG (ORCPT + 99 others); Mon, 30 Jul 2018 20:55:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54804 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732038AbeGaAzG (ORCPT ); Mon, 30 Jul 2018 20:55:06 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6UNEpLP091665 for ; Mon, 30 Jul 2018 19:17:47 -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 2kj85t87ub-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Jul 2018 19:17:47 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Jul 2018 19:17:46 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) 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) Mon, 30 Jul 2018 19:17:42 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6UNHfYD10944772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Jul 2018 23:17:41 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBFB2112063; Mon, 30 Jul 2018 19:17:25 -0400 (EDT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF94E112062; Mon, 30 Jul 2018 19:17:24 -0400 (EDT) Received: from localhost (unknown [9.80.210.238]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 30 Jul 2018 19:17:24 -0400 (EDT) Date: Mon, 30 Jul 2018 20:17:38 -0300 From: Murilo Opsfelder Araujo To: LEROY Christophe Cc: linux-kernel@vger.kernel.org, "Alastair D'Silva" , Andrew Donnellan , Balbir Singh , Benjamin Herrenschmidt , Cyril Bur , "Eric W . Biederman" , Joe Perches , Michael Ellerman , Michael Neuling , Nicholas Piggin , Paul Mackerras , Simon Guo , Sukadev Bhattiprolu , "Tobin C . Harding" , linuxppc-dev@lists.ozlabs.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> <20180727184023.Horde.KRXPzZpG18uxt_B9sy_FBg5@messagerie.si.c-s.fr> <20180730152838.GA23704@kermit-br-ibm-com> <20180730183047.Horde.g9hQ_3EXmF6St0upNs2DDw1@messagerie.si.c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180730183047.Horde.g9hQ_3EXmF6St0upNs2DDw1@messagerie.si.c-s.fr> User-Agent: Mutt/1.10.0 (2018-05-17) X-TM-AS-GCONF: 00 x-cbid: 18073023-0064-0000-0000-00000331AB7F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009459; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01068241; UDB=6.00549135; IPR=6.00846371; MB=3.00022414; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-30 23:17:46 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18073023-0065-0000-0000-00003A2027FF Message-Id: <20180730231738.GA20351@kermit-br-ibm-com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-30_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1807300245 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Christophe. On Mon, Jul 30, 2018 at 06:30:47PM +0200, LEROY Christophe wrote: > Murilo Opsfelder Araujo a ?crit?: > > > Hi, Christophe. > > > > On Fri, Jul 27, 2018 at 06:40:23PM +0200, LEROY Christophe wrote: > > > 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 ? > > > > Yes. > > > > > Won't it change the behaviour for a 32 bits app running on a 64bits kernel ? > > > > In fact, this changes how many zeroes are prefixed when displaying the > > registers > > (%016lx vs. %08lx format). For example, 32-bits userspace, 64-bits kernel: > > Indeed that's what I suspected. What is the real benefit of this change ? > Why not keep the current format for 32bits userspace ? All those leading > zeroes are pointless to me. One of the benefits is simplifying the code by removing some checks. Another is deduplicating almost identical format strings in favor of a unified one. After reading Joe's comment [1], %px seems to be the format we're looking for. An extract from Documentation/core-api/printk-formats.rst: "%px is functionally equivalent to %lx (or %lu). %px is preferred because it is more uniquely grep'able." So I guess we don't need to worry about the format (%016lx vs. %08lx), let's just use %px, as per the guideline. [1] https://lore.kernel.org/lkml/26f07092cdde378ebb42c1034badde1b56521c36.camel@perches.com/ Cheers Murilo