aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2008-02-05 02:31:22 -0500
committerLen Brown <len.brown@intel.com>2008-02-07 00:59:18 -0500
commitdf92e695998e1bc6e426a840eb86d6d1ee87e2a5 (patch)
treea131aefb2a66e2dc32e533652a5471ccbc2211e0 /include/linux/acpi.h
parent488b5ec871191359b9b79262a3d48456dae7ea5f (diff)
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>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 63f2e6ed698f..893f90a5dea9 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -217,6 +217,11 @@ extern int pnpacpi_disabled;
217#define PXM_INVAL (-1) 217#define PXM_INVAL (-1)
218#define NID_INVAL (-1) 218#define NID_INVAL (-1)
219 219
220int acpi_check_region(resource_size_t start, resource_size_t n,
221 const char *name);
222int acpi_check_mem_region(resource_size_t start, resource_size_t n,
223 const char *name);
224
220#else /* CONFIG_ACPI */ 225#else /* CONFIG_ACPI */
221 226
222static inline int acpi_boot_init(void) 227static inline int acpi_boot_init(void)
@@ -229,5 +234,17 @@ static inline int acpi_boot_table_init(void)
229 return 0; 234 return 0;
230} 235}
231 236
237static inline int acpi_check_region(resource_size_t start, resource_size_t n,
238 const char *name)
239{
240 return 0;
241}
242
243static inline int acpi_check_mem_region(resource_size_t start,
244 resource_size_t n, const char *name)
245{
246 return 0;
247}
248
232#endif /* !CONFIG_ACPI */ 249#endif /* !CONFIG_ACPI */
233#endif /*_LINUX_ACPI_H*/ 250#endif /*_LINUX_ACPI_H*/