All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Andreas Schwab <schwab@linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: RTC seems broken on 2.6.38-rc1 for RTCs lacking alarms.
Date: Thu, 20 Jan 2011 14:54:34 -0800	[thread overview]
Message-ID: <4D38BD2A.2070705@caviumnetworks.com> (raw)
In-Reply-To: <1295562203.2998.105.camel@work-vm>

On 01/20/2011 02:23 PM, John Stultz wrote:
> On Thu, 2011-01-20 at 22:24 +0100, Geert Uytterhoeven wrote:
>> On Thu, Jan 20, 2011 at 22:16, John Stultz<john.stultz@linaro.org>  wrote:
>>> On Thu, 2011-01-20 at 12:51 -0800, David Daney wrote:
>>>> open("/dev/rtc0", O_RDONLY|O_LARGEFILE) = 3
>>>> ioctl(3, PRESTO_GETMOUNT or RTC_UIE_ON, 0) = 0
>>>> _newselect(4, [3], NULL, NULL, {5, 0})  = 0 (Timeout)
>>>> write(2, "select() to /dev/rtc0 to wait for"..., 55select() to /dev/rtc0
>>>> to wait for clock tick timed out
>>>> ) = 55
>>>> ioctl(3, PRESTO_SETPID or RTC_UIE_OFF, 0) = 0
>>>> close(3)                                = 0
>>>> exit_group(1)                           = ?
>>>>
>>>>
>>>> The hwclock program is asking to put the clock in UIE mode and then
>>>> does a select() on it.  Since the alarm doesn't work, the select times out.
>>>>
>>>> Previously the ioctl(RTC_UIE_ON) would return EINVAL:
>>>
>>> Ah. Good diagnosis! Let me try to get a patch for you and Andreas to
>>> test.
>>
>> I'm also seeing this on m68k (ARAnyM, rtc-generic).
>
> Geert, David, Andreas,
> 	Could you try the following? Its a bit messy of a patch doing a couple
> of things:
>
> 1) Simplify the timer->enabled management by pushing it into
> rtc_timer_enqueue/remove (needed cleanup for #2).
>
> 2) Properly propagating errors from __rtc_set_alarm back through
> rtc_timer_enqueue and users.
>
> 3) Trivial clenaup making rtc_timer_enqueue/remove static.
>
> 4) Fixup virtualized rtc_read_alarm to check hardware capabilities and
> return errors (also restores zeroing of the rtc_wkalrm stucture).
>
> I'll be cleaning these up and breaking them into commits I can send
> upward, but I wanted to make sure it resolves the issue for you.
>
> Let me know if it fixes things.
>
> thanks
> -john
>

John,

With that patch, it works now.  Thanks.

You can add:

Tested-by: David Daney <ddaney@caviumnetworks.com>



  reply	other threads:[~2011-01-20 22:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 20:51 RTC seems broken on 2.6.38-rc1 for RTCs lacking alarms David Daney
2011-01-20 21:16 ` John Stultz
2011-01-20 21:24   ` Geert Uytterhoeven
2011-01-20 22:23     ` John Stultz
2011-01-20 22:54       ` David Daney [this message]
2011-01-21 10:48         ` Andreas Schwab

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=4D38BD2A.2070705@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=a.zummo@towertech.it \
    --cc=geert@linux-m68k.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.