EDAC: Add ARM64 EDAC
Subsystems (2)
PATCH v3 1/1 EDAC: Add ARM64 EDAC
Add support for Cortex A57 and A53 EDAC driver.
---
v3:
* change DT binding compatibilty string to 'cortex-a57-edac'
* remove A57/A53 prefix from register bit definition
* unify A57 and A53 L1/L2 error parsing functions
* use mc trace event function to report the error
* update Kconfig default to 'n'
v2:
* convert into generic arm64 edac driver
* remove AMD specific references from dt binding
* remove poll_msec property from dt binding
* add poll_msec as a module param, default is 100ms
* update copyright text
* define macro mnemonics for L1 and L2 RAMID
* check L2 error per-cluster instead of per core
* update function names
* use get_online_cpus() and put_online_cpus() to make L1 and L2 register read hotplug-safe
* add error check in probe routine
.../devicetree/bindings/edac/cortex-arm64-edac.txt | 15 + drivers/edac/Kconfig | 8 + drivers/edac/Makefile | 1 + drivers/edac/cortex_arm64_edac.c | 349 +++++++++++++++++++++ 4 files changed, 373 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/cortex-arm64-edac.txt create mode 100644 drivers/edac/cortex_arm64_edac.c
Documentation/devicetree/bindings/edac/cortex-arm64-edac.txt new file +15 -0
@@ -0,0 +1,15 @@ +* ARM Cortex A57 and A53 L1/L2 cache error reporting + +CPU Memory Error Syndrome and L2 Memory Error Syndrome registers can be used +for checking L1 and L2 memory errors. + +The following section describes the Cortex A57/A53 EDAC DT node binding. + +Required properties: +- compatible: Should be "arm,cortex-a57-edac" or "arm,cortex-a53-edac" + +Example: + edac { + compatible = "arm,cortex-a57-edac"; + }; +
drivers/edac/Kconfig +8 -0
@@ -390,4 +390,12 @@ config EDAC_XGENE Support for error detection and correction on the APM X-Gene family of SOCs. +config EDAC_CORTEX_ARM64 + tristate "ARM Cortex A57/A53" + depends on EDAC_MM_EDAC && ARM64 + default n + help + Support for error detection and correction on the + ARM Cortex A57 and A53. + endif # EDAC
drivers/edac/Makefile +1 -0
@@ -68,3 +68,4 @@ 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_CORTEX_ARM64) += cortex_arm64_edac.o
drivers/edac/cortex_arm64_edac.c new file +349 -0
349 lines not on this page · raw message
Signature · 1 line
1.9.1
drivers/edac/Kconfig config EDAC_XGENE · line 396
Quoted 12 lines · Brijesh Singh
drivers/edac/Kconfig +4
-0@@ -390,4 +390,12 @@ config EDAC_XGENE Support for error detection and correction on the APM X-Gene family of SOCs. +config EDAC_CORTEX_ARM64 + tristate "ARM Cortex A57/A53" + depends on EDAC_MM_EDAC && ARM64 + default n
n is the default so this can be removed.
Quoted 10 lines
drivers/edac/Kconfig +4
-0+ help + Support for error detection and correction on the + ARM Cortex A57 and A53. + endif # EDACdrivers/edac/cortex_arm64_edac.c new file +0
-0
drivers/edac/cortex_arm64_edac.c line 328
Quoted 7 lines
drivers/edac/cortex_arm64_edac.c new file +7
-0+ +static struct platform_driver cortex_arm64_edac_driver = { + .probe = cortex_arm64_edac_probe, + .remove = cortex_arm64_edac_remove, + .driver = { + .name =DRV_NAME , + .owner =THIS_MODULE ,
This line can be removed. THIS_MODULE is assigned by platform_driver_register().
Quoted 5 lines
drivers/edac/cortex_arm64_edac.c new file +5
-0+ .of_match_table = cortex_arm64_edac_of_match, + }, +}; + +static int __init cortex_arm64_edac_init (void )
drivers/edac/cortex_arm64_edac.c line 343
Quoted 10 lines
drivers/edac/cortex_arm64_edac.c new file +10
-0+{ +return platform_driver_register (&cortex_arm64_edac_driver); +} +module_init (cortex_arm64_edac_init); + +static void __exit cortex_arm64_edac_exit(void) +{ +platform_driver_unregister (&cortex_arm64_edac_driver); +} +module_exit (cortex_arm64_edac_exit);
This can be module_platform_driver(cortex_arm64_edac_driver) now.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Thanks for review Steve.
Quoted 7 lines · Stephen Boyd
drivers/edac/Kconfig config EDAC_XGENE · line 396
Quoted 4 lines
drivers/edac/Kconfig +4
-0+config EDAC_CORTEX_ARM64 + tristate "ARM Cortex A57/A53" + depends on EDAC_MM_EDAC && ARM64 + default nn is the default so this can be removed.
noted
Quoted 6 lines
drivers/edac/cortex_arm64_edac.c line 328
Quoted 3 lines
drivers/edac/cortex_arm64_edac.c new file +3
-0+ .driver = { + .name = DRV_NAME, + .owner = THIS_MODULE,This line can be removed.
THIS_MODULEis assigned byplatform_driver_register().
noted.
Quoted 10 lines
Quoted 10 lines
drivers/edac/cortex_arm64_edac.c new file +9
-0+ .of_match_table = cortex_arm64_edac_of_match, + }, +}; + +static int __init cortex_arm64_edac_init (void ) +{ +return platform_driver_register (&cortex_arm64_edac_driver); +} +module_init (cortex_arm64_edac_init);
Quoted 9 lines
drivers/edac/cortex_arm64_edac.c line 343
Quoted 6 lines
drivers/edac/cortex_arm64_edac.c new file +6
-0+ +static void __exit cortex_arm64_edac_exit(void) +{ +platform_driver_unregister (&cortex_arm64_edac_driver); +} +module_exit (cortex_arm64_edac_exit);This can be
module_platform_driver(cortex_arm64_edac_driver)now.
noted.
-Brijesh