2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00
linux-next/drivers/acpi
Thomas Renninger df92e69599 ACPI: track opregion names to avoid driver resource conflicts.
Small ACPICA extension to be able to store the name of operation regions in osl.c later

In ACPI, AML can define accesses to IO ports and System Memory by Operation
Regions.  Those are not registered as done by PNPACPI using resource templates
(and _CRS/_SRS methods).

The IO ports and System Memory regions may get accessed by arbitrary AML code.
 When native drivers are accessing the same resources bad things can happen
(e.g.  a critical shutdown temperature of 3000 C every 2 months or so).

It is not really possible to register the operation regions via
request_resource, as they often overlap with pnp or other resources (e.g.
statically setup IO resources below 0x100).

This approach stores all Operation Region declarations (IO and System Memory
only) at ACPI table parse time.  It offers a similar functionality like
request_region and let drivers which are known to possibly use the same IO
ports and Memory which are also often used by ACPI (hwmon and i2c) check for
ACPI interference.

A boot parameter acpi_enforce_resources=strict/lax/no is provided, which
is default set to lax:
  - strict: let conflicting drivers fail to load with an error message
  - lax:    let conflicting driver work normal with a warning message
  - no:     no functional change at all
Depending on the feedback and the kind of interferences we see, this
should be set to strict at later time.

Goal of this patch set is:
  - Identify ACPI interferences in bug reports (very hard to reproduce
    and to identify)
  - Find BIOSes for that an ACPI driver should exist for specific HW
    instead of a native one.
  - stability in general

Provide acpi_check_{mem_}region.

Drivers can additionally check against possible ACPI interference by also
invoking this shortly before they call request_region.
If -EBUSY is returned, the driver must not load.
Use acpi_enforce_resources=strict/lax/no options to:
  - strict: let conflicting drivers fail to load with an error message
  - lax:    let conflicting driver work normal with a warning message
  - no:     no functional change at all

Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:59:18 -05:00
..
dispatcher ACPI: track opregion names to avoid driver resource conflicts. 2008-02-07 00:59:18 -05:00
events ACPICA: fix acpi_serialize hang regression 2008-01-10 23:04:10 -05:00
executer ACPICA: Lindent 2007-05-09 23:34:35 -04:00
hardware ACPI: Separate disabling of GPEs from _PTS 2008-02-01 18:30:56 -05:00
namespace ACPI: Fix a warning of discarding qualifiers from pointer target type 2007-08-25 01:38:40 -04:00
parser ACPICA: Lindent 2007-05-09 23:34:35 -04:00
resources fix compilation with gcc 4.2 2007-08-11 15:47:42 -07:00
sleep ACPI: Print message before calling _PTS 2008-02-01 18:30:58 -05:00
tables ACPI: Add missing spaces to printk format 2007-11-19 21:53:32 -05:00
utilities drivers/acpi/: Spelling fixes 2008-02-03 17:06:17 +02:00
ac.c ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
acpi_memhotplug.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
asus_acpi.c ACPI: Schedule /proc/acpi/event for removal 2007-08-23 15:20:26 -04:00
battery.c ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
bay.c ACPI: bay: send envp with uevent - fix 2007-08-11 22:10:04 -04:00
blacklist.c ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems. 2008-01-23 21:28:12 -05:00
bus.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
button.c ACPI: button: send initial lid state after add and resume 2007-10-25 16:31:30 -04:00
cm_sbs.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
container.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
debug.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
dock.c ACPI: dock: Send key=value pair instead of plain value 2007-08-11 22:12:10 -04:00
ec.c ACPI: EC: "DEBUG" needs to be defined earlier 2008-01-23 22:34:09 -05:00
event.c ACPI: fix CONFIG_NET=n acpi_bus_generate_netlink_event build failure 2007-09-03 11:15:11 -04:00
fan.c Revert "ACPI: Fan: Drop force_power_state acpi_device option" 2008-01-23 22:41:20 -05:00
glue.c ACPI: fix empty macros found by -Wextra 2007-07-22 00:54:24 -04:00
Kconfig ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
Makefile ACPI: Split out control for /proc/acpi entries from battery, ac, and sbs. 2007-11-19 11:21:50 -05:00
numa.c ACPI: fix modpost warnings 2007-12-13 17:50:09 -05:00
osl.c ACPI: track opregion names to avoid driver resource conflicts. 2008-02-07 00:59:18 -05:00
pci_bind.c ACPI: acpiphp: Remove dmesg spam on device remove 2007-11-20 19:06:04 -05:00
pci_irq.c ACPI : Not register gsi for PCI IDE controller in legacy mode 2008-01-10 22:49:58 -05:00
pci_link.c Driver core: change sysdev classes to use dynamic kobject names 2008-01-24 20:40:40 -08:00
pci_root.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
power.c ACPI: power: don't cache power resource state 2007-10-25 16:31:31 -04:00
processor_core.c ACPI: avoid references to impossible processors. 2007-11-29 09:24:55 -08:00
processor_idle.c latency.c: use QoS infrastructure 2008-02-05 09:44:22 -08:00
processor_perflib.c acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues 2007-08-07 18:40:30 -04:00
processor_thermal.c ACPI: delete extra #defines in /drivers/acpi/ drivers 2007-02-12 23:50:52 -05:00
processor_throttling.c ACPI: processor: Fix null pointer dereference in throttling 2008-01-15 00:47:47 -05:00
sbs.c ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
sbshc.c ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
sbshc.h ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
scan.c drivers/acpi/: Spelling fixes 2008-02-03 17:06:17 +02:00
system.c Kobject: change drivers/acpi/system.c to use kobject_create_and_add 2008-01-24 20:40:28 -08:00
tables.c Revert "ACPI: parse 2nd MADT by default" 2007-03-30 14:16:10 -04:00
thermal.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2007-10-19 13:12:46 -07:00
toshiba_acpi.c Fix Oops in toshiba_acpi error return path 2007-11-14 18:45:36 -08:00
utils.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
video.c ACPI: video_device_list corruption 2007-12-13 16:24:10 -05:00