apei: xgene: Add ACPI APEI support for X-Gene
RFC PATCH 1/1 apei: xgene: Add ACPI APEI support for X-Gene
Add ACPI APEI support for X-Gene platform. This patch requires [1] to configiure and build.
[1] http://marc.info/?l=linux-kernel&m=143955588312730&w=2
--- drivers/edac/Kconfig | 7 +++ drivers/edac/Makefile | 2 + drivers/edac/xgene_apei.c | 120 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 drivers/edac/xgene_apei.c
drivers/edac/Kconfig +7 -0
@@ -390,4 +390,11 @@ config EDAC_XGENE Support for error detection and correction on the APM X-Gene family of SOCs. +config EDAC_XGENE_APEI + tristate "APM X-Gene SoC APEI" + depends on ACPI_APEI && (ARM64 || COMPILE_TEST) + help + APEI interface support for error detection and correction on the + APM X-Gene family of SOCs. + endif # EDAC
drivers/edac/Makefile +2 -0
@@ -70,3 +70,5 @@ obj-$(CONFIG_EDAC_OCTEON_PCI) += octeon_edac-pci.o obj-$(CONFIG_EDAC_ALTERA_MC) += altera_edac.o obj-$(CONFIG_EDAC_SYNOPSYS) += synopsys_edac.o obj-$(CONFIG_EDAC_XGENE) += xgene_edac.o +obj-$(CONFIG_EDAC_XGENE_APEI) += xgene_apei.o +
drivers/edac/xgene_apei.c new file +120 -0
120 lines not on this page · raw message
Signature · 1 line
1.7.1
Borislav Petkov
maintainerRFC PATCH 1/1 apei: xgene: Add ACPI APEI support for X-Gene
Quoted 61 lines · Loc Ho
Add ACPI APEI support for X-Gene platform. This patch requires [1] to configiure and build.
[1] http://marc.info/?l=linux-kernel&m=143955588312730&w=2
Signed-off-by Tuan Phan <[email protected]>Signed-off-by Loc Ho <[email protected]>--- drivers/edac/Kconfig | 7 +++ drivers/edac/Makefile | 2 + drivers/edac/xgene_apei.c | 120 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 drivers/edac/xgene_apei.cdrivers/edac/Kconfig +7
-0@@ -390,4 +390,11 @@ config EDAC_XGENE Support for error detection and correction on the APM X-Gene family of SOCs. +config EDAC_XGENE_APEI + tristate "APM X-Gene SoC APEI" + depends on ACPI_APEI && (ARM64 || COMPILE_TEST) + help + APEI interface support for error detection and correction on the + APM X-Gene family of SOCs. + endif # EDACdrivers/edac/Makefile +2
-0@@ -70,3 +70,5 @@ obj-$(CONFIG_EDAC_OCTEON_PCI) += octeon_edac-pci.o obj-$(CONFIG_EDAC_ALTERA_MC) += altera_edac.o obj-$(CONFIG_EDAC_SYNOPSYS) += synopsys_edac.o obj-$(CONFIG_EDAC_XGENE) += xgene_edac.o +obj-$(CONFIG_EDAC_XGENE_APEI) += xgene_apei.o +drivers/edac/xgene_apei.c new file +15
-0@@ -0,0 +1,120 @@ +/* +* AppliedMicro X-Gene APEI Driver +* +* Copyright (c) 2015, Applied Micro Circuits Corporation +* Author: Tuan Phan <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details.
drivers/edac/xgene_apei.c line 25
Quoted 10 lines
drivers/edac/xgene_apei.c new file +10
-0+* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +* +* This driver provides the interrupt hook up with the UEFI FW for the X-Gene +* SoC processor under the following conditions: +* +* 1. No interrupt GPIO available or don't want to use one and no EL3 support +* 2. With EL3 support, but no mean to interrupt the Linux OS that an event +* has occurred.
Why is this an x-gene-specific driver and not a generic, APEI one, like ghes_edac? I'd like to see a single ARM64 APEI/GHES/whatever driver which is programmed against the spec - no vendor-specific stuff. And I don't see anything vendor-specific below except xgene_apei_acpi_match which can be part of the generic driver.
Signature · 4 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.RFC PATCH 1/1 apei: xgene: Add ACPI APEI support for X-Gene
Hi Borislav,
Quoted 69 lines
Quoted 69 lines
Add ACPI APEI support for X-Gene platform. This patch requires [1] to configiure and build.
[1] http://marc.info/?l=linux-kernel&m=143955588312730&w=2
Signed-off-by Tuan Phan <[email protected]>Signed-off-by Loc Ho <[email protected]>--- drivers/edac/Kconfig | 7 +++ drivers/edac/Makefile | 2 + drivers/edac/xgene_apei.c | 120 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 drivers/edac/xgene_apei.cdrivers/edac/Kconfig +7
-0@@ -390,4 +390,11 @@ config EDAC_XGENE Support for error detection and correction on the APM X-Gene family of SOCs. +config EDAC_XGENE_APEI + tristate "APM X-Gene SoC APEI" + depends on ACPI_APEI && (ARM64 || COMPILE_TEST) + help + APEI interface support for error detection and correction on the + APM X-Gene family of SOCs. + endif # EDACdrivers/edac/Makefile +2
-0@@ -70,3 +70,5 @@ obj-$(CONFIG_EDAC_OCTEON_PCI) += octeon_edac-pci.o obj-$(CONFIG_EDAC_ALTERA_MC) += altera_edac.o obj-$(CONFIG_EDAC_SYNOPSYS) += synopsys_edac.o obj-$(CONFIG_EDAC_XGENE) += xgene_edac.o +obj-$(CONFIG_EDAC_XGENE_APEI) += xgene_apei.o +drivers/edac/xgene_apei.c new file +23
-0@@ -0,0 +1,120 @@ +/* +* AppliedMicro X-Gene APEI Driver +* +* Copyright (c) 2015, Applied Micro Circuits Corporation +* Author: Tuan Phan <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +* +* This driver provides the interrupt hook up with the UEFI FW for the X-Gene +* SoC processor under the following conditions: +* +* 1. No interrupt GPIO available or don't want to use one and no EL3 support
Quoted 9 lines
drivers/edac/xgene_apei.c line 25
Quoted 2 lines
drivers/edac/xgene_apei.c new file +2
-0+* 2. With EL3 support, but no mean to interrupt the Linux OS that an event +* has occurred. Why is this an x-gene-specific driver and not a generic, APEI one, like
ghes_edac? I'd like to see a single ARM64 APEI/GHES/whatever driver which is programmed against the spec - no vendor-specific stuff. And I don't see anything vendor-specific below exceptxgene_apei_acpi_matchwhich can be part of the generic driver.
Yes... We can make this generic. The only non-generic is the way the interrupt is cleared. As of right now, the method of clearing the interrupt is by writing back the same value as read. This would be fine for most. But to ensure 100% coverage, would an AML method be better or needed?
-Loc
Borislav Petkov
maintainerRFC PATCH 1/1 apei: xgene: Add ACPI APEI support for X-Gene
Quoted 4 lines · Loc Ho
Yes... We can make this generic. The only non-generic is the way the interrupt is cleared. As of right now, the method of clearing the interrupt is by writing back the same value as read. This would be fine for most.
Fine for most what? APM hardware, other hw?
Quoted 1 line
But to ensure 100% coverage, would an AML method be better or needed?
No idea, I'm not an ACPI guy. You probably should get in touch with the people working on the ARM64 APEI driver and hash that out with them.
HTH.
Signature · 5 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--RFC PATCH 1/1 apei: xgene: Add ACPI APEI support for X-Gene
Hi Tomasx/Fu,
Quoted 6 lines
Quoted 4 lines
Yes... We can make this generic. The only non-generic is the way the interrupt is cleared. As of right now, the method of clearing the interrupt is by writing back the same value as read. This would be fine for most.
Fine for most what? APM hardware, other hw?
In general, most HW states are cleared with writing an 1 - but it is HW implementation specific.
Quoted 5 lines
Quoted 2 lines
But to ensure 100% coverage, would an AML method be better or needed?
No idea, I'm not an ACPI guy. You probably should get in touch with the people working on the ARM64 APEI driver and hash that out with them.
Is there an thread on ACPI APEI support going on currently for ARM?
-Loc