linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <nathanl@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 2/2] powerpc/pseries/mobility: add pr_debug for device tree changes
Date: Thu, 27 Jun 2019 00:30:44 -0500	[thread overview]
Message-ID: <20190627053044.9238-3-nathanl@linux.ibm.com> (raw)
In-Reply-To: <20190627053044.9238-1-nathanl@linux.ibm.com>

When investigating issues with partition migration or resource
reassignments it is helpful to have a log of which nodes and
properties in the device tree have changed. Use pr_debug() so it's
easy to enable these at runtime with the dynamic debug facility.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
 arch/powerpc/platforms/pseries/mobility.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index f9a1287925a8..5270ac00279b 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -69,6 +69,8 @@ static int delete_dt_node(__be32 phandle)
 	if (!dn)
 		return -ENOENT;
 
+	pr_debug("removing node %pOFfp\n", dn);
+
 	dlpar_detach_node(dn);
 	of_node_put(dn);
 	return 0;
@@ -127,6 +129,7 @@ static int update_dt_property(struct device_node *dn, struct property **prop,
 	}
 
 	if (!more) {
+		pr_debug("updating node %pOF property %s\n", dn, name);
 		of_update_property(dn, new_prop);
 		*prop = NULL;
 	}
@@ -241,6 +244,8 @@ static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
 	if (rc)
 		dlpar_free_cc_nodes(dn);
 
+	pr_debug("added node %pOFfp\n", dn);
+
 	of_node_put(parent_dn);
 	return rc;
 }
@@ -256,6 +261,7 @@ static void prrn_update_node(__be32 phandle)
 	 */
 	dn = of_find_node_by_phandle(be32_to_cpu(phandle));
 	if (dn) {
+		pr_debug("ignoring PRRN for %pOFfp\n", dn);
 		of_node_put(dn);
 		return;
 	}
@@ -265,6 +271,8 @@ static void prrn_update_node(__be32 phandle)
 	hp_elog.id_type = PSERIES_HP_ELOG_ID_DRC_INDEX;
 	hp_elog._drc_u.drc_index = phandle;
 
+	pr_debug("handling PRRN for LMB DRC index 0x%x\n", be32_to_cpu(phandle));
+
 	handle_dlpar_errorlog(&hp_elog);
 }
 
-- 
2.20.1


  parent reply	other threads:[~2019-06-27  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27  5:30 [PATCH 0/2] migration/prrn instrumentation tweaks Nathan Lynch
2019-06-27  5:30 ` [PATCH 1/2] powerpc/pseries/mobility: set pr_fmt Nathan Lynch
2019-06-27  5:30 ` Nathan Lynch [this message]
2020-08-02 13:35 ` [PATCH 0/2] migration/prrn instrumentation tweaks Michael Ellerman

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=20190627053044.9238-3-nathanl@linux.ibm.com \
    --to=nathanl@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).