Skip to contentSkip to conversation

powerpc/pseries: delete scanlog

PATCH Applied Nathan Lynch 3 participants 6 messages Sep 20, 2021 – Nov 25, 2021 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/pseries: delete scanlog

Remove the pseries scanlog driver.

This code supports functions from Power4-era servers that are not present on targets currently supported by arch/powerpc. System manuals from this time have this description:

Scan Dump data is a set of chip data that the service processor gathers after a system malfunction. It consists of chip scan rings, chip trace arrays, and Scan COM (SCOM) registers. This data is stored in the scan-log partition of the system’s Nonvolatile Random Access Memory (NVRAM).

PowerVM partition firmware development doesn't recognize the associated function call or property, and they don't see any references to them in their codebase. It seems to have been specific to non-virtualized pseries.

References:

Historical Linux commit from February 2003 (interesting to note this seems to be the source of non-GPL exports for rtas_call etc):
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=f92e361842d5251e50562b09664082dcbd0548bb

IntelliStation and pSeries docs which refer to the feature:
http://ps-2.retropc.se/basil.holloway/ALL%20PDF/380635.pdf
http://ps-2.kev009.com/rs6000/manuals/p/p615-6C3-6E3/6C3_and_6E3_Users_Guide_SA38-0629.pdf

---
 arch/powerpc/configs/ppc64_defconfig     |   1 -
 arch/powerpc/configs/pseries_defconfig   |   1 -
 arch/powerpc/platforms/pseries/Kconfig   |   4 -
 arch/powerpc/platforms/pseries/Makefile  |   1 -
 arch/powerpc/platforms/pseries/scanlog.c | 195 -----------------------
 5 files changed, 202 deletions(-)
 delete mode 100644 arch/powerpc/platforms/pseries/scanlog.c
arch/powerpc/configs/ppc64_defconfig +0 -1
index 0ad2291337a7..846815007fef 100644
@@ -26,7 +26,6 @@ CONFIG_PPC64=y
 CONFIG_NR_CPUS=2048
 CONFIG_PPC_SPLPAR=y
 CONFIG_DTL=y
-CONFIG_SCANLOG=m
 CONFIG_PPC_SMLPAR=y
 CONFIG_IBMEBUS=y
 CONFIG_PPC_SVM=y
arch/powerpc/configs/pseries_defconfig +0 -1
index b183629f1bcf..42a72e6d5b35 100644
@@ -38,7 +38,6 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_PPC_SPLPAR=y
 CONFIG_DTL=y
-CONFIG_SCANLOG=m
 CONFIG_PPC_SMLPAR=y
 CONFIG_IBMEBUS=y
 CONFIG_PAPR_SCM=m
arch/powerpc/platforms/pseries/Kconfig +0 -4
index 5e037df2a3a1..bf9b612a929b 100644
@@ -61,10 +61,6 @@ config PSERIES_ENERGY
 	  Provides: /sys/devices/system/cpu/pseries_(de)activation_hint_list
 	  and /sys/devices/system/cpu/cpuN/pseries_(de)activation_hint
 
-config SCANLOG
-	tristate "Scanlog dump interface"
-	depends on RTAS_PROC && PPC_PSERIES
-
 config IO_EVENT_IRQ
 	bool "IO Event Interrupt support"
 	depends on PPC_PSERIES
arch/powerpc/platforms/pseries/Makefile +0 -1
index 4cda0ef87be0..2f9ae0c113e3 100644
@@ -8,7 +8,6 @@ obj-y			:= lpar.o hvCall.o nvram.o reconfig.o \
 			   firmware.o power.o dlpar.o mobility.o rng.o \
 			   pci.o pci_dlpar.o eeh_pseries.o msi.o
 obj-$(CONFIG_SMP)	+= smp.o
-obj-$(CONFIG_SCANLOG)	+= scanlog.o
 obj-$(CONFIG_KEXEC_CORE)	+= kexec.o
 obj-$(CONFIG_PSERIES_ENERGY)	+= pseries_energy.o
 
arch/powerpc/platforms/pseries/scanlog.c deleted +0 -195

195 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw
Quoted 12 lines · Nathan Lynch

Remove the pseries scanlog driver.

This code supports functions from Power4-era servers that are not present on targets currently supported by arch/powerpc. System manuals from this time have this description:

Scan Dump data is a set of chip data that the service processor gathers after a system malfunction. It consists of chip scan rings, chip trace arrays, and Scan COM (SCOM) registers. This data is stored in the scan-log partition of the system’s Nonvolatile Random Access Memory (NVRAM).

Quoted 4 lines

PowerVM partition firmware development doesn't recognize the associated function call or property, and they don't see any references to them in their codebase. It seems to have been specific to non-virtualized pseries.

Just bumping this to see if there are any objections.

#2 lore raw
Quoted 13 lines · Nathan Lynch
Quoted 12 lines · Nathan Lynch

Remove the pseries scanlog driver.

This code supports functions from Power4-era servers that are not present on targets currently supported by arch/powerpc. System manuals from this time have this description:

Scan Dump data is a set of chip data that the service processor gathers after a system malfunction. It consists of chip scan rings, chip trace arrays, and Scan COM (SCOM) registers. This data is stored in the scan-log partition of the system’s Nonvolatile Random Access Memory (NVRAM).

Quoted 6 lines
Quoted 4 lines

PowerVM partition firmware development doesn't recognize the associated function call or property, and they don't see any references to them in their codebase. It seems to have been specific to non-virtualized pseries.

Just bumping this to see if there are any objections.

Not an objection, I like nothing better than dropping old unused cruft, but are we sure it's safe to remove the proc file?

I see that rtas_errd still looks for it, have you checked that it will handle the absence of the file gracefully and continue doing whatever else it does?

On further inspection it looks like the code that looks for it in rtas_errd is #if 0'ed out (??), so maybe it's dead.

Anyway if you can test that rtas_errd still works that'd be good.

Presumably there's no other code that cares about the proc file.

cheers

#3 lore raw
Quoted 19 lines · Michael Ellerman
Quoted 18 lines · Nathan Lynch
Quoted 16 lines · Nathan Lynch

Remove the pseries scanlog driver.

This code supports functions from Power4-era servers that are not present on targets currently supported by arch/powerpc. System manuals from this time have this description:

Scan Dump data is a set of chip data that the service processor gathers after a system malfunction. It consists of chip scan rings, chip trace arrays, and Scan COM (SCOM) registers. This data is stored in the scan-log partition of the system’s Nonvolatile Random Access Memory (NVRAM).

PowerVM partition firmware development doesn't recognize the associated function call or property, and they don't see any references to them in their codebase. It seems to have been specific to non-virtualized pseries.

Quoted 8 lines
Quoted 1 line

Just bumping this to see if there are any objections.

Not an objection, I like nothing better than dropping old unused cruft, but are we sure it's safe to remove the proc file?

I see that rtas_errd still looks for it, have you checked that it will handle the absence of the file gracefully and continue doing whatever else it does?

Uhh. I will stop forgetting to check ppc64_diag when making such changes. Thanks for pointing this out.

Quoted 2 lines

On further inspection it looks like the code that looks for it in rtas_errd is #if 0'ed out (??), so maybe it's dead.

Yes it seems so. From rtas_errd's main():

#if 0
	/* 
	 * Check to see if a new scanlog dump is available;  if so, copy it to
	 * the filesystem and associate the dump with the first error processed.
	 */
	check_scanlog_dump();

#endif

And that's the only entry point into the code that collects the scanlog data. And that dead code appears to deal with the absence of /proc/ppc64/scan-log-dump gracefully. It has been like that since initial git import in 2013.

Quoted 1 line

Anyway if you can test that rtas_errd still works that'd be good.

I've verified that it starts normally and logs EPOW events associated with partition migration.

Quoted 1 line

Presumably there's no other code that cares about the proc file.

AFAIK this is right. powerpc-utils and librtas do not use it. librtas has a wrapper for the calling the associated RTAS function directly, but that's fine.

I tried using GitHub's search to find instances of "scan-log-dump" that weren't from Linux or ppc64_diag (need to be logged in I think):

https://github.com/search?q=%22scan-log-dump%22+-path%3Aarch%2Fpowerpc+-filename%3Ascanlog.c+-extension%3Apatch&type=Code&ref=advsearch&l=&l=

This hasn't yielded any unexpected users. There may be better search terms but that's what a few minutes of fiddling with it got me.

#4 lore raw
Quoted 25 lines · Nathan Lynch
Quoted 24 lines · Michael Ellerman
Quoted 13 lines · Nathan Lynch
Quoted 12 lines · Nathan Lynch

Remove the pseries scanlog driver.

This code supports functions from Power4-era servers that are not present on targets currently supported by arch/powerpc. System manuals from this time have this description:

Scan Dump data is a set of chip data that the service processor gathers after a system malfunction. It consists of chip scan rings, chip trace arrays, and Scan COM (SCOM) registers. This data is stored in the scan-log partition of the system’s Nonvolatile Random Access Memory (NVRAM).

Quoted 6 lines
Quoted 4 lines

PowerVM partition firmware development doesn't recognize the associated function call or property, and they don't see any references to them in their codebase. It seems to have been specific to non-virtualized pseries.

Just bumping this to see if there are any objections.

Not an objection, I like nothing better than dropping old unused cruft, but are we sure it's safe to remove the proc file?

Quoted 6 lines
Quoted 3 lines

I see that rtas_errd still looks for it, have you checked that it will handle the absence of the file gracefully and continue doing whatever else it does?

Uhh. I will stop forgetting to check ppc64_diag when making such changes. Thanks for pointing this out.

No worries.

Quoted 11 lines
Quoted 2 lines

On further inspection it looks like the code that looks for it in rtas_errd is #if 0'ed out (??), so maybe it's dead.

Yes it seems so. From rtas_errd's main():

#if 0
	/* 
	 * Check to see if a new scanlog dump is available;  if so, copy it to
	 * the filesystem and associate the dump with the first error processed.
	 */
	check_scanlog_dump();
Quoted 6 lines

#endif

And that's the only entry point into the code that collects the scanlog data. And that dead code appears to deal with the absence of /proc/ppc64/scan-log-dump gracefully. It has been like that since initial git import in 2013.

OK, I guess it came from sourceforge before that. But I'm not going to start digging there, that's long enough ago that it shouldn't matter.

Quoted 4 lines
Quoted 1 line

Anyway if you can test that rtas_errd still works that'd be good.

I've verified that it starts normally and logs EPOW events associated with partition migration.

Awesome.

Quoted 6 lines
Quoted 1 line

Presumably there's no other code that cares about the proc file.

AFAIK this is right. powerpc-utils and librtas do not use it. librtas has a wrapper for the calling the associated RTAS function directly, but that's fine.

Quoted 7 lines

I tried using GitHub's search to find instances of "scan-log-dump" that weren't from Linux or ppc64_diag (need to be logged in I think):

https://github.com/search?q=%22scan-log-dump%22+-path%3Aarch%2Fpowerpc+-filename%3Ascanlog.c+-extension%3Apatch&type=Code&ref=advsearch&l=&l=

This hasn't yielded any unexpected users. There may be better search terms but that's what a few minutes of fiddling with it got me.

I had a look on sourcegraph too, same story, nothing interesting:

https://sourcegraph.com/search?q=context:global+scan-log-dump+NOT+file:arch/powerpc/platforms/pseries/scanlog.c+NOT+file:arch/powerpc/kernel/rtas.c+NOT+file:arch/ppc64/kernel/scanlog.c+fork:yes+archived:yes&patternType=literal

So that seems OK to me, I'll pick this up.

cheers

#5 lore raw
In reply to Nathan Lynch
Quoted 6 lines · Nathan Lynch

Remove the pseries scanlog driver.

This code supports functions from Power4-era servers that are not present on targets currently supported by arch/powerpc. System manuals from this time have this description:

Quoted 7 lines

Scan Dump data is a set of chip data that the service processor gathers after a system malfunction. It consists of chip scan rings, chip trace arrays, and Scan COM (SCOM) registers. This data is stored in the scan-log partition of the system’s Nonvolatile Random Access Memory (NVRAM).

[...]

Applied to powerpc/next.

[1/1] powerpc/pseries: delete scanlog

      https://git.kernel.org/powerpc/c/22887f319a39929e357810a1f964fcba7ae42c59

cheers