Skip to contentSkip to conversation

UEFI, CPER: Move cper.c to a more proper place

PATCH New Luck, Tony 1 participant 1 message Oct 25, 2013

Subsystems (3)
lore
Share & tools
lore

Luck, Tony

author reviewer
#0 lore raw

PATCH 1/1 UEFI, CPER: Move cper.c to a more proper place

From: "Chen, Gong" <[email protected]>

CPER (Common Platform Error Record - See UEFI spec, appendix N) support is implemented via cper.c, which is under drivers/acpi/apei. But it is not APEI specific, nor even ACPI specific. So move it to lib/ as a function library.

---
Chen Gong sent this to me internally for a review before posting to the list - but I accidentally let the cat out of the bag by pushing it in a git tree up to kernel.org. Posting now so we can have some review. Hopefully some "Acked-by"s ... but I'd also be happy to hear "No, lib/ isn't the right place it should go in ..."

 drivers/acpi/Kconfig              | 3 ++-
 drivers/acpi/apei/Kconfig         | 1 +
 drivers/acpi/apei/Makefile        | 2 +-
 lib/Kconfig                       | 4 ++++
 lib/Makefile                      | 1 +
 {drivers/acpi/apei => lib}/cper.c | 0
 6 files changed, 9 insertions(+), 2 deletions(-)
 rename {drivers/acpi/apei => lib}/cper.c (100%)
drivers/acpi/Kconfig +2 -1
index 252f0e818a49..754cc9085ce1 100644
@@ -374,7 +374,8 @@ source "drivers/acpi/apei/Kconfig"
 
 config ACPI_EXTLOG
 	tristate "Extended Error Log support"
-	depends on X86_MCE && ACPI_APEI
+	depends on X86_MCE
+	select UEFI_CPER
 	default n
 	help
 	  Certain usages such as Predictive Failure Analysis (PFA) require
drivers/acpi/apei/Kconfig +1 -0
index f0c1ce95a0ec..3650b2183227 100644
@@ -2,6 +2,7 @@ config ACPI_APEI
 	bool "ACPI Platform Error Interface (APEI)"
 	select MISC_FILESYSTEMS
 	select PSTORE
+	select UEFI_CPER
 	depends on X86
 	help
 	  APEI allows to report errors (for example from the chipset)
drivers/acpi/apei/Makefile +1 -1
index d1d1bc0a4ee1..5d575a955940 100644
@@ -3,4 +3,4 @@ obj-$(CONFIG_ACPI_APEI_GHES)	+= ghes.o
 obj-$(CONFIG_ACPI_APEI_EINJ)	+= einj.o
 obj-$(CONFIG_ACPI_APEI_ERST_DEBUG) += erst-dbg.o
 
-apei-y := apei-base.o hest.o cper.o erst.o
+apei-y := apei-base.o hest.o erst.o
lib/Kconfig +4 -0
index b3c8be0da17f..08abb6c9671e 100644
@@ -42,6 +42,10 @@ config GENERIC_IO
 	boolean
 	default n
 
+config UEFI_CPER
+	bool
+	default n
+
 config STMP_DEVICE
 	bool
 
lib/Makefile +1 -0
index f3bb2cb98adf..139ae3eba3ad 100644
@@ -40,6 +40,7 @@ endif
 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
 obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o
 obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
+obj-$(CONFIG_UEFI_CPER) += cper.o
 obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
lib/cper.c renamed from drivers/acpi/apei/cper.c +0 -0
similarity index 100%
rename from drivers/acpi/apei/cper.c
rename to lib/cper.c
Signature · 1 line
1.8.1.4