Blob Blame History Raw
From: Bhaskar Upadhaya <bupadhaya@marvell.com>
Date: Wed, 8 Jan 2020 09:17:38 -0800
Subject: apei/ghes: Do not delay GHES polling

Git-commit: cea79e7e2f24125b895bbfcdf98c8cfd1fb684d1
Patch-mainline: v5.6-rc1
References: bsc#1166982

Currently, the ghes_poll_func() timer callback is registered with the
TIMER_DEFERRABLE flag. Thus, it is run when the CPU eventually wakes
up together with a subsequent non-deferrable timer and not at the precisely
configured polling interval.

For polling mode, the polling interval configured by firmware should not
be exceeded according to the ACPI spec 6.3, Table 18-394. The definition
of the polling interval is:

"Indicates the poll interval in milliseconds OSPM should use to
 periodically check the error source for the presence of an error
 condition."

If this interval is extended due to the timer callback deferring, error
records can get lost. Which we are observing on our ThunderX2 platforms.

Therefore, remove the TIMER_DEFERRABLE flag so that the timer callback
executes at the precise interval.

Signed-off-by: Bhaskar Upadhaya <bupadhaya@marvell.com>
[ bp: Subject & changelog ]
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
---
 drivers/acpi/apei/ghes.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1076,7 +1076,7 @@ static int ghes_probe(struct platform_de
 
 	switch (generic->notify.type) {
 	case ACPI_HEST_NOTIFY_POLLED:
-		setup_deferrable_timer(&ghes->timer, ghes_poll_func,
+		setup_timer(&ghes->timer, ghes_poll_func,
 				       (unsigned long)ghes);
 		ghes_add_timer(ghes);
 		break;