[lkml]   [2008]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: Solid freezes with 2.6.25

    * Gabor Gombas <> [2008-05-07 15:42]:
    > On Wed, May 07, 2008 at 02:45:20PM +0200, Bernhard Walle wrote:
    > > You can log it to a file or output it over serial console. Or make the
    > > window sticky. ;)
    > Well, the machine hung and I was on a different virtual desktop. The
    > output of the script together with netconsole output is below. Right now
    > I don't have another machine that could be used for serial console.

    Well, can you try if that really not happens without
    CONFIG_HPET_EMULATE_RTC? The question is if that 64 interrupts per second really
    cause a machine hang ...

    However, the other question is why you get that RTC interrupts at all.
    I compared the old RTC implementation (drivers/char/rtc.c) with the new
    RTC interface (rtc-cmos.c) and the old implementation disables
    interrupts automatically when the device is closed in userspace while
    the new doesn't. I think the old one makes more sense, and so I think
    the following patch should be applied. Gabor, can you also test that
    patch ... it should fix your problem.

    For debugging purposes it makes sense to apply the debug patch also (the
    printk() in the interrupt handler). It should not conflict.


    From: Bernhard Walle <>
    Subject: [PATCH] Disable RTC interrupts when closing the device

    This patch disables RTC for rtc_cmos interrupts when the /dev/rtcX is closed.
    Previously, the userspace program explicitely had to call ioctl(RTC_..._OFF).

    This is the same behaviour as the old drivers/char/rtc.c driver. Especially
    when using the HPET emulation which uses a timer frequency of 64 Hz by default
    it makes sense to disable this interrupts.

    Signed-off-by: Bernhard Walle <>

    drivers/rtc/rtc-cmos.c | 18 ++++++++++++++++++
    1 file changed, 18 insertions(+)

    --- a/drivers/rtc/rtc-cmos.c
    +++ b/drivers/rtc/rtc-cmos.c
    @@ -302,6 +302,23 @@ static int cmos_irq_set_state(struct dev
    return 0;

    +static void
    +cmos_rtc_release(struct device *dev)
    + unsigned char tmp;
    + spin_lock_irq(&rtc_lock);
    + if (!hpet_mask_rtc_irq_bit(RTC_PIE | RTC_AIE | RTC_UIE)) {
    + tmp &= ~RTC_PIE;
    + tmp &= ~RTC_AIE;
    + tmp &= ~RTC_UIE;
    + }
    + spin_unlock_irq(&rtc_lock);

    static int
    @@ -409,6 +426,7 @@ static int cmos_procfs(struct device *de

    static const struct rtc_class_ops cmos_rtc_ops = {
    .ioctl = cmos_rtc_ioctl,
    + .release = cmos_rtc_release,
    .read_time = cmos_read_time,
    .set_time = cmos_set_time,
    .read_alarm = cmos_read_alarm,

     \ /
      Last update: 2008-05-12 14:25    [W:0.031 / U:0.172 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site