* [RFC PATCH] ACPI: Add boot option to disable auto return object repair
@ 2013-01-23 7:29 Lv Zheng
2013-01-23 12:18 ` [Devel] " Thomas Renninger
2013-01-23 12:59 ` Moore, Robert
0 siblings, 2 replies; 3+ messages in thread
From: Lv Zheng @ 2013-01-23 7:29 UTC (permalink / raw)
To: Len Brown, Rafael J Wysocki, Rafael J Wysocki, Robert Moore
Cc: linux-acpi, devel, Lv Zheng
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Devel] [RFC PATCH] ACPI: Add boot option to disable auto return object repair
2013-01-23 7:29 [RFC PATCH] ACPI: Add boot option to disable auto return object repair Lv Zheng
@ 2013-01-23 12:18 ` Thomas Renninger
2013-01-23 12:59 ` Moore, Robert
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Renninger @ 2013-01-23 12:18 UTC (permalink / raw)
To: devel
Cc: Lv Zheng, Len Brown, Rafael J Wysocki, Rafael J Wysocki,
Robert Moore, linux-acpi
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [RFC PATCH] ACPI: Add boot option to disable auto return object repair
2013-01-23 7:29 [RFC PATCH] ACPI: Add boot option to disable auto return object repair Lv Zheng
2013-01-23 12:18 ` [Devel] " Thomas Renninger
@ 2013-01-23 12:59 ` Moore, Robert
1 sibling, 0 replies; 3+ messages in thread
From: Moore, Robert @ 2013-01-23 12:59 UTC (permalink / raw)
To: Zheng, Lv, Brown, Len, Wysocki, Rafael J, Rafael J Wysocki
Cc: linux-acpi@vger.kernel.org, devel@acpica.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-23 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 7:29 [RFC PATCH] ACPI: Add boot option to disable auto return object repair Lv Zheng
2013-01-23 12:18 ` [Devel] " Thomas Renninger
2013-01-23 12:59 ` Moore, Robert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).