From: Marc Zyngier <marc.zyngier@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 2/2] genirq/debugfs: Reinstate full OF path for domain name
Date: Mon, 1 Oct 2018 11:05:22 +0100 [thread overview]
Message-ID: <20181001100522.180054-3-marc.zyngier@arm.com> (raw)
In-Reply-To: <20181001100522.180054-1-marc.zyngier@arm.com>
On a DT based system, we use the of_node full name to name the
corresponding irq domain. We expect that name to be unique, so
so that domains with the same base name won't clash (this
happens on multi-node topologies, for example).
Since a7e4cfb0a7ca ("of/fdt: only store the device node basename
in full_name"), of_node_full_name() lies and only returns the
basename. This breaks the above requirement, and we end-up with
only a subset of the domains in /sys/kernel/debug/irq/domains.
Let's reinstate the feature by using the fancy new %pOF format
specifier, which happens to do the right thing.
Fixes: a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
kernel/irq/irqdomain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 95a0acbdd4e6..3b30a4aeb0db 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -183,7 +183,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
* unhappy about. Replace them with ':', which does
* the trick and is not as offensive as '\'...
*/
- name = kstrdup(of_node_full_name(of_node), GFP_KERNEL);
+ name = kasprintf(GFP_KERNEL, "%pOF", of_node);
if (!name) {
kfree(domain);
return NULL;
--
2.19.0
next prev parent reply other threads:[~2018-10-01 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 10:05 [PATCH 0/2] irqdomain debufs fixes for 4.20 Marc Zyngier
2018-10-01 10:05 ` [PATCH 1/2] genirq/debugfs: Reset domain debugfs_file on removal of the debugfs file Marc Zyngier
2018-10-01 10:27 ` [tip:irq/core] " tip-bot for Marc Zyngier
2018-10-01 10:05 ` Marc Zyngier [this message]
2018-10-01 10:28 ` [tip:irq/core] genirq/debugfs: Reinstate full OF path for domain name tip-bot for Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181001100522.180054-3-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®