lkml.org 
[lkml]   [2013]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/3] ACPI / hotplug: Merge device hot-removal routines
Date
On Monday, November 04, 2013 01:21:46 AM Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The only substantial difference between acpi_bus_device_eject() and
> acpi_bus_hot_remove_device() is the get_device() done by the former
> which is supposed to be done by callers of the latter. However,
> at least one caller of acpi_bus_hot_remove_device(), which is
> handle_root_bridge_removal(), doesn't do that and generally it
> won't be necessary to do that at all if ACPI handles, rather than
> struct acpi_device objects, are passed between ACPI hotplug routines,
> because the correctness of those routines already depends on the
> persistence of ACPI handles (that may not be an entirely correct
> assumption in theory, but in practice it has been good enough for a
> long time).
>
> For this reason, modify acpi_bus_device_eject() to take two
> arguments, an ACPI handle and event code, and make
> acpi_bus_hot_remove_device() call it internally. Moreover, rework
> acpi_bus_hot_remove_device() so that it only takes one argument,
> an ACPI handle, and make acpi_scan_bus_device_check() queue up
> acpi_bus_hot_remove_device() instead of acpi_bus_device_eject()
> itself. After these changes, handle_root_bridge_removal() may
> be replaced with async execution of acpi_bus_hot_remove_device()
> with the ACPI handle of the root passed to it as the argument.
>
> However, since acpi_eject_store() also needs to execute
> acpi_bus_device_eject() asynchronously and it needs to pass a
> special event code, ACPI_OST_EC_OSPM_EJECT, to that function,
> introduce a separate wrapper around acpi_bus_device_eject(),
> acpi_eject_store_work(), that will be queued up by
> acpi_eject_store() instead of acpi_bus_hot_remove_device().
> This allows acpi_eject_store() to be simplified and it allows
> struct acpi_eject_event to be dropped entirely, as there's
> no more users of that structure.

Well, scratch this (and the follow-up), it didn't go in the right direction.

I'll send a new series shortly.

Rafael



\
 
 \ /
  Last update: 2013-11-04 15:21    [W:0.218 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site