Skip to contentSkip to conversation

Enable PSTORE_RAM as a module in the arm64 defconfig

PATCH Applied Nícolas F. R. A. Prado 4 participants 8 messages Jan 10, 2024 – Feb 1, 2024 Pstore filesystem

lore
Share & tools
lore
#0 lore raw

cover Enable PSTORE_RAM as a module in the arm64 defconfig

This series enables the PSTORE_RAM config, aka the ramoops driver, in the defconfig.

Nícolas F. R. A. Prado (2):
pstore/ram: Register to module device table
arm64: defconfig: Enable PSTORE_RAM

 arch/arm64/configs/defconfig | 1 +
 fs/pstore/ram.c              | 1 +
 2 files changed, 2 insertions(+)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 pstore/ram: Register to module device table

Register the compatible for this module on the module device table so it can be automatically loaded when a matching DT node is present, allowing logging of panics and oopses without any intervention.

---

 fs/pstore/ram.c | 1 +
 1 file changed, 1 insertion(+)
fs/pstore/ram.c +1 -0
index 88b34fdbf759..b1a455f42e93 100644
@@ -893,6 +893,7 @@ static const struct of_device_id dt_match[] = {
 	{ .compatible = "ramoops" },
 	{}
 };
+MODULE_DEVICE_TABLE(of, dt_match);
 
 static struct platform_driver ramoops_driver = {
 	.probe		= ramoops_probe,
Signature · 1 line
2.43.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] pstore/ram: Register to module device table

Il 10/01/24 22:05, Nícolas F. R. A. Prado ha scritto:

Quoted 5 lines

Register the compatible for this module on the module device table so it can be automatically loaded when a matching DT node is present, allowing logging of panics and oopses without any intervention.

Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] pstore/ram: Register to module device table

In reply to Nícolas F. R. A. Prado
Quoted 5 lines · Nícolas F. R. A. Prado

Register the compatible for this module on the module device table so it can be automatically loaded when a matching DT node is present, allowing logging of panics and oopses without any intervention.

Ah-ha! Yeah, good idea.

Signature · 1 line
Kees Cook
#4 lore raw

PATCH 2/2 arm64: defconfig: Enable PSTORE_RAM

In reply to Nícolas F. R. A. Prado

Enable PSTORE_RAM, that is the ramoops driver, in the defconfig, to allow logging and retrieving panics and oopses to/from RAM automatically for platforms that have a ramoops reserved memory node in DT.

---

 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index d48659217bb4..0b0ef6877a12 100644
@@ -1589,6 +1589,7 @@ CONFIG_HUGETLBFS=y
 CONFIG_CONFIGFS_FS=y
 CONFIG_EFIVAR_FS=y
 CONFIG_SQUASHFS=y
+CONFIG_PSTORE_RAM=m
 CONFIG_NFS_FS=y
 CONFIG_NFS_V4=y
 CONFIG_NFS_V4_1=y
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM

Quoted 5 lines · Nícolas F. R. A. Prado

Enable PSTORE_RAM, that is the ramoops driver, in the defconfig, to allow logging and retrieving panics and oopses to/from RAM automatically for platforms that have a ramoops reserved memory node in DT.

ARM maintainers, I can't speak to whether you want this defconfig change or not, but if you do and pick it up, please feel free to also grab patch 2.

If you don't want this, I can carry patch 2 in the pstore tree.

-Kees

Quoted 21 lines

---

 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index d48659217bb4..0b0ef6877a12 100644
@@ -1589,6 +1589,7 @@ CONFIG_HUGETLBFS=y
 CONFIG_CONFIGFS_FS=y
 CONFIG_EFIVAR_FS=y
 CONFIG_SQUASHFS=y
+CONFIG_PSTORE_RAM=m
 CONFIG_NFS_FS=y
 CONFIG_NFS_V4=y
 CONFIG_NFS_V4_1=y
Signature · 1 line
2.43.0
Signature · 1 line
Kees Cook
Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] arm64: defconfig: Enable PSTORE_RAM

In reply to Nícolas F. R. A. Prado

Useful stuff!

Quoted 16 lines · Nícolas F. R. A. Prado

Enable PSTORE_RAM, that is the ramoops driver, in the defconfig, to allow logging and retrieving panics and oopses to/from RAM automatically for platforms that have a ramoops reserved memory node in DT.

---

  arch/arm64/configs/defconfig | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +0 -0
index d48659217bb4..0b0ef6877a12 100644

arch/arm64/configs/defconfig CONFIG_HUGETLBFS=y · line 1595

Quoted 7 lines
arch/arm64/configs/defconfig +1 -0
@@ -1589,6 +1589,7 @@ CONFIG_HUGETLBFS=y
  CONFIG_CONFIGFS_FS=y
  CONFIG_EFIVAR_FS=y
  CONFIG_SQUASHFS=y
+CONFIG_PSTORE_RAM=m
  CONFIG_NFS_FS=y
  CONFIG_NFS_V4=y
  CONFIG_NFS_V4_1=y

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Applied
#7 lore raw
In reply to Nícolas F. R. A. Prado
Quoted 9 lines · Nícolas F. R. A. Prado

This series enables the PSTORE_RAM config, aka the ramoops driver, in the defconfig.

Nícolas F. R. A. Prado (2):
pstore/ram: Register to module device table
arm64: defconfig: Enable PSTORE_RAM

[...]

Applied to for-next/pstore, thanks!

[1/2] pstore/ram: Register to module device table

      https://git.kernel.org/kees/c/d8c70720ebfd
[2/2] arm64: defconfig: Enable PSTORE_RAM
      https://git.kernel.org/kees/c/393bd157dbf8

Take care,

Signature · 1 line
Kees Cook