public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Jan Beulich <JBeulich@novell.com>,
	mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: serialize EFI time accesses on rtc_lock
Date: Tue, 19 Jul 2011 18:54:32 +0100	[thread overview]
Message-ID: <20110719175432.GA23018@srcf.ucam.org> (raw)
In-Reply-To: <CADZ9YHiBkfcM3jjjJVh_Ydn+uJxjYM6SnDZ=5J3Mmki7fp3NbQ@mail.gmail.com>

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@srcf.ucam.org

  reply	other threads:[~2011-07-19 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 10:53 [PATCH] x86: serialize EFI time accesses on rtc_lock Jan Beulich
2011-07-19 11:19 ` Matthew Garrett
2011-07-19 17:32 ` Rakib Mullick
2011-07-19 17:54   ` Matthew Garrett [this message]
2011-07-20 12:46     ` Rakib Mullick
2011-07-21 10:08 ` [tip:timers/rtc] x86: Serialize " tip-bot for Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110719175432.GA23018@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=JBeulich@novell.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rakib.mullick@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox