x86/MCE: Remove min interval polling limitation
authorDewet Thibaut <[email protected]>
Mon, 16 Jul 2018 08:49:27 +0000 (10:49 +0200)
committerThomas Gleixner <[email protected]>
Tue, 17 Jul 2018 15:56:25 +0000 (17:56 +0200)
commit b3b7c4795c ("x86/MCE: Serialize sysfs changes") introduced a min
interval limitation when setting the check interval for polled MCEs.
However, the logic is that 0 disables polling for corrected MCEs, see
Documentation/x86/x86_64/machinecheck. The limitation prevents disabling.

Remove this limitation and allow the value 0 to disable polling again.

Fixes: b3b7c4795c ("x86/MCE: Serialize sysfs changes")
Signed-off-by: Dewet Thibaut <[email protected]>
Signed-off-by: Alexander Sverdlin <[email protected]>
[ Massage commit message. ]
Signed-off-by: Borislav Petkov <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: linux-edac <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
arch/x86/kernel/cpu/mcheck/mce.c

index c102ad51025e865c74e004fa4dc69f9c89a2d034..8c50754c09c1d83c8700824348036715142d11d6 100644 (file)
@@ -2165,9 +2165,6 @@ static ssize_t store_int_with_restart(struct device *s,
        if (check_interval == old_check_interval)
                return ret;
 
-       if (check_interval < 1)
-               check_interval = 1;
-
        mutex_lock(&mce_sysfs_mutex);
        mce_restart();
        mutex_unlock(&mce_sysfs_mutex);