From: Mark Lord <kernel@teksavvy.com>
To: John Stultz <john.stultz@linaro.org>
Cc: richard -rw- weinberger <richard.weinberger@gmail.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
rtc-linux@googlegroups.com,
Alessandro Zummo <a.zummo@towertech.it>,
Greg Kroah-Hartman <greg@kroah.com>,
stable@vger.kernel.org,
Rabin Vincent <rabin.vincent@stericsson.com>
Subject: Re: [REGRESSION] rtc/interface.c: kills suspend-to-ram
Date: Tue, 17 Apr 2012 16:12:20 -0400 [thread overview]
Message-ID: <4F8DCEA4.9010605@teksavvy.com> (raw)
In-Reply-To: <4F8DCE74.2020906@teksavvy.com>
On 12-04-17 04:11 PM, Mark Lord wrote:
> On 12-04-17 01:13 AM, John Stultz wrote:
> ..
>> - rtc->ops->alarm_irq_enable(rtc->dev.parent, false);
>> + //rtc->ops->alarm_irq_enable(rtc->dev.parent, false);
>> + dump_stack();
> ..
>
> Okay, the call into here is coming from a "hwclock -w -u" line
> in the system suspend script.
Forgot the stack dump:
Pid: 4353, comm: hwclock Tainted: P O 3.3.2 #5
Call Trace:
[<ffffffff8123cfcd>] ? rtc_timer_remove+0x66/0xb2
[<ffffffff8103d2ff>] ? should_resched+0x5/0x23
[<ffffffff8123d21b>] ? rtc_update_irq_enable+0xd0/0x108
[<ffffffff812dd582>] ? __mutex_lock_common.isra.5+0x3b/0x166
[<ffffffff8123e058>] ? rtc_dev_ioctl+0x36d/0x468
[<ffffffff8101b78a>] ? do_page_fault+0x264/0x2ce
[<ffffffff81027650>] ? timespec_add_safe+0x33/0x63
[<ffffffff810077a8>] ? read_tsc+0x5/0x14
[<ffffffff810483fa>] ? timekeeping_get_ns+0xd/0x2a
[<ffffffff810ab492>] ? do_vfs_ioctl+0x45a/0x49c
[<ffffffff810abb8e>] ? poll_select_copy_remaining+0xdb/0xfb
[<ffffffff810ab511>] ? sys_ioctl+0x3d/0x60
[<ffffffff812df222>] ? system_call_fastpath+0x16/0x1b
> Since that command isn't touching the hardware Alarm,
> then neither should the Linux kernel. Yet it is touching it.
>
>> CMOS_WRITE(rtc_control, RTC_CONTROL);
>> - hpet_mask_rtc_irq_bit(mask);
>> + //hpet_mask_rtc_irq_bit(mask);
>>
>> - cmos_checkintr(cmos, rtc_control);
>> + //cmos_checkintr(cmos, rtc_control);
> ...
>
> The problem still occurs (lockup on suspend)
> with both lines above commented out.
>
> Note that it's not 100% in any case, more like 8/10,
> indicating a possible strong race condition somewhere.
>
> I think all that should be done here, is to change the kernel
> to NOT enable/disable the Alarm unless told to do so by
> an explicit userspace action. Eg. writing to /sys/../wakealarm
> and/or /proc/acpi/alarm.
>
> If userspace leaves the alarm alone, then so should the kernel when possible.
> That's the old behaviour before the new alarm_irq_enable() stuff.
>
> Cheers
next prev parent reply other threads:[~2012-04-17 20:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 4:36 [REGRESSION] rtc/interface.c: kills suspend-to-ram Mark Lord
2012-04-16 13:55 ` Mark Lord
2012-04-16 14:23 ` richard -rw- weinberger
2012-04-16 15:42 ` Mark Lord
2012-04-16 15:49 ` richard -rw- weinberger
2012-04-16 15:57 ` Mark Lord
2012-04-16 19:45 ` John Stultz
2012-04-16 21:43 ` John Stultz
2012-04-17 2:30 ` Mark Lord
2012-04-17 5:13 ` John Stultz
2012-04-17 12:51 ` Mark Lord
2012-04-17 20:11 ` Mark Lord
2012-04-17 20:12 ` Mark Lord [this message]
2012-04-17 23:02 ` John Stultz
2012-04-18 1:29 ` Mark Lord
2012-04-18 18:29 ` John Stultz
2012-04-27 14:33 ` Mark Lord
2012-04-27 19:22 ` John Stultz
2012-04-16 19:44 ` John Stultz
2012-04-17 2:27 ` Mark Lord
2012-04-16 14:26 ` [rtc-linux] " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F8DCEA4.9010605@teksavvy.com \
--to=kernel@teksavvy.com \
--cc=a.zummo@towertech.it \
--cc=greg@kroah.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rabin.vincent@stericsson.com \
--cc=richard.weinberger@gmail.com \
--cc=rtc-linux@googlegroups.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox