linux-kernel-test/drivers/xen
Rafael J. Wysocki 202317a573 ACPI / scan: Add acpi_device objects for all device nodes in the namespace
Modify the ACPI namespace scanning code to register a struct
acpi_device object for every namespace node representing a device,
processor and so on, even if the device represented by that namespace
node is reported to be not present and not functional by _STA.

There are multiple reasons to do that.  First of all, it avoids
quite a lot of overhead when struct acpi_device objects are
deleted every time acpi_bus_trim() is run and then added again
by a subsequent acpi_bus_scan() for the same scope, although the
namespace objects they correspond to stay in memory all the time
(which always is the case on a vast majority of systems).

Second, it will allow user space to see that there are namespace
nodes representing devices that are not present at the moment and may
be added to the system.  It will also allow user space to evaluate
_SUN for those nodes to check what physical slots the "missing"
devices may be put into and it will make sense to add a sysfs
attribute for _STA evaluation after this change (that will be
useful for thermal management on some systems).

Next, it will help to consolidate the ACPI hotplug handling among
subsystems by making it possible to store hotplug-related information
in struct acpi_device objects in a standard common way.

Finally, it will help to avoid a race condition related to the
deletion of ACPI namespace nodes.  Namely, namespace nodes may be
deleted as a result of a table unload triggered by _EJ0 or _DCK.
If a hotplug notification for one of those nodes is triggered
right before the deletion and it executes a hotplug callback
via acpi_hotplug_execute(), the ACPI handle passed to that
callback may be stale when the callback actually runs.  One way
to work around that is to always pass struct acpi_device pointers
to hotplug callbacks after doing a get_device() on the objects in
question which eliminates the use-after-free possibility (the ACPI
handles in those objects are invalidated by acpi_scan_drop_device(),
so they will trigger ACPICA errors on attempts to use them).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2013-11-22 21:54:37 +01:00
..
xen-pciback xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
xenbus xenbus: convert bus code to use dev_groups 2013-10-16 18:36:03 -07:00
xenfs xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
acpi.c xen / ACPI: notify xen when reduced hardware sleep is available 2013-07-31 14:22:35 +02:00
balloon.c xen: delete new instances of added __cpuinit 2013-11-08 15:13:16 -05:00
biomerge.c xen: using EXPORT_SYMBOL requires including export.h 2012-01-18 15:37:49 -08:00
cpu_hotplug.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
dbgp.c xen: dbgp: Fix warning when CONFIG_PCI is not enabled. 2012-10-19 15:19:37 -04:00
events.c Linux 3.11-rc7 2013-09-09 12:05:37 -04:00
evtchn.c xen: remove deprecated IRQF_DISABLED 2013-11-06 15:31:16 -05:00
fallback.c xen-pciback: notify hypervisor about devices intended to be assigned to guests 2013-03-22 10:20:55 -04:00
features.c
gntalloc.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
gntdev.c xen/m2p: use GNTTABOP_unmap_and_replace to reinstate the original mapping 2013-08-20 10:25:35 -04:00
grant-table.c grant-table: call set_phys_to_machine after mapping grant refs 2013-10-25 10:41:44 +00:00
Kconfig xen/arm,arm64: enable SWIOTLB_XEN 2013-10-10 13:40:44 +00:00
Makefile xen/arm: enable PV control for ARM 2013-07-29 09:35:11 -04:00
manage.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-06 14:09:38 -07:00
mcelog.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
pci.c More ACPI and power management updates for 3.13-rc1 2013-11-20 13:25:04 -08:00
pcpu.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
platform-pci.c xen: remove deprecated IRQF_DISABLED 2013-11-06 15:31:16 -05:00
privcmd.c Xen: Fix retry calls into PRIVCMD_MMAPBATCH*. 2013-08-30 08:44:53 -04:00
privcmd.h xen: Add privcmd device driver 2011-12-16 13:29:31 -05:00
swiotlb-xen.c Merge remote-tracking branch 'stefano/swiotlb-xen-9.1' into stable/for-linus-3.13 2013-11-08 16:10:48 -05:00
sys-hypervisor.c xen: sysfs: fix build warning. 2012-10-19 15:17:51 -04:00
tmem.c Bug-fixes: 2013-07-03 13:12:42 -07:00
xen-acpi-cpuhotplug.c ACPI / scan: Add acpi_device objects for all device nodes in the namespace 2013-11-22 21:54:37 +01:00
xen-acpi-memhotplug.c ACPI / scan: Add acpi_device objects for all device nodes in the namespace 2013-11-22 21:54:37 +01:00
xen-acpi-pad.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
xen-acpi-processor.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
xen-balloon.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00
xen-selfballoon.c xen: replace strict_strtoul() with kstrtoul() 2013-08-09 10:59:01 -04:00
xen-stub.c xen/acpi: remove redundant acpi/acpi_drivers.h include 2013-03-11 13:53:02 -04:00
xencomm.c xen: Convert printks to pr_<level> 2013-06-28 11:19:58 -04:00