public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Matthew Garrett <mjg@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, Len Brown <lenb@kernel.org>,
	Luca Tettamanti <kronos.it@gmail.com>,
	Thomas Renninger <trenn@suse.de>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: add "auto" to acpi_enforce_resources
Date: Tue, 10 Feb 2009 14:57:16 +0100	[thread overview]
Message-ID: <20090210145716.105ab58b@hyperion.delvare> (raw)
In-Reply-To: <20090204142015.GB3923@srcf.ucam.org>

Hi Matthew,

Sorry for the late answer.

On Wed, 4 Feb 2009 14:20:15 +0000, Matthew Garrett wrote:
> On Wed, Feb 04, 2009 at 02:26:06PM +0100, Jean Delvare wrote:
> > On Wed, 4 Feb 2009 13:17:09 +0000, Matthew Garrett wrote:
> > > Personally, I'd rather that it was "strict" on everything. We might 
> > > break some existing setups, but they're already working mostly by luck.
> > 
> > Are you the new hwmon and i2c subsystems maintainer and I wasn't aware
> > of it?
> 
> If you've got some programmatic way to tell the difference between safe 
> and dangerous reuse of ACPI resources then that would obviously be 
> preferable, but I doubt that's practical.

I wish we had such a way, but I don't know of any. If someone can think
of one, that would be someone who knows ACPI much better than I do.

> auto is a compromise that 
> avoids one specific case of breakage, but it does nothing to protect us 
> on the majority of systems. Allowing the firmware and the OS to attempt 
> to access the same hardware without any locking is an invitation for 
> disaster, and in the absence of any way to prevent the firmware from 
> doing it...

In theory you are, of course, perfectly right. The question is, how do
we get there without making people angry because of the regression? I
had yet another example a few days ago:

http://lists.lm-sensors.org/pipermail/lm-sensors/2009-February/025297.html

That system implements an ACPI thermal zone, which apparently reads its
values from the second temperature channel of the IT8716F Super-I/O
chip. This channels happens to be broken (not sure why but that's not
really the point) and returns a wrong temperature value.

The same chip can be driven by our native it87 driver, which, on this
specific board, provides support for 9 voltages, 3 fans, and 1 working
temperature. Do we really have to tell the user to not use the it87
driver and instead use the ACPI thermal driver "because that's what the
firmware wants"?

In this case, I really would like to be able to blacklist the ACPI
thermal device, and let the it87 driver handle the device. If we can
have such a blacklist in the kernel, then I am fine switching the
resource conflict check to "strict" by default. But is is possible? I
would like the ACPI people to tell me. Basically the logic would be as
follows:

if (not laptop) {
	if (ACPI thermal zone defined
	 && no custom ACPI code dealing with thermal conditions) {
		disable ACPI thermal zone and free its resources for native driver
	}
}

But I guess there is no way to know what exactly the ACPI thermal zone
is doing, except by looking at the DSDT, so this can't be automated?

Is it at least possible to disable the ACPI thermal zone either as a
command-line parameter or an internal blacklist?

> But. Hans asked for my opinion - the maintainer's is obviously more 
> relevant.

Well, officially I am not the maintainer of the hwmon subsystem, only
whose of the i2c subsystem. But the fact is that the resource conflict
checking policy affects both the same way. That being said, I'm not
sure how worth my opinion (about this specific matter) is these days...

What I want you (and everyone) to realize is that just switching the
default checking level to strict tomorrow isn't going to work. If we
want the default to be strict then we will have to add a number of
mechanisms to let the user override this in a way which is as easy and
transparent as possible for the user.

One approach that may work is to change the default based on the ACPI
implementation year (I think the info is available, right?) We could
default to strict for systems with year >= 2009. This may still prevent
users from getting the best out of their system, but at least won't
cause a regression for users of older systems where the native driver
has been used so far. I know it's not an ideal solution, but ACPI
implementations aren't ideal either.

-- 
Jean Delvare

  reply	other threads:[~2009-02-10 13:57 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-25 21:05 [PATCH] ACPI: add "auto" to acpi_enforce_resources Luca Tettamanti
2009-01-26  8:37 ` Hans de Goede
2009-01-29 10:30 ` Thomas Renninger
2009-01-29 15:16   ` Luca Tettamanti
2009-01-29 16:29     ` Thomas Renninger
2009-01-29 18:58       ` Hans de Goede
2009-01-29 21:31         ` Jean Delvare
2009-01-30 14:29         ` Thomas Renninger
2009-02-01 21:22           ` Luca Tettamanti
2009-02-02  9:11             ` Jean Delvare
2009-02-02 11:38               ` Luca Tettamanti
2009-02-02 17:22                 ` [PATCH 1/2] RFC: ACPI: Interface for ACPI drivers to place quirk code which gets executed early Thomas Renninger
2009-02-02 20:22                   ` Luca Tettamanti
2009-02-03 13:08                     ` Thomas Renninger
2009-02-03 13:45                       ` Luca Tettamanti
2009-02-03 14:19                         ` Jean Delvare
2009-02-04 13:37                     ` Thomas Renninger
2009-02-02 17:22                 ` [PATCH 2/2] RFC: ACPI: Set enforce_resources to strict if a ATK0110 device is found in namespace Thomas Renninger
2009-02-02 20:29                   ` Luca Tettamanti
2009-02-02 11:38             ` [PATCH] ACPI: add "auto" to acpi_enforce_resources Thomas Renninger
2009-01-29 21:15       ` Luca Tettamanti
2009-02-04  5:52     ` Len Brown
2009-02-04  6:05       ` Matthew Garrett
2009-02-04  8:37         ` Hans de Goede
2009-02-04 13:17           ` Matthew Garrett
2009-02-04 13:26             ` Jean Delvare
2009-02-04 14:20               ` Matthew Garrett
2009-02-10 13:57                 ` Jean Delvare [this message]
2009-02-10 14:08                   ` Matthew Garrett
2009-02-10 15:32                     ` Hans de Goede
2009-02-10 16:24                       ` Jean Delvare
2009-02-27 13:27                         ` Pavel Machek
2009-03-24 12:39                           ` Luca Tettamanti
2009-03-24 13:21                             ` Hans de Goede
2009-03-24 13:43                               ` Jean Delvare
2009-03-24 14:29                                 ` Hans de Goede
2009-03-29 20:16                               ` Luca Tettamanti
2009-03-29 20:33                                 ` Pavel Machek
2009-03-29 20:55                                 ` Jean Delvare
2009-03-29 22:01                                   ` Luca Tettamanti
2009-03-30  7:36                                     ` Jean Delvare
2009-04-02 22:59                                     ` Len Brown
2009-04-03  9:40                                       ` Jean Delvare
2009-02-12 12:44                     ` Jean Delvare
2009-04-02 22:45         ` polling (Re: [PATCH] ACPI: add "auto" to acpi_enforce_resources) Len 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=20090210145716.105ab58b@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=hdegoede@redhat.com \
    --cc=kronos.it@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=trenn@suse.de \
    /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