diff mbox

[RFC] ACPI: Add boot option to disable auto return object repair

Message ID 59ec303219ed43c247fd5afc75de35553b9a52d5.1358954645.git.lv.zheng@intel.com (mailing list archive)
State Rejected, archived
Headers show

Commit Message

Lv Zheng Jan. 23, 2013, 7:29 a.m. UTC
There is automatic return object repair mechanism implemented in
ACPICA which can not handle all of the issues exposed by BIOS
currently. This patch allow a kernel boots up without such
workarounds enabled. A better choice should refine the repair
mechanism to allow more robust evaluation result.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/bus.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Thomas Renninger Jan. 23, 2013, 12:18 p.m. UTC | #1
On Wednesday, January 23, 2013 08:29:02 AM Lv Zheng wrote:
> There is automatic return object repair mechanism implemented in
> ACPICA which can not handle all of the issues exposed by BIOS
> currently. This patch allow a kernel boots up without such
> workarounds enabled. A better choice should refine the repair
> mechanism to allow more robust evaluation result.
> 
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
>  drivers/acpi/bus.c |   12 ++++++++++++

drivers/acpi/osl.c would IMO make more sense to add this, there
is no __setup function in bus.c yet, but in osl.c there is:
__setup("acpi_serialize", acpi_serialize_setup);
doing more or less the same.

>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index 01708a1..e33577f 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -805,6 +805,18 @@ static int __init acpi_bus_init(void)
>  struct kobject *acpi_kobj;
>  EXPORT_SYMBOL_GPL(acpi_kobj);
>  
> +static int __init acpi_disable_repair(char *s)
> +{
> +        printk(KERN_NOTICE PREFIX
pr_notice()

No need to change other printk(KERN_NOTICE..., but new patches
should make use of pr_notice.

Are there known error messages that indicate when it makes sense
to try this out?
How would I know I should try this boot param?

If there are hints when to use this, it makes sense to mention them at 
least in the changelog (or a bug reference or similar).

kernel parameters are typically described in
Documentation/kernel-parameters.txt
Not sure whether it's worth for this one (if it's intended for low level 
ACPI debugging only and people making use of it know the drivers/acpi/*
code and therefore know about this option it may not).

   Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Moore, Robert Jan. 23, 2013, 12:59 p.m. UTC | #2
We continually make progress in this area, and we already can fix a huge number of potential issues. I would rather not allow an option to disable this unless it is absolutely necessary; I don't want this ACPICA feature to become disabled permanently in Linux.

It is rather surprising how many predefined names in any given BIOS return incorrect values. What started out as ad-hoc code littered throughout ACPICA and the ACPI-related device drivers is now encapsulated in a repair module that handles hundreds of possible cases. The repair module is table-driven and causes only a very small overhead.

The final goal of the detect/repair mechanism is that if a driver receives an AE_OK back from the evaluation of a predefined name (anything that starts with an underscore), it is guaranteed that the return value is something that is expected -- thus saving all of the ACPI-related device drivers from performing typechecks on the returned object.

Note: The ACPICA validation/repair code was originally released in 2009.

Bob


> -----Original Message-----
> From: Zheng, Lv
> Sent: Tuesday, January 22, 2013 11:29 PM
> To: Brown, Len; Wysocki, Rafael J; Rafael J Wysocki; Moore, Robert
> Cc: linux-acpi@vger.kernel.org; devel@acpica.org; Zheng, Lv
> Subject: [RFC PATCH] ACPI: Add boot option to disable auto return object
> repair
> 
> There is automatic return object repair mechanism implemented in ACPICA
> which can not handle all of the issues exposed by BIOS currently. This
> patch allow a kernel boots up without such workarounds enabled. A better
> choice should refine the repair mechanism to allow more robust evaluation
> result.
> 
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
>  drivers/acpi/bus.c |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index
> 01708a1..e33577f 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -805,6 +805,18 @@ static int __init acpi_bus_init(void)  struct kobject
> *acpi_kobj;  EXPORT_SYMBOL_GPL(acpi_kobj);
> 
> +static int __init acpi_disable_repair(char *s) {
> +        printk(KERN_NOTICE PREFIX
> +	       "ACPI: Predefined names repair disabled\n");
> +
> +        acpi_gbl_disable_auto_repair = TRUE;
> +
> +        return 1;
> +}
> +
> +__setup("acpi_no_repair", acpi_disable_repair);
> +
>  static int __init acpi_init(void)
>  {
>  	int result;
> --
> 1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 01708a1..e33577f 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -805,6 +805,18 @@  static int __init acpi_bus_init(void)
 struct kobject *acpi_kobj;
 EXPORT_SYMBOL_GPL(acpi_kobj);
 
+static int __init acpi_disable_repair(char *s)
+{
+        printk(KERN_NOTICE PREFIX
+	       "ACPI: Predefined names repair disabled\n");
+
+        acpi_gbl_disable_auto_repair = TRUE;
+
+        return 1;
+}
+
+__setup("acpi_no_repair", acpi_disable_repair);
+
 static int __init acpi_init(void)
 {
 	int result;