From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Subject: Re: [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock Date: Tue, 8 Dec 2015 12:48:54 +0000 Message-ID: <20151208124854.GC2518@codeblueprint.co.uk> References: <1448967020-20190-1-git-send-email-ard.biesheuvel@linaro.org> <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1448967020-20190-7-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ard Biesheuvel Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alexandre Belloni , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: linux-efi@vger.kernel.org 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 > --- > 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com. [2a00:1450:400c:c09::230]) by gmr-mx.google.com with ESMTPS id w79si70269wme.2.2015.12.08.04.48.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 04:48:56 -0800 (PST) Received: by mail-wm0-x230.google.com with SMTP id w144so179303620wmw.1 for ; Tue, 08 Dec 2015 04:48:56 -0800 (PST) Date: Tue, 8 Dec 2015 12:48:54 +0000 From: Matt Fleming To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, Alexandre Belloni , linux-kernel@vger.kernel.org, Thomas Gleixner , rtc-linux@googlegroups.com Subject: [rtc-linux] Re: [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock Message-ID: <20151208124854.GC2518@codeblueprint.co.uk> References: <1448967020-20190-1-git-send-email-ard.biesheuvel@linaro.org> <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 In-Reply-To: <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org> Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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 > --- > 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. -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932866AbbLHMtk (ORCPT ); Tue, 8 Dec 2015 07:49:40 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37073 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933489AbbLHMs5 (ORCPT ); Tue, 8 Dec 2015 07:48:57 -0500 Date: Tue, 8 Dec 2015 12:48:54 +0000 From: Matt Fleming To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, Alexandre Belloni , linux-kernel@vger.kernel.org, Thomas Gleixner , rtc-linux@googlegroups.com Subject: Re: [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock Message-ID: <20151208124854.GC2518@codeblueprint.co.uk> References: <1448967020-20190-1-git-send-email-ard.biesheuvel@linaro.org> <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448967020-20190-7-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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.