ACPI: acpi_enforce_resource=strict by default

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Sunday, April 5, 2009 - 3:50 pm

Gitweb:     http://git.kernel.org/linus/7e90560c50f754d65884e251e94c1efa2a4b5784
Commit:     7e90560c50f754d65884e251e94c1efa2a4b5784
Parent:     8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84
Author:     Luca Tettamanti <kronos.it@gmail.com>
AuthorDate: Mon Mar 30 00:01:27 2009 +0200
Committer:  Len Brown <len.brown@intel.com>
CommitDate: Thu Apr 2 18:57:46 2009 -0400

    ACPI: acpi_enforce_resource=strict by default
    
    Enforce strict resource checking - disallowing access by native
    drivers to IO ports and memory regions claimed by ACPI firmware.
    
    The patch is mainly aimed to block native hwmon drivers from touching
    monitoring chips that ACPI thinks it own.
    
    If this causes a regression, boot with "acpi_enforce_resources=lax"
    which was the previous default.
    
    http://bugzilla.kernel.org/show_bug.cgi?id=12376
    http://bugzilla.kernel.org/show_bug.cgi?id=12541
    
    Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
    Acked-by: Pavel Machek <pavel@suse.cz>
    Acked-by: Jean Delvare <khali@linux-fr.org>
    Signed-off-by: Len Brown <len.brown@intel.com>
---
 Documentation/kernel-parameters.txt |   16 ++++++++++++++++
 drivers/acpi/osl.c                  |    6 +++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 54f21a5..7068d0b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -258,6 +258,22 @@ and is between 256 and 4096 characters. It is defined in the file
 			to assume that this machine's pmtimer latches its value
 			and always returns good values.
 
+	acpi_enforce_resources=	[ACPI]
+			{ strict | lax | no }
+			Check for resource conflicts between native drivers
+			and ACPI OperationRegions (SystemIO and SystemMemory
+			only). IO ports and memory declared in ACPI might be
+			used by the ACPI subsystem in arbitrary AML code and
+			can interfere with legacy drivers.
+			strict (default): access to resources claimed by ACPI
+			is denied; legacy drivers trying to access reserved
+			resources will fail to bind to device using them.
+			lax: access to resources claimed by ACPI is allowed;
+			legacy drivers trying to access reserved resources
+			will bind successfully but a warning message is logged.
+			no: ACPI OperationRegions are not marked as reserved,
+			no further checks are performed.
+
 	agp=		[AGP]
 			{ off | try_unsupported }
 			off: disable AGP support
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 1e35f34..f50ca1e 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1063,9 +1063,9 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
  * in arbitrary AML code and can interfere with legacy drivers.
  * acpi_enforce_resources= can be set to:
  *
- *   - strict           (2)
+ *   - strict (default) (2)
  *     -> further driver trying to access the resources will not load
- *   - lax (default)    (1)
+ *   - lax              (1)
  *     -> further driver trying to access the resources will load, but you
  *     get a system message that something might go wrong...
  *
@@ -1077,7 +1077,7 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
 #define ENFORCE_RESOURCES_LAX    1
 #define ENFORCE_RESOURCES_NO     0
 
-static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
+static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_STRICT;
 
 static int __init acpi_enforce_resources_setup(char *str)
 {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ACPI: acpi_enforce_resource=strict by default, Linux Kernel Mailing List..., (Sun Apr 5, 3:50 pm)