Re: __rtc_read_alarm missing month/year field bug?

From: Joe Lawrence
Date: Thu Jul 21 2016 - 15:52:13 EST

On 07/19/2016, Alexandre Belloni wrote:
> Well like said in my previous mail, I don't think the rollover is the
> issue here but I'm interested in knowing what conditions are leading >
to endless interrupts.

Hi Alexandre,

Unfortunately I've switched employers so I no longer have access to the
hardware, but if I remember correctly the scenario went like this:

- boot machine with RTC alarm set in far future
- run 'hwclock' user program
- hwclock sync to clock tick
- kernel sees RTC alarm is outstanding
- hpet_rtc_interrupt's start streaming in

In the case of this hardware platform, there was a problem with the CMOS
RTC read such that hpet_rtc_interrupt / rtc_cmos_read believed that the
RTC was busy updating ... that code would delay long enough that the
next HPET rtc interrupt would come in right behind it and choke the CPU
from scheduling anything else.

That platform-specific bug aside, I thought I would report this
strangeness in case it was a real bug -- looks like I didn't fully
consider the rollover case.

-- Joe