Merge branch 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Serialize EFI time accesses on rtc_lock x86: Serialize SMP bootup CMOS accesses on rtc_lock rtc: stmp3xxx: Remove UIE handlers rtc: stmp3xxx: Get rid of mach-specific accessors rtc: stmp3xxx: Initialize drvdata before registering device rtc: stmp3xxx: Port stmp-functions to mxs-equivalents rtc: stmp3xxx: Restore register definitions rtc: vt8500: Use define instead of hardcoded value for status bit
This commit is contained in:
@@ -79,26 +79,50 @@ early_param("add_efi_memmap", setup_add_efi_memmap);
|
||||
|
||||
static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
|
||||
{
|
||||
return efi_call_virt2(get_time, tm, tc);
|
||||
unsigned long flags;
|
||||
efi_status_t status;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
status = efi_call_virt2(get_time, tm, tc);
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
return status;
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_set_time(efi_time_t *tm)
|
||||
{
|
||||
return efi_call_virt1(set_time, tm);
|
||||
unsigned long flags;
|
||||
efi_status_t status;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
status = efi_call_virt1(set_time, tm);
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
return status;
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_get_wakeup_time(efi_bool_t *enabled,
|
||||
efi_bool_t *pending,
|
||||
efi_time_t *tm)
|
||||
{
|
||||
return efi_call_virt3(get_wakeup_time,
|
||||
enabled, pending, tm);
|
||||
unsigned long flags;
|
||||
efi_status_t status;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
status = efi_call_virt3(get_wakeup_time,
|
||||
enabled, pending, tm);
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
return status;
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm)
|
||||
{
|
||||
return efi_call_virt2(set_wakeup_time,
|
||||
enabled, tm);
|
||||
unsigned long flags;
|
||||
efi_status_t status;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
status = efi_call_virt2(set_wakeup_time,
|
||||
enabled, tm);
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
return status;
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_get_variable(efi_char16_t *name,
|
||||
@@ -164,11 +188,14 @@ static efi_status_t __init phys_efi_set_virtual_address_map(
|
||||
static efi_status_t __init phys_efi_get_time(efi_time_t *tm,
|
||||
efi_time_cap_t *tc)
|
||||
{
|
||||
unsigned long flags;
|
||||
efi_status_t status;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
efi_call_phys_prelog();
|
||||
status = efi_call_phys2(efi_phys.get_time, tm, tc);
|
||||
efi_call_phys_epilog();
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user