From: Valdis.Kletnieks@vt.edu
To: Samuel Thibault <Samuel.Thibault@ens-lyon.org>
Cc: Shérab <Sebastien.Hinderer@ens-lyon.org>,
"H. Peter Anvin" <hpa@zytor.com>, "Len Brown" <lenb@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
x86@kernel.org, "Andrew Morton" <akpm@linux-foundation.org>,
"Frederic Weisbecker" <fweisbec@gmail.com>,
"Andres Salomon" <dilinger@queued.net>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: EuroBraille/Iris power off
Date: Mon, 13 Sep 2010 21:45:49 -0400 [thread overview]
Message-ID: <7925.1284428749@localhost> (raw)
In-Reply-To: Your message of "Mon, 13 Sep 2010 17:22:49 +0200." <20100913152249.GC5364@const.bordeaux.inria.fr>
[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]
On Mon, 13 Sep 2010 17:22:49 +0200, Samuel Thibault said:
> Again, I'm not sure we really should try hard to make it automatically
> detected (and thus always enabled). Having to pass a kernel parameter
> to enable the functionality is completely fine, since installing Linux
> on this device requires quite some tinkering already.
I'm agreeing that if iris_init() checks that the user passed 'irisinit.force=1'
on the command line or as a module parameter, and bailed immediately if it
wasn't passed, then doing the inb() and testing it should be safe enough. Doing
stuff that's only known safe on an Iris is no great sin if the user has said
"Yes, you're on a Iris" - at that point it's the user's fault.
static int iris_init(void)
{
unsigned char status;
if (!irisinit.force) return; /* or whatever the appropriate test is */
status = inb(IRIS_GIO_INPUT);
if (status == IRIS_GIO_NODEV) {
printk(KERN_ERR "This machine does not seem to be an Iris. Power_off handler not installed.\n");
return -ENODEV;
}
That look safe enough to everybody? That way, even if a distro turns on every
CONFIG_FOO that compiles (you guys know who you are ;), it should still DTRT on
all platforms.
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2010-09-14 1:46 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-25 9:49 [PATCH] x86: EuroBraille/Iris power off Shérab
2010-08-25 16:12 ` Andreas Mohr
2010-08-25 21:12 ` Sebastien Hinderer
2010-08-25 21:19 ` H. Peter Anvin
2010-08-25 22:50 ` Samuel Thibault
2010-08-26 0:06 ` H. Peter Anvin
2010-08-26 0:19 ` Samuel Thibault
2010-08-26 6:45 ` Sebastien Hinderer
2010-08-26 6:55 ` H. Peter Anvin
2010-08-26 7:09 ` Andreas Mohr
2010-08-26 9:29 ` Sebastien Hinderer
2010-08-26 18:11 ` Len Brown
2010-08-26 21:08 ` Shérab
2010-08-26 21:16 ` H. Peter Anvin
2010-08-27 17:35 ` Shérab
2010-08-27 18:49 ` H. Peter Anvin
2010-08-27 22:27 ` Shérab
2010-08-29 20:59 ` Shérab
2010-09-13 10:07 ` Shérab
2010-09-13 15:10 ` Valdis.Kletnieks
2010-09-13 15:22 ` Samuel Thibault
2010-09-13 16:06 ` H. Peter Anvin
2010-09-13 16:12 ` Samuel Thibault
2010-09-14 1:45 ` Valdis.Kletnieks [this message]
2010-09-14 5:16 ` Shérab
2010-09-20 8:22 ` Shérab
2010-09-26 17:54 ` Shérab
2010-10-10 16:22 ` Shérab
2010-11-13 19:22 ` Shérab
2010-09-13 15:25 ` Shérab
2010-09-13 15:48 ` H. Peter Anvin
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=7925.1284428749@localhost \
--to=valdis.kletnieks@vt.edu \
--cc=Samuel.Thibault@ens-lyon.org \
--cc=Sebastien.Hinderer@ens-lyon.org \
--cc=akpm@linux-foundation.org \
--cc=dilinger@queued.net \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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