[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110719175432.GA23018@srcf.ucam.org>
Date: Tue, 19 Jul 2011 18:54:32 +0100
From: Matthew Garrett <mjg59@...f.ucam.org>
To: Rakib Mullick <rakib.mullick@...il.com>
Cc: Jan Beulich <JBeulich@...ell.com>, mingo@...e.hu,
tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: serialize EFI time accesses on rtc_lock
On Tue, Jul 19, 2011 at 11:32:05PM +0600, Rakib Mullick wrote:
> If I'm not missing anything, this implementation (serialization) could
> be simpler by holding rtc_lock at the time of calling those functions.
> I mean, holding rtc_lock before calling EFI services
> virt_efi_get/set_time and virt_efi_get/set_wakeup_time - something
> like below:
>
> spin_lock_irqsave(&rtc_lock, flags);
> efi.get_time = virt_efi_get_time;
> efi.set_time = virt_efi_set_time;
> efi.get_wakeup_time = virt_efi_get_wakeup_time;
> efi.set_wakeup_time = virt_efi_set_wakeup_time;
> spin_unlock_irqrestore(&rtc_lock, flags);
That's just assigning some function pointers, not actually making the
calls. There's potentially several routes to each of the calls, so it
makes sense to do the locking there.
--
Matthew Garrett | mjg59@...f.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists