From: Toshi Kani <toshi.kani@hp.com>
To: shuahkhan@gmail.com
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, bhelgaas@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/7] ACPI: Add _OST support for sysfs eject
Date: Wed, 09 May 2012 12:16:17 -0600 [thread overview]
Message-ID: <1336587377.16730.150.camel@misato.fc.hp.com> (raw)
In-Reply-To: <1336581973.2498.15.camel@lorien2>
On Wed, 2012-05-09 at 10:46 -0600, Shuah Khan wrote:
> On Tue, 2012-05-08 at 14:12 -0600, Toshi Kani wrote:
> > Changed acpi_bus_hot_remove_device() to support _OST. This function is
> > also changed to global so that it can be called from hotplug notify
> > handlers to perform hot-remove operation.
> >
> > Changed acpi_eject_store(), which is the sysfs eject handler. It checks
> > eject_pending to see if the request was originated from ACPI eject
> > notification. If not, it calls _OST(0x103,84,) per Figure 6-37 in ACPI
> > 5.0 spec.
> >
> > Added eject_pending bit to acpi_device_flags. This bit is set when the
> > kernel has received an ACPI eject notification, but does not initiate
> > its hot-remove operation by itself.
> >
> > Added struct acpi_eject_event. This structure is used to pass extended
> > information to acpi_bus_hot_remove_device(), which has a single argument
> > to support asynchronous call.
> >
> > Added macro definitions of _OST source events and status codes.
> > Also renamed OSC_SB_CPUHP_OST_SUPPORT to OSC_SB_HOTPLUG_OST_SUPPORT
> > since this _OSC bit is not specific to CPU hotplug. This bit is
> > defined in Table 6-147 of ACPI 5.0 as follows.
>
> I am confused. This patch adds lot of new code that is for _OST handling
> without CONFIG_ACPI_HOTPLUG_OST check. Is this intended? Doesn't jive
> with the intent communicated in the [PATCH v2 0/7] introduction.
Yes, it is intended to minimize the use of #ifdefs in order to improve
its code readability and maintainability. The statement in the [PATCH
v2 0/7] is correct. When CONFIG_ACPI_HOTPLUG_OST is disabled, there is
no change in the kernel functionality nor in the OS-firmware
interaction.
> Could you please walk though the steps on what happens with this code on
> a system that doesn't enable _OST and doesn't support _OST. That will
> help me understand how this code would behave on a system that doesn't
> support _OST.
1. CONFIG_ACPI_HOTPLUG_OST disabled
There is no change in the kernel functionality nor in the OS-firmware
interaction. This case is same whether or not the system supports _OST.
- At boot-time, the kernel calls ACPI Operating System Capabilities
(_OSC) method, if present, with hotplug _OST bit unset. This indicates
that the OS does not support hotplug _OST.
- During a hotplug operation, the OS does not call _OST method because
acpi_evaluate_hotplug_ost() is stubbed out.
2. CONFIG_ACPI_HOTPLUG_OST enabled, but the system does not support _OST
- At boot-time, the kernel calls ACPI _OSC method, if present, with
hotplug _OST bit set. This indicates that the OS supports hotplug _OST.
Firmware ignores this bit since it does not support _OST.
- During a hotplug operation, the OS attempts to call _OST method.
Since _OST method is not present, this _OST call is a no-op
(AE_NOT_FOUND).
Thanks,
-Toshi
next prev parent reply other threads:[~2012-05-09 18:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 20:12 [PATCH v2 0/7] ACPI: Add _OST support for ACPI hotplug Toshi Kani
2012-05-08 20:12 ` [PATCH v2 1/7] ACPI: Add CONFIG_HOTPLUG_OST option Toshi Kani
2012-05-10 16:40 ` Jiang Liu
2012-05-10 17:26 ` Toshi Kani
2012-05-10 17:43 ` Jiang Liu
2012-05-10 18:20 ` Toshi Kani
2012-05-11 0:15 ` Jiang Liu
2012-05-08 20:12 ` [PATCH v2 2/7] ACPI: Add an interface to evaluate _OST Toshi Kani
2012-05-08 20:12 ` [PATCH v2 3/7] ACPI: Add _OST support for sysfs eject Toshi Kani
2012-05-09 16:46 ` Shuah Khan
2012-05-09 18:16 ` Toshi Kani [this message]
2012-05-10 15:40 ` Shuah Khan
2012-05-10 16:34 ` Toshi Kani
2012-05-10 16:55 ` Shuah Khan
2012-05-10 17:41 ` Toshi Kani
2012-05-08 20:12 ` [PATCH v2 4/7] ACPI: Add _OST support for ACPI CPU hotplug Toshi Kani
2012-05-08 20:12 ` [PATCH v2 5/7] ACPI: Add _OST support for ACPI memory hotplug Toshi Kani
2012-05-08 20:12 ` [PATCH v2 6/7] ACPI: Add _OST support for ACPI container hotplug Toshi Kani
2012-05-08 20:12 ` [PATCH v2 7/7] ACPI: Set hotplug _OST support bit to _OSC Toshi Kani
2012-05-09 17:36 ` [PATCH v2 0/7] ACPI: Add _OST support for ACPI hotplug Shuah Khan
2012-05-09 18:44 ` Toshi Kani
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=1336587377.16730.150.camel@misato.fc.hp.com \
--to=toshi.kani@hp.com \
--cc=bhelgaas@google.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shuahkhan@gmail.com \
/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