mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irqdomain: provide useful debugging information for irq domain
@ 2018-01-17  4:37 Yang Shunyong
  2018-01-17  8:37 ` Marc Zyngier
  0 siblings, 1 reply; 13+ messages in thread
From: Yang Shunyong @ 2018-01-17  4:37 UTC (permalink / raw)
  To: marc.zyngier; +Cc: tglx, linux-kernel, Yang Shunyong

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 <shunyong.yang@hxt-semitech.com>
---
 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-01-18 12:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17  4:37 [PATCH] irqdomain: provide useful debugging information for irq domain Yang Shunyong
2018-01-17  8:37 ` Marc Zyngier
2018-01-17  9:18   ` Thomas Gleixner
2018-01-17  9:26     ` Marc Zyngier
2018-01-17  9:26     ` Yang, Shunyong
2018-01-17  9:33       ` Thomas Gleixner
     [not found]         ` <1516182426.3280.19.camel@hxt-semitech.com>
2018-01-17  9:56           ` [此邮件可能存在风险] " Marc Zyngier
     [not found]           ` <alpine.DEB.2.20.1801171056330.1777@nanos>
2018-01-17 10:20             ` Yang, Shunyong
2018-01-17 10:41               ` Thomas Gleixner
2018-01-17 10:43               ` Marc Zyngier
2018-01-18  1:53                 ` Yang, Shunyong
2018-01-18  8:54                   ` Marc Zyngier
2018-01-18 12:06                     ` Yang, Shunyong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®