mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
ACPI: APEI: Fix ERST timeout unit conversion
The ACPI specification defines bits 63:32 returned by
GET_EXECUTE_OPERATION_TIMINGS as the maximum execution time in
microseconds. erst_get_timeout() instead multiplies the value by
NSEC_PER_MSEC.
Use NSEC_PER_USEC to express the firmware-provided microsecond timeout
in the nanosecond units expected by erst_timedout().
Fixes: fac475aab7 ("ACPI: APEI: Use ERST timeout for slow devices")
Cc: stable@vger.kernel.org
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://patch.msgid.link/20260721182551.2434933-1-nirmoyd@nvidia.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
903308ea40
commit
a685d8eea4
|
|
@ -108,7 +108,7 @@ static inline u64 erst_get_timeout(void)
|
|||
|
||||
if (erst_erange.attr & ERST_RANGE_SLOW) {
|
||||
timeout = ((erst_erange.timings & ERST_EXEC_TIMING_MAX_MASK) >>
|
||||
ERST_EXEC_TIMING_MAX_SHIFT) * NSEC_PER_MSEC;
|
||||
ERST_EXEC_TIMING_MAX_SHIFT) * NSEC_PER_USEC;
|
||||
if (timeout < FIRMWARE_TIMEOUT)
|
||||
timeout = FIRMWARE_TIMEOUT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user