Use ITC on IA64 rather than broken routine based on daytime.
* grub-core/kern/efi/efi.c (grub_rtc_get_time_ms) [__ia64__]: Remove on ia64. (grub_get_rtc) [__ia64__]: Likewise. * grub-core/kern/ia64/efi/init.c (divisor): New variable. (get_itc): New function. (grub_rtc_get_time_ms): Likewise. (grub_machine_init): Calibrate ITC. * include/grub/efi/time.h (grub_get_rtc), (GRUB_TICKS_PER_SECOND): Keep only on non-ia64. Don't export since it's broken and used only if TSC is unavailable.
This commit is contained in:
parent
a176740446
commit
9e5e66d15e
4 changed files with 53 additions and 1 deletions
|
@ -230,6 +230,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef __ia64__
|
||||
grub_uint64_t
|
||||
grub_rtc_get_time_ms (void)
|
||||
{
|
||||
|
@ -250,6 +251,7 @@ grub_get_rtc (void)
|
|||
{
|
||||
return grub_rtc_get_time_ms ();
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue