From: Mattia Dongili <malattia@linux.it>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>,
Eric Piel <eric.piel@tremplin-utc.net>,
Pavel Machek <pavel@suse.cz>,
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>,
linux-acpi@vger.kernel.org
Subject: Re: why do drivers evaluate _INI?
Date: Tue, 23 Jun 2009 11:05:13 +0900 [thread overview]
Message-ID: <20090623020513.GB22940@kamineko.org> (raw)
In-Reply-To: <200906221732.35993.bjorn.helgaas@hp.com>
On Mon, Jun 22, 2009 at 05:32:35PM -0600, Bjorn Helgaas wrote:
> [Sorry for the duplicate; I meant to CC: linux-acpi, so I added it here.]
>
> Why do we have ACPI device drivers evaluating _INI? That seems
> like something that should be done by Linux/ACPI, not by the driver.
>
> I see the following drivers using _INI:
> drivers/hwmon/hp_accel.c
> drivers/platform/x86/fujitsu-laptop.c
> drivers/platform/x86/sony-laptop.c
>
> I looked at the git logs where the _INI usage was introduced in
> these drivers, but none gives enough information for me to understand
> why.
>
> If running _INI in the driver makes a difference, I think it's
> really telling us about a problem in Linux/ACPI, and we should
> fix that problem rather than sprinkling _INI evaluation around
> in drivers.
>
> I do see _INI evaluation in this path:
>
> acpi_init
> acpi_bus_init
> acpi_initialize_objects(ACPI_FULL_INITIALIZATION)
> acpi_ns_initialize_devices
> acpi_ns_walk_namespace .. acpi_ns_init_one_device
>
> The spec (section 6.5.1) says OSPM should run _INI when a
> description table is loaded. I assume the above path does
> this for the DSDT, at least, but I'm not smart enough about
> the ACPI CA to know whether we also handle SSDTs and dynamic
> LoadTables correctly.
well, it was long ago... I was going to say that when I added it it was because
ospm wasn't calling _INI on the SNY6001 device but it doesn't seem to be the
case... it was just my imagination I guess. I'll double check.
Anyway, from a quick look, _STA on the SNY6001 is always returning 0x0F
or 0x0D depending on the device being assigned an irq or not so ospm
should be good. I think the _INI call can be removed for sony-laptop.
cheers
--
mattia
:wq!
next prev parent reply other threads:[~2009-06-23 2:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 23:32 why do drivers evaluate _INI? Bjorn Helgaas
2009-06-22 23:59 ` Jonathan Woithe
2009-06-23 15:17 ` nokos
2009-06-24 0:15 ` Jonathan Woithe
2009-06-24 9:19 ` nokos
2009-06-23 0:01 ` Tony Vroon
2009-06-23 0:28 ` Jonathan Woithe
2009-06-23 2:05 ` Mattia Dongili [this message]
2009-06-23 8:53 ` Corentin Chary
2009-06-23 15:01 ` Bjorn Helgaas
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=20090623020513.GB22940@kamineko.org \
--to=malattia@linux.it \
--cc=bjorn.helgaas@hp.com \
--cc=eric.piel@tremplin-utc.net \
--cc=jwoithe@physics.adelaide.edu.au \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=pavel@suse.cz \
/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