From: "Zhang, Rui" <rui.zhang@intel.com>
To: David Brownell <david-b@pacbell.net>
Cc: "Zhao, Yakui" <yakui.zhao@intel.com>,
linux-acpi@vger.kernel.org, lenb@kernel.org
Subject: Re: [RFC] [PATCH 1/3] Allow to override the RTC alarm time
Date: Wed, 09 Apr 2008 15:46:07 +0800 [thread overview]
Message-ID: <1207727167.27304.20.camel@acpi-hp-zz.sh.intel.com> (raw)
In-Reply-To: <200804090034.42339.david-b@pacbell.net>
On Wed, 2008-04-09 at 15:34 +0800, David Brownell wrote:
> On Tuesday 08 April 2008, Zhao Yakui wrote:
> > Subject: ACPI: Allow to override the RTC alarm time
> > >From : Zhao Yakui <yakui.zhao@intel.com>
> >
> > In current kernel when RTC alarm time is set and not fired,
> > it is impossible to set RTC alarm again. But it is more
> > reasonable that the RTC alarm time can be overrided.
>
> I'll disagree. The problem is that if some task is waiting
> for the alarm at the specified time, you've just trashed the
> alarm it was relying on.
Hmm, what if the wakealarm is set by mistake?
is there any chance that user can fix it?
If not, we can add another prefix so that user can override
the wakealarm file if really needed, just like what we do in patch 3.
thanks,
rui
>
>
> > --- linux-2.6.orig/drivers/rtc/rtc-sysfs.c
> > +++ linux-2.6/drivers/rtc/rtc-sysfs.c
> > @@ -163,8 +163,6 @@ rtc_sysfs_set_wakealarm(struct device *d
>
> The comment explains much of this ... and if this patch
> were deemed to be good, you should have changed that comment
> rather than making it a lie:
>
> /* Avoid accidentally clobbering active alarms; we
> can't
> * entirely prevent that here, without even the
> minimal
> * locking from the /dev/rtcN api.
> */
> retval = rtc_read_alarm(rtc, &alm);
>
>
> > retval = rtc_read_alarm(rtc, &alm);
> > if (retval < 0)
> > return retval;
> > - if (alm.enabled)
> > - return -EBUSY;
> >
> > alm.enabled = 1;
> > } else {
> >
> >
>
>
>
>
next prev parent reply other threads:[~2008-04-09 8:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 6:34 [RFC] [PATCH 1/3] Allow to override the RTC alarm time Zhao Yakui
2008-04-09 7:34 ` David Brownell
2008-04-09 7:46 ` Zhang, Rui [this message]
2008-04-09 8:27 ` David Brownell
2008-04-09 16:55 ` Zhao Yakui
2008-04-09 10:13 ` David Brownell
2008-04-10 11:08 ` Zhao Yakui
2008-04-11 5:13 ` David Brownell
2008-04-11 11:04 ` Zhao Yakui
2008-04-11 3:46 ` David Brownell
2008-04-11 12:44 ` Zhao Yakui
2008-04-11 5:12 ` David Brownell
2008-04-11 6:30 ` Alessandro Zummo
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=1207727167.27304.20.camel@acpi-hp-zz.sh.intel.com \
--to=rui.zhang@intel.com \
--cc=david-b@pacbell.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=yakui.zhao@intel.com \
/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