dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
4fe85b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4fe85b
From: Mark Salter <msalter@redhat.com>
4fe85b
Date: Thu, 20 Feb 2014 12:54:52 -0500
4fe85b
Subject: [PATCH] Reduce timer event frequency by 10
4fe85b
4fe85b
Timer event to keep grub msec counter was running at 1000HZ. This was too
4fe85b
fast for UEFI timer driver and resulted in a 10x slowdown in grub time
4fe85b
versus wallclock. Reduce the timer event frequency and increase tick
4fe85b
increment accordingly to keep better time.
4fe85b
4fe85b
Signed-off-by: Mark Salter <msalter@redhat.com>
4fe85b
---
4fe85b
 grub-core/kern/arm/efi/init.c | 4 ++--
4fe85b
 1 file changed, 2 insertions(+), 2 deletions(-)
4fe85b
4fe85b
diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c
4fe85b
index a6ae03475cc..0c17d8390fa 100644
4fe85b
--- a/grub-core/kern/arm/efi/init.c
4fe85b
+++ b/grub-core/kern/arm/efi/init.c
4fe85b
@@ -38,7 +38,7 @@ static void
4fe85b
 increment_timer (grub_efi_event_t event __attribute__ ((unused)),
4fe85b
 		 void *context __attribute__ ((unused)))
4fe85b
 {
4fe85b
-  tmr++;
4fe85b
+  tmr += 10;
4fe85b
 }
4fe85b
 
4fe85b
 void
4fe85b
@@ -52,7 +52,7 @@ grub_machine_init (void)
4fe85b
 
4fe85b
   efi_call_5 (b->create_event, GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
4fe85b
 	      GRUB_EFI_TPL_CALLBACK, increment_timer, NULL, &tmr_evt);
4fe85b
-  efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 10000);
4fe85b
+  efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 100000);
4fe85b
 
4fe85b
   grub_install_get_time_ms (grub_efi_get_time_ms);
4fe85b
 }