diff options
Diffstat (limited to 'drivers/acpi/apei/ghes.c')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index e92c47c46f91..0784f99a4665 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -65,7 +65,7 @@ | |||
65 | 65 | ||
66 | #define GHES_ESTATUS_CACHES_SIZE 4 | 66 | #define GHES_ESTATUS_CACHES_SIZE 4 |
67 | 67 | ||
68 | #define GHES_ESTATUS_IN_CACHE_MAX_NSEC (10 * NSEC_PER_SEC) | 68 | #define GHES_ESTATUS_IN_CACHE_MAX_NSEC 10000000000ULL |
69 | /* Prevent too many caches are allocated because of RCU */ | 69 | /* Prevent too many caches are allocated because of RCU */ |
70 | #define GHES_ESTATUS_CACHE_ALLOCED_MAX (GHES_ESTATUS_CACHES_SIZE * 3 / 2) | 70 | #define GHES_ESTATUS_CACHE_ALLOCED_MAX (GHES_ESTATUS_CACHES_SIZE * 3 / 2) |
71 | 71 | ||
@@ -622,7 +622,8 @@ static void ghes_estatus_cache_add( | |||
622 | break; | 622 | break; |
623 | } | 623 | } |
624 | count = atomic_read(&cache->count); | 624 | count = atomic_read(&cache->count); |
625 | period = duration / (count + 1); | 625 | period = duration; |
626 | do_div(period, (count + 1)); | ||
626 | if (period > max_period) { | 627 | if (period > max_period) { |
627 | max_period = period; | 628 | max_period = period; |
628 | slot = i; | 629 | slot = i; |