Thread (2 messages) 2 messages, 2 authors, 2016-08-10

[rtc-linux] [PATCH] x86/hpet: fix typo from rtc cleanup

flat view
STALE3715d REVIEWED: 1 (0M)

From: Arnd Bergmann <arnd@arndb.de>
Date: 2016-08-09 19:57:52
Also in: lkml
Subsystem: hpet: x86, the rest, x86 architecture (32-bit and 64-bit) · Maintainers: Linus Torvalds, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen

1 review trailer.

Ville Syrj=C3=A4l=C3=A4 reports "The first time I run hwclock after rebooti=
ng
I get this:

 open("/dev/rtc", O_RDONLY)              =3D 3
 ioctl(3, PHN_SET_REGS or RTC_UIE_ON, 0) =3D 0
 select(4, [3], NULL, NULL, {10, 0})     =3D 0 (Timeout)
 ioctl(3, PHN_NOT_OH or RTC_UIE_OFF, 0)  =3D 0
 close(3)                                =3D 0

On all subsequent runs I get this:
 open("/dev/rtc", O_RDONLY)              =3D 3
 ioctl(3, PHN_SET_REGS or RTC_UIE_ON, 0) =3D -1 EINVAL (Invalid argument)
 ioctl(3, RTC_RD_TIME, 0x7ffd76b3ae70)   =3D -1 EINVAL (Invalid argument)
 close(3)                                =3D 0"

This was caused by a stupid typo in a patch that should have been
a simple rename to move around contents of a header file, but
accidentally wrote zeroes into the rtc rather than reading from
it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Ville Syrj=C3=A4l=C3=A4 <redacted>
Tested-by: Ville Syrj=C3=A4l=C3=A4 <redacted>
Fixes: 463a86304cae ("char/genrtc: x86: remove remnants of asm/rtc.h")
---
 arch/x86/kernel/hpet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index ed16e58658a4..c6dfd801df97 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -1242,7 +1242,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
 	memset(&curr_time, 0, sizeof(struct rtc_time));
=20
 	if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
-		mc146818_set_time(&curr_time);
+		mc146818_get_time(&curr_time);
=20
 	if (hpet_rtc_flags & RTC_UIE &&
 	    curr_time.tm_sec !=3D hpet_prev_update_sec) {
--=20
2.9.0

--=20
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.
---=20
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 e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help