Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c80a3f6e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: edac: Defer work for the polling EDAC driver"

parents 7392fc64 06c03f1e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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
+8 −2
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -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.
+4 −1
Original line number Diff line number Diff line
// 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);