linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock
       [not found] ` <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org>
@ 2015-12-08 12:48   ` Matt Fleming
  2015-12-08 13:11     ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Fleming @ 2015-12-08 12:48 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: linux-efi, Alexandre Belloni, linux-kernel, Thomas Gleixner, rtc-linux

On Tue, 01 Dec, at 11:50:19AM, Ard Biesheuvel wrote:
> The rtc_lock spinlock aims to serialize access to the CMOS RTC between
> the UEFI firmware and the kernel drivers that use it directly. However,
> x86 is the only arch that performs such direct accesses, and that never
> uses the time related UEFI runtime services. Since no other UEFI enlightened
> architectures have a legcay CMOS RTC anyway, we can remove the rtc_lock
> spinlock entirely.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  drivers/firmware/efi/runtime-wrappers.c | 32 +++++---------------
>  1 file changed, 8 insertions(+), 24 deletions(-)

Is this really true? It's not possible, for instance, for 32-bit ARM
systems to use the rtc-cmos driver which would access the same
physical device that UEFI would with the GetTime() service?

With the pending 32-bit ARM UEFI support coming, this needs to be
considered carefully.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock
  2015-12-08 12:48   ` [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock Matt Fleming
@ 2015-12-08 13:11     ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2015-12-08 13:11 UTC (permalink / raw)
  To: Matt Fleming
  Cc: linux-efi, Alexandre Belloni, linux-kernel, Thomas Gleixner, rtc-linux

On 8 December 2015 at 13:48, Matt Fleming <matt@codeblueprint.co.uk> wrote:
> On Tue, 01 Dec, at 11:50:19AM, Ard Biesheuvel wrote:
>> The rtc_lock spinlock aims to serialize access to the CMOS RTC between
>> the UEFI firmware and the kernel drivers that use it directly. However,
>> x86 is the only arch that performs such direct accesses, and that never
>> uses the time related UEFI runtime services. Since no other UEFI enlightened
>> architectures have a legcay CMOS RTC anyway, we can remove the rtc_lock
>> spinlock entirely.
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  drivers/firmware/efi/runtime-wrappers.c | 32 +++++---------------
>>  1 file changed, 8 insertions(+), 24 deletions(-)
>
> Is this really true? It's not possible, for instance, for 32-bit ARM
> systems to use the rtc-cmos driver which would access the same
> physical device that UEFI would with the GetTime() service?
>
> With the pending 32-bit ARM UEFI support coming, this needs to be
> considered carefully.

That seems highly unlikely. Even if 32-bit UEFI ARM systems existed
with this particular RTC (which is highly doubtful), it should not be
exposed to the OS in the first place, since we don't have the
compatibility concern that the PC has in that regard (where it is a
requirement)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-08 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1448967020-20190-1-git-send-email-ard.biesheuvel@linaro.org>
     [not found] ` <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org>
2015-12-08 12:48   ` [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock Matt Fleming
2015-12-08 13:11     ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).