Received: by 10.223.176.5 with SMTP id f5csp844816wra; Fri, 9 Feb 2018 08:07:15 -0800 (PST) X-Google-Smtp-Source: AH8x226Rg8bHjlcaFb/r/v0uw5pfsFN7eB9i+1lO9ROnkjhSFJgHe6LwKIp6QYyA4Nm5opDCg2Fz X-Received: by 2002:a17:902:261:: with SMTP id 88-v6mr1413098plc.384.1518192435381; Fri, 09 Feb 2018 08:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518192435; cv=none; d=google.com; s=arc-20160816; b=BgjoqD3M3loxCFX9DmkmT4lwnJp1syVuRrmYuCsqIQtAKYEx46tf6/pIK0wGSwY7c+ oZT/S9yY+7iiU2DuH3Tc9L/PPCDhFZnBbbmdDkAQclUBHa0yPzK6J8QWCt+/wysELnbR Y6fgF05pjaJfzUsixYvBkYi2kYa2A0HU26TPFxGPeSIRx9/y5Pl8C5wvux3qgcmNIcdD d9AWsFa6wFVTctglas8KZtt5qtYUs7Ok5qhoJ8K0IvbFw6N6fbg/ua4dAHP/U3p4Wukj y3/YaKy7R4w5X9+5gxvyAGiJo+68aZoWyXU7RJBXY9a1eXsJjeh76daqVaz6AVDUXzpo EE7Q== 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-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=5lpbAB709x66TmWc6W/mJLf8F3aSFeY9zeZKCcPKyZE=; b=vfhijLTz7YH0pxxk8H5Pe6lhbcU1/OF1Fm69fILJM0KLVn4tWQeiEZiaCSHEfTei9+ rOERE2XwozpCf3Iaxut0D0VmHhcLjT3SZ/XVJSoq+C3EU2x+QeEjKZls02XTa9D0pCQZ hmBJAusQ9z6g8pLrQtAOks87XtY0XU8htQz3/iY40lcxBABSHke/Uk+4PDXEZo5VaNw1 xnTA2sBE51U5dNLn8Y9wl0Zzou3Xf9cDQeeYOtbq9yerKtGec+9q5buQvjjhdfvevDjV uZ7kApzLGda3xpFS+bJOtfP+32GwEgxU6OxrNGFw2iOH5G3l/Nyrc0e1yWRuSBhYIA+2 yI1w== 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 x79si1908893pfk.1.2018.02.09.08.06.59; Fri, 09 Feb 2018 08:07:15 -0800 (PST) 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 S1751285AbeBIQE6 (ORCPT + 99 others); Fri, 9 Feb 2018 11:04:58 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:48784 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbeBIQE5 (ORCPT ); Fri, 9 Feb 2018 11:04:57 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0FD181435; Fri, 9 Feb 2018 08:04:57 -0800 (PST) Received: from [10.1.207.62] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 241A33F487; Fri, 9 Feb 2018 08:04:55 -0800 (PST) Subject: Re: [PATCH] irqchip: Use %px to print pointer value To: Florian Fainelli , Jaedon Shin , Thomas Gleixner , Jason Cooper Cc: Kevin Cernekee , Brian Norris , Gregory Fong , bcm-kernel-feedback-list@broadcom.com, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180209021031.20631-1-jaedon.shin@gmail.com> <45424653-235D-4C4B-8908-417943F5283C@gmail.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: <6bf05e81-2334-f3ac-08a7-e53ee59bb4c0@arm.com> Date: Fri, 9 Feb 2018 16:04:53 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <45424653-235D-4C4B-8908-417943F5283C@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/18 15:54, Florian Fainelli wrote: > On February 9, 2018 12:51:33 AM PST, Marc Zyngier wrote: >> On 09/02/18 02:10, Jaedon Shin wrote: >>> Since commit ad67b74d2469 ("printk: hash addresses printed with %p") >>> pointers printed with %p are hashed. Use %px instead of %p to print >>> pointer value. >>> >>> Signed-off-by: Jaedon Shin >>> --- >>> drivers/irqchip/irq-bcm7038-l1.c | 2 +- >>> drivers/irqchip/irq-bcm7120-l2.c | 2 +- >>> drivers/irqchip/irq-brcmstb-l2.c | 2 +- >>> 3 files changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/irqchip/irq-bcm7038-l1.c >> b/drivers/irqchip/irq-bcm7038-l1.c >>> index 55cfb986225b..f604c1d89b3b 100644 >>> --- a/drivers/irqchip/irq-bcm7038-l1.c >>> +++ b/drivers/irqchip/irq-bcm7038-l1.c >>> @@ -339,7 +339,7 @@ int __init bcm7038_l1_of_init(struct device_node >> *dn, >>> goto out_unmap; >>> } >>> >>> - pr_info("registered BCM7038 L1 intc (mem: 0x%p, IRQs: %d)\n", >>> + pr_info("registered BCM7038 L1 intc (mem: 0x%px, IRQs: %d)\n", >>> intc->cpus[0]->map_base, IRQS_PER_WORD * intc->n_words); >>> >>> return 0; >>> diff --git a/drivers/irqchip/irq-bcm7120-l2.c >> b/drivers/irqchip/irq-bcm7120-l2.c >>> index 983640eba418..1cc4dd1d584a 100644 >>> --- a/drivers/irqchip/irq-bcm7120-l2.c >>> +++ b/drivers/irqchip/irq-bcm7120-l2.c >>> @@ -318,7 +318,7 @@ static int __init bcm7120_l2_intc_probe(struct >> device_node *dn, >>> } >>> } >>> >>> - pr_info("registered %s intc (mem: 0x%p, parent IRQ(s): %d)\n", >>> + pr_info("registered %s intc (mem: 0x%px, parent IRQ(s): %d)\n", >>> intc_name, data->map_base[0], data->num_parent_irqs); >>> >>> return 0; >>> diff --git a/drivers/irqchip/irq-brcmstb-l2.c >> b/drivers/irqchip/irq-brcmstb-l2.c >>> index 691d20eb0bec..6760edeeb666 100644 >>> --- a/drivers/irqchip/irq-brcmstb-l2.c >>> +++ b/drivers/irqchip/irq-brcmstb-l2.c >>> @@ -262,7 +262,7 @@ static int __init brcmstb_l2_intc_of_init(struct >> device_node *np, >>> ct->chip.irq_set_wake = irq_gc_set_wake; >>> } >>> >>> - pr_info("registered L2 intc (mem: 0x%p, parent irq: %d)\n", >>> + pr_info("registered L2 intc (mem: 0x%px, parent irq: %d)\n", >>> base, parent_irq); >>> >>> return 0; >>> >> >> Why is that something useful to do? This just tells you where the >> device >> is mapped in the VA space, and I doubt that's a useful information, >> hashed pointers or not. Am I missing something obvious? > > No you are right there is not much value in printing the register > virtual address (sometimes there is e.g: on MIPS) either we fix the > prints to show the physical address of the base register or we could > possibly drop the prints entirely. Displaying the PA can be useful if you have several identical blocks in your system and you want to be able to identify them. Given that there is probably only one of these controllers per system, the address is pretty pointless. If you send me a patch removing the prints, I'll queue it. Thanks, M. -- Jazz is not dead. It just smells funny...