]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
arm-efi: Reduce timer event frequency by 10
authorMark Salter <msalter@redhat.com>
Thu, 7 Jan 2016 19:53:41 +0000 (20:53 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Thu, 7 Jan 2016 19:54:20 +0000 (20:54 +0100)
Timer event to keep grub msec counter was running at 1000HZ. This was too
fast for UEFI timer driver and resulted in a 10x slowdown in grub time
versus wallclock. Reduce the timer event frequency and increase tick
increment accordingly to keep better time.

grub-core/kern/arm/efi/init.c

index 2572ca8b7f78cd0b95098409b06f5b70a6d7caa6..06df60e2f0e12ee5e53f95f1a821217fc5fcd84e 100644 (file)
@@ -38,7 +38,7 @@ static void
 increment_timer (grub_efi_event_t event __attribute__ ((unused)),
                 void *context __attribute__ ((unused)))
 {
-  tmr++;
+  tmr += 10;
 }
 
 void
@@ -52,7 +52,7 @@ grub_machine_init (void)
 
   efi_call_5 (b->create_event, GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
              GRUB_EFI_TPL_CALLBACK, increment_timer, NULL, &tmr_evt);
-  efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 10000);
+  efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 100000);
 
   grub_install_get_time_ms (grub_efi_get_time_ms);
 }