Loading arch/arm64/include/asm/edac.h +2 −0 Original line number Diff line number Diff line Loading @@ -15,8 +15,10 @@ #ifdef CONFIG_EDAC_CORTEX_ARM64 void arm64_erp_local_dbe_handler(void); void arm64_check_cache_ecc(void); #else static inline void arm64_erp_local_dbe_handler(void) { } static inline void arm64_check_cache_ecc(void) { } #endif static inline void atomic_scrub(void *addr, int size) Loading arch/arm64/kernel/smp.c +2 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #include <asm/sections.h> #include <asm/tlbflush.h> #include <asm/ptrace.h> #include <asm/edac.h> /* * as from 2.5, kernels no longer have an init_tasks structure Loading Loading @@ -556,6 +557,7 @@ static void ipi_cpu_stop(unsigned int cpu, struct pt_regs *regs) pr_crit("CPU%u: stopping\n", cpu); show_regs(regs); dump_stack(); arm64_check_cache_ecc(); raw_spin_unlock(&stop_lock); } Loading drivers/edac/cortex_arm64_edac.c +20 −1 Original line number Diff line number Diff line Loading @@ -113,11 +113,12 @@ struct erp_drvdata { u32 mem_perf_counter; struct notifier_block nb_pm; struct notifier_block nb_cpu; struct notifier_block nb_panic; struct work_struct work; int apply_cti_pmu_wa; }; static struct erp_drvdata *abort_handler_drvdata; static struct erp_drvdata *abort_handler_drvdata, *panic_handler_drvdata; struct erp_local_data { struct erp_drvdata *drv; Loading Loading @@ -785,6 +786,20 @@ static int msm_cti_pmu_wa_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } void arm64_check_cache_ecc(void) { if (panic_handler_drvdata) check_sbe_event(panic_handler_drvdata); } static int arm64_erp_panic_notify(struct notifier_block *this, unsigned long event, void *ptr) { arm64_check_cache_ecc(); return NOTIFY_OK; } static int arm64_cpu_erp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; Loading Loading @@ -879,6 +894,9 @@ static int arm64_cpu_erp_probe(struct platform_device *pdev) cpu_pm_register_notifier(&(drv->nb_pm)); drv->nb_cpu.notifier_call = msm_cti_pmu_wa_cpu_notify; register_cpu_notifier(&drv->nb_cpu); drv->nb_panic.notifier_call = arm64_erp_panic_notify; atomic_notifier_chain_register(&panic_notifier_list, &drv->nb_panic); arm64_pmu_irq_handled_externally(); if (drv->apply_cti_pmu_wa) { schedule_on_each_cpu(msm_enable_cti_pmu_workaround); Loading @@ -902,6 +920,7 @@ out_irq: WARN_ON(abort_handler_drvdata); abort_handler_drvdata = drv; panic_handler_drvdata = drv; return 0; out_dev: Loading Loading
arch/arm64/include/asm/edac.h +2 −0 Original line number Diff line number Diff line Loading @@ -15,8 +15,10 @@ #ifdef CONFIG_EDAC_CORTEX_ARM64 void arm64_erp_local_dbe_handler(void); void arm64_check_cache_ecc(void); #else static inline void arm64_erp_local_dbe_handler(void) { } static inline void arm64_check_cache_ecc(void) { } #endif static inline void atomic_scrub(void *addr, int size) Loading
arch/arm64/kernel/smp.c +2 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #include <asm/sections.h> #include <asm/tlbflush.h> #include <asm/ptrace.h> #include <asm/edac.h> /* * as from 2.5, kernels no longer have an init_tasks structure Loading Loading @@ -556,6 +557,7 @@ static void ipi_cpu_stop(unsigned int cpu, struct pt_regs *regs) pr_crit("CPU%u: stopping\n", cpu); show_regs(regs); dump_stack(); arm64_check_cache_ecc(); raw_spin_unlock(&stop_lock); } Loading
drivers/edac/cortex_arm64_edac.c +20 −1 Original line number Diff line number Diff line Loading @@ -113,11 +113,12 @@ struct erp_drvdata { u32 mem_perf_counter; struct notifier_block nb_pm; struct notifier_block nb_cpu; struct notifier_block nb_panic; struct work_struct work; int apply_cti_pmu_wa; }; static struct erp_drvdata *abort_handler_drvdata; static struct erp_drvdata *abort_handler_drvdata, *panic_handler_drvdata; struct erp_local_data { struct erp_drvdata *drv; Loading Loading @@ -785,6 +786,20 @@ static int msm_cti_pmu_wa_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } void arm64_check_cache_ecc(void) { if (panic_handler_drvdata) check_sbe_event(panic_handler_drvdata); } static int arm64_erp_panic_notify(struct notifier_block *this, unsigned long event, void *ptr) { arm64_check_cache_ecc(); return NOTIFY_OK; } static int arm64_cpu_erp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; Loading Loading @@ -879,6 +894,9 @@ static int arm64_cpu_erp_probe(struct platform_device *pdev) cpu_pm_register_notifier(&(drv->nb_pm)); drv->nb_cpu.notifier_call = msm_cti_pmu_wa_cpu_notify; register_cpu_notifier(&drv->nb_cpu); drv->nb_panic.notifier_call = arm64_erp_panic_notify; atomic_notifier_chain_register(&panic_notifier_list, &drv->nb_panic); arm64_pmu_irq_handled_externally(); if (drv->apply_cti_pmu_wa) { schedule_on_each_cpu(msm_enable_cti_pmu_workaround); Loading @@ -902,6 +920,7 @@ out_irq: WARN_ON(abort_handler_drvdata); abort_handler_drvdata = drv; panic_handler_drvdata = drv; return 0; out_dev: Loading