aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2014-03-24 02:49:00 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-26 11:25:59 -0400
commit22b5afce6a0f29f995b0cce83a5033892dd306d8 (patch)
tree5733ad0071177f398108a8932b7d7108bd74c4ca /drivers/acpi
parente2b8ddcc6b3fbb860e15c5d52455735e128326aa (diff)
ACPICA: Add auto-serialization support for ill-behaved control methods.
This change adds support to automatically mark a control method as "serialized" if the method creates any named objects. This will positively prevent the method from being entered by more than one thread and thus preventing a possible abort when an attempt is made to create an object twice. Implemented by parsing all non-serialize control methods at table load time. This feature is disabled by default and this patch also adds a new Linux kernel parameter "acpi_auto_serialize" to allow this feature to be turned on for a specific boot. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/acdispat.h13
-rw-r--r--drivers/acpi/acpica/acglobal.h9
-rw-r--r--drivers/acpi/acpica/acstruct.h3
-rw-r--r--drivers/acpi/acpica/dsinit.c59
-rw-r--r--drivers/acpi/acpica/dsmethod.c132
-rw-r--r--drivers/acpi/acpica/dswload.c16
-rw-r--r--drivers/acpi/acpica/nsinit.c5
-rw-r--r--drivers/acpi/acpica/nsload.c4
-rw-r--r--drivers/acpi/acpica/psloop.c4
-rw-r--r--drivers/acpi/acpica/psobject.c7
-rw-r--r--drivers/acpi/osl.c16
11 files changed, 243 insertions, 25 deletions
diff --git a/drivers/acpi/acpica/acdispat.h b/drivers/acpi/acpica/acdispat.h
index 5b472c43c31d..d3e2cc395d7f 100644
--- a/drivers/acpi/acpica/acdispat.h
+++ b/drivers/acpi/acpica/acdispat.h
@@ -139,20 +139,21 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
139 struct acpi_walk_state *walk_state); 139 struct acpi_walk_state *walk_state);
140 140
141/* 141/*
142 * dsload - Parser/Interpreter interface, pass 1 namespace load callbacks 142 * dsload - Parser/Interpreter interface
143 */ 143 */
144acpi_status 144acpi_status
145acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number); 145acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
146 146
147/* dsload - pass 1 namespace load callbacks */
148
147acpi_status 149acpi_status
148acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state, 150acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
149 union acpi_parse_object **out_op); 151 union acpi_parse_object **out_op);
150 152
151acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state); 153acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);
152 154
153/* 155/* dsload - pass 2 namespace load callbacks */
154 * dsload - Parser/Interpreter interface, pass 2 namespace load callbacks 156
155 */
156acpi_status 157acpi_status
157acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, 158acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
158 union acpi_parse_object **out_op); 159 union acpi_parse_object **out_op);
@@ -200,7 +201,9 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);
200/* 201/*
201 * dsmethod - Parser/Interpreter interface - control method parsing 202 * dsmethod - Parser/Interpreter interface - control method parsing
202 */ 203 */
203acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node); 204acpi_status
205acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
206 union acpi_operand_object *obj_desc);
204 207
205acpi_status 208acpi_status
206acpi_ds_call_control_method(struct acpi_thread_state *thread, 209acpi_ds_call_control_method(struct acpi_thread_state *thread,
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 767556cb1448..ea0f8389ccde 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -93,6 +93,15 @@
93ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE); 93ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
94 94
95/* 95/*
96 * Automatically serialize all methods that create named objects? Default
97 * is TRUE, meaning that all non_serialized methods are scanned once at
98 * table load time to determine those that create named objects. Methods
99 * that create named objects are marked Serialized in order to prevent
100 * possible run-time problems if they are entered by more than one thread.
101 */
102ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, FALSE);
103
104/*
96 * Create the predefined _OSI method in the namespace? Default is TRUE 105 * Create the predefined _OSI method in the namespace? Default is TRUE
97 * because ACPI CA is fully compatible with other ACPI implementations. 106 * because ACPI CA is fully compatible with other ACPI implementations.
98 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. 107 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h
index 5d2989a1b68c..cf7346110bd8 100644
--- a/drivers/acpi/acpica/acstruct.h
+++ b/drivers/acpi/acpica/acstruct.h
@@ -133,6 +133,9 @@ struct acpi_init_walk_info {
133 u32 table_index; 133 u32 table_index;
134 u32 object_count; 134 u32 object_count;
135 u32 method_count; 135 u32 method_count;
136 u32 serial_method_count;
137 u32 non_serial_method_count;
138 u32 serialized_method_count;
136 u32 device_count; 139 u32 device_count;
137 u32 op_region_count; 140 u32 op_region_count;
138 u32 field_count; 141 u32 field_count;
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index 96644d5ac0e1..aee5e45f6d35 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -83,8 +83,8 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
83 (struct acpi_init_walk_info *)context; 83 (struct acpi_init_walk_info *)context;
84 struct acpi_namespace_node *node = 84 struct acpi_namespace_node *node =
85 (struct acpi_namespace_node *)obj_handle; 85 (struct acpi_namespace_node *)obj_handle;
86 acpi_object_type type;
87 acpi_status status; 86 acpi_status status;
87 union acpi_operand_object *obj_desc;
88 88
89 ACPI_FUNCTION_ENTRY(); 89 ACPI_FUNCTION_ENTRY();
90 90
@@ -100,9 +100,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
100 100
101 /* And even then, we are only interested in a few object types */ 101 /* And even then, we are only interested in a few object types */
102 102
103 type = acpi_ns_get_type(obj_handle); 103 switch (acpi_ns_get_type(obj_handle)) {
104
105 switch (type) {
106 case ACPI_TYPE_REGION: 104 case ACPI_TYPE_REGION:
107 105
108 status = acpi_ds_initialize_region(obj_handle); 106 status = acpi_ds_initialize_region(obj_handle);
@@ -117,8 +115,44 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
117 break; 115 break;
118 116
119 case ACPI_TYPE_METHOD: 117 case ACPI_TYPE_METHOD:
120 118 /*
119 * Auto-serialization support. We will examine each method that is
120 * not_serialized to determine if it creates any Named objects. If
121 * it does, it will be marked serialized to prevent problems if
122 * the method is entered by two or more threads and an attempt is
123 * made to create the same named object twice -- which results in
124 * an AE_ALREADY_EXISTS exception and method abort.
125 */
121 info->method_count++; 126 info->method_count++;
127 obj_desc = acpi_ns_get_attached_object(node);
128 if (!obj_desc) {
129 break;
130 }
131
132 /* Ignore if already serialized */
133
134 if (obj_desc->method.info_flags & ACPI_METHOD_SERIALIZED) {
135 info->serial_method_count++;
136 break;
137 }
138
139 if (acpi_gbl_auto_serialize_methods) {
140
141 /* Parse/scan method and serialize it if necessary */
142
143 acpi_ds_auto_serialize_method(node, obj_desc);
144 if (obj_desc->method.
145 info_flags & ACPI_METHOD_SERIALIZED) {
146
147 /* Method was just converted to Serialized */
148
149 info->serial_method_count++;
150 info->serialized_method_count++;
151 break;
152 }
153 }
154
155 info->non_serial_method_count++;
122 break; 156 break;
123 157
124 case ACPI_TYPE_DEVICE: 158 case ACPI_TYPE_DEVICE:
@@ -170,7 +204,6 @@ acpi_ds_initialize_objects(u32 table_index,
170 204
171 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 205 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
172 "**** Starting initialization of namespace objects ****\n")); 206 "**** Starting initialization of namespace objects ****\n"));
173 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "Parsing all Control Methods:"));
174 207
175 /* Set all init info to zero */ 208 /* Set all init info to zero */
176 209
@@ -205,14 +238,16 @@ acpi_ds_initialize_objects(u32 table_index,
205 } 238 }
206 239
207 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, 240 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
208 "\nTable [%4.4s](id %4.4X) - %u Objects with %u Devices %u Methods %u Regions\n", 241 "Table [%4.4s] (id %4.4X) - %4u Objects with %3u Devices, "
242 "%3u Regions, %3u Methods (%u/%u/%u Serial/Non/Cvt)\n",
209 table->signature, owner_id, info.object_count, 243 table->signature, owner_id, info.object_count,
210 info.device_count, info.method_count, 244 info.device_count, info.op_region_count,
211 info.op_region_count)); 245 info.method_count, info.serial_method_count,
246 info.non_serial_method_count,
247 info.serialized_method_count));
212 248
213 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 249 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "%u Methods, %u Regions\n",
214 "%u Methods, %u Regions\n", info.method_count, 250 info.method_count, info.op_region_count));
215 info.op_region_count));
216 251
217 return_ACPI_STATUS(AE_OK); 252 return_ACPI_STATUS(AE_OK);
218} 253}
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index 2c6d42c2bc01..97ed86aee0dc 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -49,16 +49,146 @@
49#ifdef ACPI_DISASSEMBLER 49#ifdef ACPI_DISASSEMBLER
50#include "acdisasm.h" 50#include "acdisasm.h"
51#endif 51#endif
52#include "acparser.h"
53#include "amlcode.h"
52 54
53#define _COMPONENT ACPI_DISPATCHER 55#define _COMPONENT ACPI_DISPATCHER
54ACPI_MODULE_NAME("dsmethod") 56ACPI_MODULE_NAME("dsmethod")
55 57
56/* Local prototypes */ 58/* Local prototypes */
57static acpi_status 59static acpi_status
60acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,
61 union acpi_parse_object **out_op);
62
63static acpi_status
58acpi_ds_create_method_mutex(union acpi_operand_object *method_desc); 64acpi_ds_create_method_mutex(union acpi_operand_object *method_desc);
59 65
60/******************************************************************************* 66/*******************************************************************************
61 * 67 *
68 * FUNCTION: acpi_ds_auto_serialize_method
69 *
70 * PARAMETERS: node - Namespace Node of the method
71 * obj_desc - Method object attached to node
72 *
73 * RETURN: Status
74 *
75 * DESCRIPTION: Parse a control method AML to scan for control methods that
76 * need serialization due to the creation of named objects.
77 *
78 * NOTE: It is a bit of overkill to mark all such methods serialized, since
79 * there is only a problem if the method actually blocks during execution.
80 * A blocking operation is, for example, a Sleep() operation, or any access
81 * to an operation region. However, it is probably not possible to easily
82 * detect whether a method will block or not, so we simply mark all suspicious
83 * methods as serialized.
84 *
85 * NOTE2: This code is essentially a generic routine for parsing a single
86 * control method.
87 *
88 ******************************************************************************/
89
90acpi_status
91acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
92 union acpi_operand_object *obj_desc)
93{
94 acpi_status status;
95 union acpi_parse_object *op = NULL;
96 struct acpi_walk_state *walk_state;
97
98 ACPI_FUNCTION_TRACE_PTR(ds_auto_serialize_method, node);
99
100 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
101 "Method auto-serialization parse [%4.4s] %p\n",
102 acpi_ut_get_node_name(node), node));
103
104 /* Create/Init a root op for the method parse tree */
105
106 op = acpi_ps_alloc_op(AML_METHOD_OP);
107 if (!op) {
108 return_ACPI_STATUS(AE_NO_MEMORY);
109 }
110
111 acpi_ps_set_name(op, node->name.integer);
112 op->common.node = node;
113
114 /* Create and initialize a new walk state */
115
116 walk_state =
117 acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL);
118 if (!walk_state) {
119 return_ACPI_STATUS(AE_NO_MEMORY);
120 }
121
122 status =
123 acpi_ds_init_aml_walk(walk_state, op, node,
124 obj_desc->method.aml_start,
125 obj_desc->method.aml_length, NULL, 0);
126 if (ACPI_FAILURE(status)) {
127 acpi_ds_delete_walk_state(walk_state);
128 return_ACPI_STATUS(status);
129 }
130
131 walk_state->descending_callback = acpi_ds_detect_named_opcodes;
132
133 /* Parse the method, scan for creation of named objects */
134
135 status = acpi_ps_parse_aml(walk_state);
136 if (ACPI_FAILURE(status)) {
137 return_ACPI_STATUS(status);
138 }
139
140 acpi_ps_delete_parse_tree(op);
141 return_ACPI_STATUS(status);
142}
143
144/*******************************************************************************
145 *
146 * FUNCTION: acpi_ds_detect_named_opcodes
147 *
148 * PARAMETERS: walk_state - Current state of the parse tree walk
149 * out_op - Unused, required for parser interface
150 *
151 * RETURN: Status
152 *
153 * DESCRIPTION: Descending callback used during the loading of ACPI tables.
154 * Currently used to detect methods that must be marked serialized
155 * in order to avoid problems with the creation of named objects.
156 *
157 ******************************************************************************/
158
159static acpi_status
160acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,
161 union acpi_parse_object **out_op)
162{
163
164 ACPI_FUNCTION_NAME(acpi_ds_detect_named_opcodes);
165
166 /* We are only interested in opcodes that have an associated name */
167
168 if (!(walk_state->op_info->flags & AML_NAMED)) {
169 return (AE_OK);
170 }
171
172 /*
173 * At this point, we know we have a Named object opcode.
174 * Mark the method as serialized. Later code will create a mutex for
175 * this method to enforce serialization.
176 */
177 walk_state->method_desc->method.info_flags |= ACPI_METHOD_SERIALIZED;
178
179 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
180 "Method serialized [%4.4s] %p - [%s] (%4.4X)\n",
181 walk_state->method_node->name.ascii,
182 walk_state->method_node, walk_state->op_info->name,
183 walk_state->opcode));
184
185 /* Abort the parse, no need to examine this method any further */
186
187 return (AE_CTRL_TERMINATE);
188}
189
190/*******************************************************************************
191 *
62 * FUNCTION: acpi_ds_method_error 192 * FUNCTION: acpi_ds_method_error
63 * 193 *
64 * PARAMETERS: status - Execution status 194 * PARAMETERS: status - Execution status
@@ -74,7 +204,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc);
74 ******************************************************************************/ 204 ******************************************************************************/
75 205
76acpi_status 206acpi_status
77acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) 207acpi_ds_method_error(acpi_status status, struct acpi_walk_state * walk_state)
78{ 208{
79 ACPI_FUNCTION_ENTRY(); 209 ACPI_FUNCTION_ENTRY();
80 210
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index bd7811c64169..15623da26200 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -73,8 +73,20 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
73{ 73{
74 74
75 switch (pass_number) { 75 switch (pass_number) {
76 case 0:
77
78 /* Parse only - caller will setup callbacks */
79
80 walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 |
81 ACPI_PARSE_DELETE_TREE | ACPI_PARSE_DISASSEMBLE;
82 walk_state->descending_callback = NULL;
83 walk_state->ascending_callback = NULL;
84 break;
85
76 case 1: 86 case 1:
77 87
88 /* Load pass 1 */
89
78 walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 | 90 walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 |
79 ACPI_PARSE_DELETE_TREE; 91 ACPI_PARSE_DELETE_TREE;
80 walk_state->descending_callback = acpi_ds_load1_begin_op; 92 walk_state->descending_callback = acpi_ds_load1_begin_op;
@@ -83,6 +95,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
83 95
84 case 2: 96 case 2:
85 97
98 /* Load pass 2 */
99
86 walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 | 100 walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 |
87 ACPI_PARSE_DELETE_TREE; 101 ACPI_PARSE_DELETE_TREE;
88 walk_state->descending_callback = acpi_ds_load2_begin_op; 102 walk_state->descending_callback = acpi_ds_load2_begin_op;
@@ -91,6 +105,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
91 105
92 case 3: 106 case 3:
93 107
108 /* Execution pass */
109
94#ifndef ACPI_NO_METHOD_EXECUTION 110#ifndef ACPI_NO_METHOD_EXECUTION
95 walk_state->parse_flags |= ACPI_PARSE_EXECUTE | 111 walk_state->parse_flags |= ACPI_PARSE_EXECUTE |
96 ACPI_PARSE_DELETE_TREE; 112 ACPI_PARSE_DELETE_TREE;
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 5b74677bf74d..a3fb7e4c0809 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -111,9 +111,8 @@ acpi_status acpi_ns_initialize_objects(void)
111 info.object_count)); 111 info.object_count));
112 112
113 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 113 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
114 "%u Control Methods found\n", info.method_count)); 114 "%u Control Methods found\n%u Op Regions found\n",
115 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 115 info.method_count, info.op_region_count));
116 "%u Op Regions found\n", info.op_region_count));
117 116
118 return_ACPI_STATUS(AE_OK); 117 return_ACPI_STATUS(AE_OK);
119} 118}
diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c
index 7ae521ce8d3f..7c9d0181f341 100644
--- a/drivers/acpi/acpica/nsload.c
+++ b/drivers/acpi/acpica/nsload.c
@@ -128,12 +128,12 @@ unlock:
128 * parse trees. 128 * parse trees.
129 */ 129 */
130 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 130 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
131 "**** Begin Table Method Parsing and Object Initialization\n")); 131 "**** Begin Table Object Initialization\n"));
132 132
133 status = acpi_ds_initialize_objects(table_index, node); 133 status = acpi_ds_initialize_objects(table_index, node);
134 134
135 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 135 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
136 "**** Completed Table Method Parsing and Object Initialization\n")); 136 "**** Completed Table Object Initialization\n"));
137 137
138 return_ACPI_STATUS(status); 138 return_ACPI_STATUS(status);
139} 139}
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 646d1a3f6e27..b058e2390fdd 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -480,6 +480,10 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
480 status = AE_OK; 480 status = AE_OK;
481 } 481 }
482 482
483 if (status == AE_CTRL_TERMINATE) {
484 return_ACPI_STATUS(status);
485 }
486
483 status = 487 status =
484 acpi_ps_complete_op(walk_state, &op, 488 acpi_ps_complete_op(walk_state, &op,
485 status); 489 status);
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index af1f46cd37a5..a6885077d59e 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -219,7 +219,10 @@ acpi_ps_build_named_op(struct acpi_walk_state *walk_state,
219 219
220 status = walk_state->descending_callback(walk_state, op); 220 status = walk_state->descending_callback(walk_state, op);
221 if (ACPI_FAILURE(status)) { 221 if (ACPI_FAILURE(status)) {
222 ACPI_EXCEPTION((AE_INFO, status, "During name lookup/catalog")); 222 if (status != AE_CTRL_TERMINATE) {
223 ACPI_EXCEPTION((AE_INFO, status,
224 "During name lookup/catalog"));
225 }
223 return_ACPI_STATUS(status); 226 return_ACPI_STATUS(status);
224 } 227 }
225 228
@@ -230,7 +233,7 @@ acpi_ps_build_named_op(struct acpi_walk_state *walk_state,
230 status = acpi_ps_next_parse_state(walk_state, *op, status); 233 status = acpi_ps_next_parse_state(walk_state, *op, status);
231 if (ACPI_FAILURE(status)) { 234 if (ACPI_FAILURE(status)) {
232 if (status == AE_CTRL_PENDING) { 235 if (status == AE_CTRL_PENDING) {
233 return_ACPI_STATUS(AE_CTRL_PARSE_PENDING); 236 status = AE_CTRL_PARSE_PENDING;
234 } 237 }
235 return_ACPI_STATUS(status); 238 return_ACPI_STATUS(status);
236 } 239 }
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b7af3b758f32..74a160cf85b9 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1539,6 +1539,22 @@ static int __init osi_setup(char *str)
1539 1539
1540__setup("acpi_osi=", osi_setup); 1540__setup("acpi_osi=", osi_setup);
1541 1541
1542/*
1543 * Enable the auto-serialization of named objects creation methods.
1544 *
1545 * This feature is disabled by default. It marks the AML control methods
1546 * that contain the opcodes to create named objects as "Serialized".
1547 */
1548static int __init acpi_auto_serialize_setup(char *str)
1549{
1550 acpi_gbl_auto_serialize_methods = TRUE;
1551 pr_info("ACPI: auto-serialization enabled\n");
1552
1553 return 1;
1554}
1555
1556__setup("acpi_auto_serialize", acpi_auto_serialize_setup);
1557
1542/* Check of resource interference between native drivers and ACPI 1558/* Check of resource interference between native drivers and ACPI
1543 * OperationRegions (SystemIO and System Memory only). 1559 * OperationRegions (SystemIO and System Memory only).
1544 * IO ports and memory declared in ACPI might be used by the ACPI subsystem 1560 * IO ports and memory declared in ACPI might be used by the ACPI subsystem