Re: [ACPI] PATCH-ACPI based CPU hotplug[2/6]-ACPI Eject interface support

From: Dmitry Torokhov
Date: Tue Sep 21 2004 - 00:36:45 EST


On Monday 20 September 2004 08:41 pm, Alex Williamson wrote:
> Dmitry,
>
> Â ÂI imagined the sanitized interfaces would be provided via a userspace
> library, similar to how lspci provides a clean interface to all of the
> PCI data. ÂAn "lsacpi" tool could extract the information into something
> more like you suggest. ÂIf you have objects exposed as human
> readable/writable files, I think you'll quickly end up with a _STA
> driver, _HID driver, _CID driver, _ADR driver, _UID driver, _EJx driver,
> etc, etc, etc... ÂI don't think we want that kind of bloat in the kernel
> (that's what userspace is for ;^). ÂProviding a solid, direct interface
> to ACPI methods in the kernel seems like the most flexible, powerful
> interface IMHO.

Hmm, I do not quite agree. Except for "eject" being writeable to initiate
eject action the rest of the attributes would reflect kernel's view of the
device state and not re-evaluated when userspace references them. Monitoring
(or rather reacting to various events, like DEVICE_CHECK and BUS_CHECK) and
updating devices' statuses and other data is responsibility of the core ACPI
system. If system administrator is forced to manually (via libacpi or sysfs)
query device status to "kick" the device into working state I'd consider it
a bug, would'nt you agree?

I see that in your other mail you mention _CRS parsing and chipset discovery.
I think that if you had an ability to just retrieve raw ACPI data from the
system that would suffice. In other words during normal operations there
is no need for "active" ACPI methods (such as _WAK, _S4, etc) to be available
from userspace. And just exporting raw data solves problem of bloating kernel
with parsing of vendor-specific data. I wonder if any of these methods need
arguments to run - if not then we would not need any adjustments to sysfs
opeen/close methods.

I am not saying that we should chose one method or another. I think they both
can co-exist, as they can be used for diffectent purposes - the raw ACPI access
can affect state of the box while the sanitized attributes present kernel's
view and can be used to verify results of some action from kernel's POV.

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/