linux-stable/drivers/acpi
Rafael J. Wysocki 805d410fb0 ACPI: Separate adding ACPI device objects from probing ACPI drivers
Split the ACPI namespace scanning for devices into two passes, such
that struct acpi_device objects are registerd in the first pass
without probing ACPI drivers and the drivers are probed against them
directly in the second pass.

There are two main reasons for doing that.

First, the ACPI PCI root bridge driver's .add() routine,
acpi_pci_root_add(), causes struct pci_dev objects to be created for
all PCI devices under the given root bridge.  Usually, there are
corresponding ACPI device nodes in the ACPI namespace for some of
those devices and therefore there should be "companion" struct
acpi_device objects to attach those struct pci_dev objects to.  These
struct acpi_device objects should exist when the corresponding
struct pci_dev objects are created, but that is only guaranteed
during boot and not during hotplug.  This leads to a number of
functional differences between the boot and the hotplug cases which
are not strictly necessary and make the code more complicated.

For example, this forces the ACPI PCI root bridge driver to defer the
registration of the just created struct pci_dev objects and to use a
special .start() callback routine, acpi_pci_root_start(), to make
sure that all of the "companion" struct acpi_device objects will be
present at PCI devices registration time during hotplug.

If those differences can be eliminated, we will be able to
consolidate the boot and hotplug code paths for the enumeration and
registration of PCI devices and to reduce the complexity of that
code quite a bit.

The second reason is that, in general, it should be possible to
resolve conflicts of resources assigned by the BIOS to different
devices represented by ACPI namespace nodes before any drivers bind
to them and before they are attached to "companion" objects
representing physical devices (such as struct pci_dev).  However, for
this purpose we first need to enumerate all ACPI device nodes in the
given namespace scope.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Toshi Kani <toshi.kani@hp.com>
2013-01-03 13:09:36 +01:00
..
acpica Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
apei Trivial fix for error injection code using ACPI5 version of EINJ 2012-12-12 07:54:53 -08:00
Kconfig Merge branch 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-12-14 10:03:23 -08:00
Makefile Merge branch 'acpi-dev-pm' into acpi-enumeration 2012-11-27 13:42:42 +01:00
ac.c ACPI / PM: Fix unused function warnings for CONFIG_PM_SLEEP 2012-08-10 13:35:32 +02:00
acpi_i2c.c i2c / ACPI: add ACPI enumeration support 2012-11-23 12:23:40 +01:00
acpi_ipmi.c IPMI/ACPI: Add the IPMI opregion driver to enable ACPI to access BMC controller 2010-12-14 00:22:14 -05:00
acpi_memhotplug.c ACPI: Update Memory hotplug error messages 2012-11-21 23:20:22 +01:00
acpi_pad.c ACPI: strict_strtoul() and printk() cleanup in acpi_pad 2012-11-15 00:16:00 +01:00
acpi_platform.c ACPI / platform: include missed header into acpi_platform.c 2012-11-27 13:44:58 +01:00
battery.c ACPI / battery: Correct battery capacity values on Thinkpads 2012-11-16 22:28:58 +01:00
bgrt.c efi: Fix the ACPI BGRT driver for images located in EFI boot services memory 2012-09-29 12:21:03 -07:00
blacklist.c acpi: delete module.h include from files explicitly not needing it 2011-10-31 19:30:33 -04:00
bus.c ACPI / PM: Add check preventing transitioning to non-D0 state from D3. 2012-11-16 02:46:28 +01:00
button.c ACPI/button: convert to module_acpi_driver() 2012-09-21 13:38:29 -04:00
cm_sbs.c
container.c ACPI: Update Container hotplug error messages 2012-11-21 23:20:23 +01:00
custom_method.c ACPI: Split out custom_method functionality into an own driver 2011-05-29 01:50:40 -04:00
debugfs.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
device_pm.c ACPI / PM: Allow attach/detach routines to change device power states 2012-11-26 10:03:06 +01:00
dock.c ACPI: Update Dock hotplug error messages 2012-11-21 23:20:23 +01:00
ec.c ACPI / EC: Don't count a SCI interrupt as a false one 2012-11-15 00:15:59 +01:00
ec_sys.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
event.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
fan.c ACPI/fan: convert to module_acpi_driver() 2012-09-21 13:39:03 -04:00
glue.c ACPI / driver core: Introduce struct acpi_dev_node and related macros 2012-11-21 00:21:50 +01:00
hed.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
internal.h Merge branch 'acpi-general' 2012-11-29 21:43:06 +01:00
numa.c ACPI: Only count valid srat memory structures 2012-08-03 00:15:53 -04:00
nvs.c ACPI / PM: print physical addresses consistently with other parts of kernel 2012-03-30 02:46:57 -04:00
osl.c Merge branch 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-12-14 10:03:23 -08:00
pci_bind.c Merge branch 'pci/misc' into next 2012-11-13 14:34:06 -07:00
pci_irq.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00
pci_link.c acpi: use KERN_CONT in printk() continuation lines 2012-05-08 08:55:26 -07:00
pci_root.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00
pci_slot.c PCI/ACPI: Use acpi_pci_root info rather than looking it up again 2012-09-24 15:29:40 -06:00
power.c ACPI: add newline in power.c message 2012-11-15 00:18:21 +01:00
proc.c ACPI: drop unnecessary local variable from acpi_system_write_wakeup_device() 2012-11-22 23:20:31 +01:00
processor_core.c cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression 2012-07-12 22:39:32 +02:00
processor_driver.c ACPI: Update CPU hotplug error messages 2012-11-21 23:20:22 +01:00
processor_idle.c cpuidle: Measure idle state durations with monotonic clock 2012-11-27 14:17:58 +01:00
processor_perflib.c ACPI: Add fixups for AMD P-state figures 2012-09-09 22:05:02 +02:00
processor_thermal.c ACPI: Do cpufreq clamping for throttling per package v2 2012-03-22 02:16:14 -04:00
processor_throttling.c ACPI throttling: fix endian bug in acpi_read_throttling_status() 2012-03-30 16:06:12 -04:00
reboot.c Revert "ACPI: ignore FADT reset-reg-sup flag" 2012-04-20 11:19:35 -07:00
resource.c ACPI: remove unnecessary INIT_LIST_HEAD 2012-11-27 13:49:36 +01:00
sbs.c ACPI / PM: Fix unused function warnings for CONFIG_PM_SLEEP 2012-08-10 13:35:32 +02:00
sbshc.c ACPI/sbshc: convert to module_acpi_driver() 2012-09-21 13:39:40 -04:00
sbshc.h
scan.c ACPI: Separate adding ACPI device objects from probing ACPI drivers 2013-01-03 13:09:36 +01:00
sleep.c Merge branch 'acpi-general' 2012-12-04 13:46:08 +01:00
sleep.h ACPI: static sleep_states[] and acpi_gts_bfs_check 2010-10-19 13:44:37 -04:00
sysfs.c ACPICA: Fix AcpiSrc caused divergences. 2012-11-15 00:31:23 +01:00
tables.c ACPI: Harden acpi_table_parse_entries() against BIOS bug 2012-10-06 15:51:49 -04:00
thermal.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2012-12-12 07:57:13 -08:00
utils.c ACPI: Add acpi_handle_<level>() interfaces 2012-11-21 23:20:22 +01:00
video.c ACPI / video: ignore BIOS initial backlight value for HP Folio 13-2000 2012-12-04 23:30:19 +01:00
video_detect.c ACPI / video: Add "Asus UL30VT" to ACPI video detect blacklist 2012-11-30 13:02:50 +01:00
wakeup.c ACPI / Wakeup: Enable button GPEs unconditionally during initialization 2011-02-12 01:39:53 +01:00