Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752199AbeAQE41 (ORCPT + 1 other); Tue, 16 Jan 2018 23:56:27 -0500 Received: from mx01.hxt-semitech.com.96.203.223.in-addr.arpa ([223.203.96.7]:54140 "EHLO barracuda.hxt-semitech.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750908AbeAQE40 (ORCPT ); Tue, 16 Jan 2018 23:56:26 -0500 X-Greylist: delayed 1001 seconds by postgrey-1.27 at vger.kernel.org; Tue, 16 Jan 2018 23:56:24 EST X-ASG-Debug-ID: 1516163978-093b7e0d7734360001-xx1T2L X-Barracuda-Envelope-From: shunyong.yang@hxt-semitech.com From: Yang Shunyong To: CC: , , Yang Shunyong Subject: [PATCH] irqdomain: provide useful debugging information for irq domain Date: Wed, 17 Jan 2018 12:37:57 +0800 X-ASG-Orig-Subj: [PATCH] irqdomain: provide useful debugging information for irq domain Message-ID: <1516163877-32396-1-git-send-email-shunyong.yang@hxt-semitech.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.5.21.109] X-ClientProxiedBy: HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) To HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) X-Barracuda-Connect: localhost[10.128.0.15] X-Barracuda-Start-Time: 1516163978 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.7758 1.0000 1.9995 X-Barracuda-Spam-Score: 2.00 X-Barracuda-Spam-Status: No, SCORE=2.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.46958 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: With recent hashed kernel pointers change, output with %p will output hashed address. This patch changes %p to %px in irq domain debug information. As unprivileged user has no permission to mount debugfs or set printk level to KERN_DEBUG to access the information, changes in this patch are appropriate. Signed-off-by: Yang Shunyong --- kernel/irq/irqdomain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 62068ad..d40fbed 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -75,7 +75,7 @@ struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id, n = kasprintf(GFP_KERNEL, "%s-%d", name, id); break; default: - n = kasprintf(GFP_KERNEL, "irqchip@%p", data); + n = kasprintf(GFP_KERNEL, "irqchip@%px", data); break; } @@ -450,7 +450,7 @@ EXPORT_SYMBOL_GPL(irq_domain_check_msi_remap); */ void irq_set_default_host(struct irq_domain *domain) { - pr_debug("Default domain set to @0x%p\n", domain); + pr_debug("Default domain set to @0x%px\n", domain); irq_default_domain = domain; } @@ -635,7 +635,7 @@ unsigned int irq_create_mapping(struct irq_domain *domain, struct device_node *of_node; int virq; - pr_debug("irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq); + pr_debug("%s(0x%px, 0x%lx)\n", __func__, domain, hwirq); /* Look for default domain if nececssary */ if (domain == NULL) @@ -644,7 +644,7 @@ unsigned int irq_create_mapping(struct irq_domain *domain, WARN(1, "%s(, %lx) called with NULL domain\n", __func__, hwirq); return 0; } - pr_debug("-> using domain @%p\n", domain); + pr_debug("-> using domain @%px\n", domain); of_node = irq_domain_get_of_node(domain); @@ -921,7 +921,7 @@ static void virq_debug_show_one(struct seq_file *m, struct irq_desc *desc) chip = irq_data_get_irq_chip(data); seq_printf(m, "%-15s ", (chip && chip->name) ? chip->name : "none"); - seq_printf(m, "0x%p ", irq_data_get_irq_chip_data(data)); + seq_printf(m, "0x%px ", irq_data_get_irq_chip_data(data)); seq_printf(m, " %c ", (desc->action && desc->action->handler) ? '*' : ' '); direct = (irq == hwirq) && (irq < domain->revmap_direct_max_irq); -- 2.7.4