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

Commit b6541efc authored by Rohit Vaswani's avatar Rohit Vaswani Committed by Prakruthi Deepak Heragu
Browse files

edac: Allow the option of creating a deferrable work for polling



EDAC provides a mechanism to poll for errors using a callback function
and uses a delayed timer to schedule it. Provide an option to create
a deferrable timer if the error checking is not worth waking up
the cpu from idle.

Change-Id: Ia25216323eabf7fa4b894897c950414006921f3f
Signed-off-by: default avatarRohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: default avatarVenkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
parent 19910d90
Loading
Loading
Loading
Loading
+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.