Bug 1123882

Summary: Please enable CONFIG_RTC_DRV_PL031 on aarch64
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ddutile, gansalmon, itamar, jonathan, kernel-maint, kmcmartin, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-21 18:58:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 910269    

Description Richard W.M. Jones 2014-07-28 14:25:07 UTC
Description of problem:

PL031 is a real time clock.

Although it is not found on real hardware AFAICT, it is emulated by
qemu-system-aarch64 and therefore it's a useful way to get wallclock
time in VMs.

There is no kvmclock on !x86, and without PL031 the VM's time will
be set to 1/1/1970 for a long time (until you start ntpd which is quite
a long time into the boot process, and never happens in libguestfs VMs).

I have enabled this option in my kernel and tested it booting on
both the real hardware and inside a VM.  It has no effect on the
real hardware.

In the VM it ensures that the wallclock is set correctly close to boot.
You will see this message during VM boot:

[    0.742380] rtc-pl031 90010000.pl031: rtc core: registered pl031 as rtc0
[    0.789316] rtc-pl031 90010000.pl031: setting system clock to 2014-07-28 14:21:39 UTC (1406557299)

Version-Release number of selected component (if applicable):

3.16.0-0.rc6.git3.1.fc22.aarch64

How reproducible:

100%

Steps to Reproduce:
1. Start a KVM VM.
2. Observe the clock in the VM.  It is set to 1/1/1970.

Comment 1 Don Dutile (Red Hat) 2014-07-28 17:11:38 UTC
CONFIG =y or =m ?

Comment 2 Richard W.M. Jones 2014-07-28 17:37:39 UTC
(In reply to Don Dutile from comment #1)
> CONFIG =y or =m ?

I'm testing it compiled in (=y).  It doesn't affect boot on the
aarch64 real hardware.  I believe it'd be better for the clock to
be compiled in so that it can be initialized as soon as possible.

Comment 3 Richard W.M. Jones 2014-10-21 10:13:21 UTC
I've been testing this patch for months.  What can I do to
get this actioned?  I will push it myself if permitted.

diff --git a/config-arm64 b/config-arm64
index bdcc9b9..eac2b9a 100644
--- a/config-arm64
+++ b/config-arm64
@@ -52,7 +52,7 @@ CONFIG_NFS_USE_KERNEL_DNS=y
 # CONFIG_PL330_DMA is not set
 CONFIG_RCU_FANOUT=64
 # CONFIG_RTC_DRV_PL030 is not set
-# CONFIG_RTC_DRV_PL031 is not set
+CONFIG_RTC_DRV_PL031=y
 CONFIG_SERIAL_8250_DMA=y
 # CONFIG_SERIAL_AMBA_PL010 is not set
 CONFIG_SPARSE_IRQ=y

Comment 4 Josh Boyer 2014-10-21 12:26:40 UTC
I'll change it in today's rawhide build.

Comment 5 Red Hat Bugzilla 2023-09-14 02:12:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days