diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 3e344719baa7..4b12502ea801 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -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 diff --git a/drivers/edac/edac_device.h b/drivers/edac/edac_device.h index 67e55feef107..27669f3cad39 100644 --- a/drivers/edac/edac_device.h +++ b/drivers/edac/edac_device.h @@ -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.