Received: by 10.223.185.116 with SMTP id b49csp2695128wrg; Mon, 12 Feb 2018 14:19:26 -0800 (PST) X-Google-Smtp-Source: AH8x226+ZwBXmiFKI8XJV8n9Q5T4oxiBaJIqnP6olnAGHJt6kYizYMsj4SZcC7cNLM1nAAnXAbIL X-Received: by 10.98.174.26 with SMTP id q26mr12950525pff.92.1518473966557; Mon, 12 Feb 2018 14:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518473966; cv=none; d=google.com; s=arc-20160816; b=YnVpgVJZo+H62fIEBdREy32RwP7rHYaHaP4DnBig25JGtWkrg4+Sp5zUWXimw1cgDg HRX9/TIzwunpryl98aZ5nkh0jIOKo7T45Pucf1WFhcD/aLjxzbCaoKHr63Ew+6a3lM/c mCjwDOSRSpBIhV8knOWRSVeE04hQgUOurZaZnPAthI0g9EMKXSUlPxiohogbWD0fDxht W3cmPgH28M+hrcMxGcUV9Lzi+e/ylvj6s4C3l2+ZlsebUKO/gX6nf/YZk7/tsWibnteA NmiQoozmpwUpa2ZXQGebkpMg55R/ejbVTqJ2Kt3sshZkaG+8j7jOUqigziqN3PeB1ixc svDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Eagvr0K+YHaMC6P2qbIxiyZ9hrIDZGrkCABxeUMMKq0=; b=ZI3JjZVwybwb2GRjhd8cY93C8oH9pSUuL7wbilRUDhqXHdC0SxIaJGa/gu+s48y5XE t3gyKbWHQKk9WP96ef95zj9I8be/dG4E0KZfnHjcIKpX8Q0CxN0Zs0oFDmrz+O5xNgfe b1rhH57urQGL+5u/NZLa+Nuot+afUO4tMFUBojI0yV88anDPZ/fs9iOzG4+E/OeJ4Rpl glAtCBDHmzZYU2PBIXGVcAqJFgY/542amz32Q9mSypmMTa5gNcBgdWE1XsPhMX/CjtRx tnL3mhN1zR4WOShw6THmKQlbWPSLtTomlhV5TPevFUms3d+s4zWt51VESW4lyW6GWDIB qSWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E1/EYJ+g; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s187si5613914pgb.765.2018.02.12.14.19.11; Mon, 12 Feb 2018 14:19:26 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E1/EYJ+g; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932651AbeBLWSK (ORCPT + 99 others); Mon, 12 Feb 2018 17:18:10 -0500 Received: from mail-vk0-f67.google.com ([209.85.213.67]:37865 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932504AbeBLWSI (ORCPT ); Mon, 12 Feb 2018 17:18:08 -0500 Received: by mail-vk0-f67.google.com with SMTP id o2so3910691vkc.4 for ; Mon, 12 Feb 2018 14:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Eagvr0K+YHaMC6P2qbIxiyZ9hrIDZGrkCABxeUMMKq0=; b=E1/EYJ+gImJwPelG7Zwyw060mF8Wtnp6vwM+ObjfKlyBEmFJ9ySOiRgJIYmBS+hSQi l65VIVKxy9sGeZk8cq1R8/JyBoAxdyyqvexZsJ9tzBus+ymWhCnKUuFC4uPDL4oFhG8c qj5Lwz1+s/Lp9GfbEe3uHgeTqcuKd5TnH8np/iE7sv3AJYFBY/jOsLkgihKoWr9/Az0a BElUnMjIdUtPhNkXFPFDVc/xeJ7QeNUW8ZhS++YrnVQ6wDF5be+Y/xm73addux165JQz xNCx0zd0GEFqEJvm4HVItdwNidfThborRshWyRdO6wVKciJ0kzm7HsveIwIjZxf5nrbs s1gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Eagvr0K+YHaMC6P2qbIxiyZ9hrIDZGrkCABxeUMMKq0=; b=G2podls/0cULDTgOIkSD3T6gKfGPzORp5fFUO6dtUjBesVsF0jze3ZnGesVuB4ezOG R6grJQ2wTTuSiLExekyRvvYvcI+x9/gDjyA+PrKBF8qdj2MwS1Wc0wxFM+iGLZK2jxKX N45IOfO3A3qAsoJ6tRSmxcyHUudnk9klgeDL6jyJgZAzsrdoUPBjAHIj3QsJuqRFxfqA o070Q3T2BAP6+4Y16dBL52ex6H6Hqhe7qpBmOrfRHJuTxpwG8o9jfOvZr2TWmB6fU6rt fKBDN0J6dyVfP6wzIRrWGFqNHzKirCnhvlNAg/Vs+12miXQj/afIGerIYpq9nY+jIihY Wscw== X-Gm-Message-State: APf1xPBAQYPexQR3IEjLjZFaFJxb6IsO3fNw3wYS1kmRH1n5jvrVuVWl do1I+Fw4nw+6EwzDjuS4BYz6gf5TeJCZ7fv7XXU= X-Received: by 10.31.73.199 with SMTP id w190mr11603045vka.108.1518473887515; Mon, 12 Feb 2018 14:18:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.89.198 with HTTP; Mon, 12 Feb 2018 14:17:47 -0800 (PST) In-Reply-To: <6bf05e81-2334-f3ac-08a7-e53ee59bb4c0@arm.com> References: <20180209021031.20631-1-jaedon.shin@gmail.com> <45424653-235D-4C4B-8908-417943F5283C@gmail.com> <6bf05e81-2334-f3ac-08a7-e53ee59bb4c0@arm.com> From: Jonas Gorski Date: Mon, 12 Feb 2018 23:17:47 +0100 Message-ID: Subject: Re: [PATCH] irqchip: Use %px to print pointer value To: Marc Zyngier Cc: Florian Fainelli , Jaedon Shin , Thomas Gleixner , Jason Cooper , Kevin Cernekee , Brian Norris , Gregory Fong , bcm-kernel-feedback-list , MIPS Mailing List , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9 February 2018 at 17:04, Marc Zyngier wrote: > 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. Multiple instances are actually quite common in the STB SoCs, e.g. bcm7362 has one instance of bcm7038-l1, two instances of bcm7120-l2 and four instances of brcmstb-l2. Regards Jonas P.S: Also What about bcm6345-l1? It also prints it's mapped VAs, not the PAs.