summaryrefslogtreecommitdiffstats
path: root/arch/x86/platform
diff options
context:
space:
mode:
authorMaurice Ma <maurice.ma@intel.com>2011-10-11 11:52:13 +0100
committerIngo Molnar <mingo@elte.hu>2011-12-05 12:45:14 +0100
commite9a9eca517d4cd94e816538efc400257e34bc63e (patch)
treec90b3a473e6c56c951c587f9ad1b9568e7be88dc /arch/x86/platform
parent2e57ae0515124af45dd889bfbd4840fd40fcc07d (diff)
downloadlinux-stable-e9a9eca517d4cd94e816538efc400257e34bc63e.tar.gz
linux-stable-e9a9eca517d4cd94e816538efc400257e34bc63e.tar.bz2
linux-stable-e9a9eca517d4cd94e816538efc400257e34bc63e.zip
x86, efi: Convert efi_phys_get_time() args to physical addresses
Because callers of efi_phys_get_time() pass virtual stack addresses as arguments, we need to find their corresponding physical addresses and when calling GetTime() in physical mode. Without this patch the following line is printed on boot, "Oops: efitime: can't read time!" Signed-off-by: Maurice Ma <maurice.ma@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Matthew Garrett <mjg@redhat.com> Link: http://lkml.kernel.org/r/1318330333-4617-1-git-send-email-matt@console-pimps.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r--arch/x86/platform/efi/efi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 37718f0f053d..d2376eb7231a 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -238,7 +238,8 @@ static efi_status_t __init phys_efi_get_time(efi_time_t *tm,
spin_lock_irqsave(&rtc_lock, flags);
efi_call_phys_prelog();
- status = efi_call_phys2(efi_phys.get_time, tm, tc);
+ status = efi_call_phys2(efi_phys.get_time, virt_to_phys(tm),
+ virt_to_phys(tc));
efi_call_phys_epilog();
spin_unlock_irqrestore(&rtc_lock, flags);
return status;