All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] migration/prrn instrumentation tweaks
@ 2019-06-27  5:30 Nathan Lynch
  2019-06-27  5:30 ` [PATCH 1/2] powerpc/pseries/mobility: set pr_fmt Nathan Lynch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nathan Lynch @ 2019-06-27  5:30 UTC (permalink / raw)
  To: linuxppc-dev

Mainly this produces better information about what's happening with
the device tree as a result of LPM or PRRN.

Nathan Lynch (2):
  powerpc/pseries/mobility: set pr_fmt
  powerpc/pseries/mobility: add pr_debug for device tree changes

 arch/powerpc/platforms/pseries/mobility.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

-- 
2.20.1


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

* [PATCH 1/2] powerpc/pseries/mobility: set pr_fmt
  2019-06-27  5:30 [PATCH 0/2] migration/prrn instrumentation tweaks Nathan Lynch
@ 2019-06-27  5:30 ` Nathan Lynch
  2019-06-27  5:30 ` [PATCH 2/2] powerpc/pseries/mobility: add pr_debug for device tree changes Nathan Lynch
  2020-08-02 13:35 ` [PATCH 0/2] migration/prrn instrumentation tweaks Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Lynch @ 2019-06-27  5:30 UTC (permalink / raw)
  To: linuxppc-dev

The pr_err callsites in mobility.c already manually include a
"mobility:" prefix, let's make it official for the benefit of messages
to be added later.

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

diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index b8c8096907d4..f9a1287925a8 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -9,6 +9,9 @@
  * 2 as published by the Free Software Foundation.
  */
 
+
+#define pr_fmt(fmt) "mobility: " fmt
+
 #include <linux/cpu.h>
 #include <linux/kernel.h>
 #include <linux/kobject.h>
@@ -418,11 +421,11 @@ static int __init mobility_sysfs_init(void)
 
 	rc = sysfs_create_file(mobility_kobj, &class_attr_migration.attr);
 	if (rc)
-		pr_err("mobility: unable to create migration sysfs file (%d)\n", rc);
+		pr_err("unable to create migration sysfs file (%d)\n", rc);
 
 	rc = sysfs_create_file(mobility_kobj, &class_attr_api_version.attr.attr);
 	if (rc)
-		pr_err("mobility: unable to create api_version sysfs file (%d)\n", rc);
+		pr_err("unable to create api_version sysfs file (%d)\n", rc);
 
 	return 0;
 }
-- 
2.20.1


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

* [PATCH 2/2] powerpc/pseries/mobility: add pr_debug for device tree changes
  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
  2020-08-02 13:35 ` [PATCH 0/2] migration/prrn instrumentation tweaks Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Lynch @ 2019-06-27  5:30 UTC (permalink / raw)
  To: linuxppc-dev

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


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

* Re: [PATCH 0/2] migration/prrn instrumentation tweaks
  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 ` [PATCH 2/2] powerpc/pseries/mobility: add pr_debug for device tree changes Nathan Lynch
@ 2020-08-02 13:35 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-08-02 13:35 UTC (permalink / raw)
  To: linuxppc-dev, Nathan Lynch

On Thu, 27 Jun 2019 00:30:42 -0500, Nathan Lynch wrote:
> Mainly this produces better information about what's happening with
> the device tree as a result of LPM or PRRN.
> 
> Nathan Lynch (2):
>   powerpc/pseries/mobility: set pr_fmt
>   powerpc/pseries/mobility: add pr_debug for device tree changes
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc/pseries/mobility: Set pr_fmt()
      https://git.kernel.org/powerpc/c/494a66f34e00b6a1897b5a1ab150a19265696b17
[2/2] powerpc/pseries/mobility: Add pr_debug() for device tree changes
      https://git.kernel.org/powerpc/c/5d8b1f9dea17b4bf5e5f088f39eeab32c7e487be

cheers

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

end of thread, other threads:[~2020-08-02 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] powerpc/pseries/mobility: add pr_debug for device tree changes Nathan Lynch
2020-08-02 13:35 ` [PATCH 0/2] migration/prrn instrumentation tweaks Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.