public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: David Brownell <david-b@pacbell.net>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: RTC_DRV_CMOS can break userspace interface
Date: Mon, 28 May 2007 03:16:22 +0100	[thread overview]
Message-ID: <20070528021622.GA24517@srcf.ucam.org> (raw)
In-Reply-To: <200705271844.54589.david-b@pacbell.net>

On Sun, May 27, 2007 at 06:44:49PM -0700, David Brownell wrote:
> On Sunday 27 May 2007, Matthew Garrett wrote:
> > Actually, it seems to be worse than that - the PNP entry for my cmos 
> > clock doesn't appear to mention an irq, so the wakealarm entry doesn't 
> > work. I can happily wake it using the /proc/acpi/alarm interface.
> > 
> > David, would you be happy with hardcoding the rtc-cmos IRQ to 8 on PCs 
> > if there's inadequate PNP information available?
> 
> That would seem to naturally belong in the PNP code, yes?
> 
> Agreed that it seems like it needs to be hardcoded somewhere.

The PNP code is reporting what's in the tables - I'd be a bit surprised 
if it special-cased specific devices, but I guess there's an argument 
for that. All the other machines I've checked report an IRQ, so I guess 
Apple just didn't take much care in getting this right.

As far as sanity checking goes - how about we check that the reported 
io ports are the legacy range, and if so hardcode the irq if the 
hardware hasn't reported one? I'd /hope/ that nobody has produced any 
hardware that that would break, but then, well. The strongest argument 
for it being safe is probably that the legacy RTC driver seems to 
hardcode this and hasn't obviously been breaking things.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2007-05-28  2:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-27 19:03 RTC_DRV_CMOS can break userspace interface Matthew Garrett
2007-05-27 23:39 ` Matthew Garrett
2007-05-28  0:38   ` Matthew Garrett
2007-05-28  1:44     ` David Brownell
2007-05-28  2:16       ` Matthew Garrett [this message]
2007-05-28  7:45         ` Matthieu CASTET
2007-05-28 19:16           ` Matthew Garrett
2007-05-28  1:36 ` David Brownell
     [not found] <8pwhX-46n-3@gated-at.bofh.it>
     [not found] ` <8pCQo-5QL-7@gated-at.bofh.it>
     [not found]   ` <87abvogbdp.fsf@buer.dfakt.de>
2007-05-28 21:06     ` David Brownell

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=20070528021622.GA24517@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=david-b@pacbell.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@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