mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Merge "drivers: edac: Defer work for the polling EDAC driver"
This commit is contained in:
commit
c80a3f6ef0
4 changed files with 24 additions and 3 deletions
|
|
@ -23,6 +23,15 @@ menuconfig EDAC
|
|||
|
||||
if EDAC
|
||||
|
||||
config EDAC_QGKI
|
||||
bool "Enable QGKI features for EDAC"
|
||||
depends on QGKI
|
||||
help
|
||||
When QGKI variants are selected, use special EDAC features like
|
||||
creating and using deferred work. This feature adds
|
||||
a deferrable timer if the error checking is not worth waking up
|
||||
the cpu from idle.
|
||||
|
||||
config EDAC_LEGACY_SYSFS
|
||||
bool "EDAC legacy sysfs"
|
||||
default y
|
||||
|
|
|
|||
|
|
@ -388,9 +388,15 @@ static void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
|
|||
*/
|
||||
edac_dev->poll_msec = msec;
|
||||
edac_dev->delay = msecs_to_jiffies(msec);
|
||||
|
||||
#ifdef CONFIG_EDAC_QGKI
|
||||
if (edac_dev->defer_work)
|
||||
INIT_DEFERRABLE_WORK(&edac_dev->work,
|
||||
edac_device_workq_function);
|
||||
else
|
||||
INIT_DELAYED_WORK(&edac_dev->work, edac_device_workq_function);
|
||||
#else
|
||||
INIT_DELAYED_WORK(&edac_dev->work, edac_device_workq_function);
|
||||
|
||||
#endif
|
||||
/* optimize here for the 1 second case, which will be normal value, to
|
||||
* fire ON the 1 second time event. This helps reduce all sorts of
|
||||
* timers firing on sub-second basis, while they are happy
|
||||
|
|
|
|||
|
|
@ -165,6 +165,9 @@ struct edac_device_ctl_info {
|
|||
int panic_on_ue; /* boolean for panic'ing on an UE */
|
||||
unsigned poll_msec; /* number of milliseconds to poll interval */
|
||||
unsigned long delay; /* number of jiffies for poll_msec */
|
||||
#ifdef CONFIG_EDAC_QGKI
|
||||
bool defer_work; /* Create a deferrable work for polling */
|
||||
#endif
|
||||
|
||||
/* Additional top controller level attributes, but specified
|
||||
* by the low level driver.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/edac.h>
|
||||
|
|
@ -383,6 +383,9 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
|
|||
dev_info(dev, "No ECC IRQ; defaulting to polling mode\n");
|
||||
edev_ctl->poll_msec = poll_msec;
|
||||
edev_ctl->edac_check = qcom_llcc_poll_cache_errors;
|
||||
#ifdef CONFIG_EDAC_QGKI
|
||||
edev_ctl->defer_work = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
rc = edac_device_add_device(edev_ctl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue