From: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
To: Rudolf Marek <r.marek@assembler.cz>
Cc: LM Sensors <lm-sensors@lm-sensors.org>,
linux-acpi@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>
Subject: Re: ACPI bytecode hardware registers access
Date: Mon, 05 Feb 2007 21:10:37 +0300 [thread overview]
Message-ID: <45C7731D.4050309@linux.intel.com> (raw)
In-Reply-To: <45C75E20.8010101@assembler.cz>
Hi,
> I studied ACPI spec once a while and there is only global lock (this is used for
> SMM ) and also there might be some per device mutexes, but I never seen them
> implemented. Maybe there might be implemented some per ACPI device mutex, so
> regions belonging to this device will be locked if the code execution is still
> in device methods. I dont know if it would work for the "globaly" declared
> regions...
>
>
Mutexes are ACPI internal things, they guard either ACPI BIOS vs. ACPI
OS-side (Global Lock) or just ACPI os-side.
There is no requirement for mutexes to exist for a physical device, so
using them to manage access to physical
device will not generally work.
> Second possibility is to have some kind of that port forwarder, which will
> direct the actual access from ACPI to the Linux driver. The driver then knows if
> is safe to read or write from/to that location.
>
> This principle would be also handy for the super I/O because this chips needs
> some magic sequence to open them, read the config and close them. There are many
> drivers (watchdog, parport, irda, mmc, lm-sensors) in the kernel trying to write
> to same super I/O port (0x2e/0x2f) this generic port forwarder would solve it too.
>
> Question for ACPI people: If I would come with some kind of this port-forwarder
> class - will you accept it as solution if all technical stuff is solved? I mean
> - will be solution acceptable in principle for you?
>
>
You should be careful with such forwarder, as ACPI for example tends to
be the last to access some ports during shutdown, for example...
As I understand your idea, if physical device driver loads, your port
forwarder switches direct ACPI access to this driver,
so driver needs to advertise itself as capable of this to "forwarder".
Also in case of driver suspend/shutdown/unload it needs to notify
"forwarder",
such that ACPI is able to directly access device again. Also, driver
should preserve "state" of the device across ACPI accesses,
because ACPI may not initialize device each time. It seems like every
device will need in addition of having native driver to have a virtual
one for ACPI...
I will be glad to see any implementation of this :)
Regards,
Alex.
next prev parent reply other threads:[~2007-02-05 18:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-04 20:23 ACPI bytecode hardware registers access Rudolf Marek
2007-02-05 3:52 ` [lm-sensors] " David Hubbard
2007-02-05 8:03 ` Luming Yu
2007-02-05 14:38 ` Rudolf Marek
2007-02-07 4:12 ` Luming Yu
2007-02-05 14:46 ` Rudolf Marek
2007-02-05 15:42 ` Alexey Starikovskiy
2007-02-05 16:41 ` Rudolf Marek
2007-02-05 18:10 ` Alexey Starikovskiy [this message]
2007-02-05 22:08 ` Wim Van Sebroeck
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=45C7731D.4050309@linux.intel.com \
--to=alexey.y.starikovskiy@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=r.marek@assembler.cz \
--cc=wim@iguana.be \
/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