View | Details | Raw Unified | Return to bug 52191 | Differences between
and this patch

Collapse All | Expand All

(-)a/Documentation/kernel-parameters.txt (-2 lines)
Lines 298-305 bytes respectively. Such letter suffixes can also be entirely omitted. Link Here
298
	acpi_sci=	[HW,ACPI] ACPI System Control Interrupt trigger mode
298
	acpi_sci=	[HW,ACPI] ACPI System Control Interrupt trigger mode
299
			Format: { level | edge | high | low }
299
			Format: { level | edge | high | low }
300
300
301
	acpi_serialize	[HW,ACPI] force serialization of AML methods
302
303
	acpi_skip_timer_override [HW,ACPI]
301
	acpi_skip_timer_override [HW,ACPI]
304
			Recognize and ignore IRQ0/pin2 Interrupt Override.
302
			Recognize and ignore IRQ0/pin2 Interrupt Override.
305
			For broken nForce2 BIOS resulting in XT-PIC timer.
303
			For broken nForce2 BIOS resulting in XT-PIC timer.
(-)a/drivers/acpi/acpica/acglobal.h (-8 lines)
Lines 85-98 Link Here
85
u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
85
u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
86
86
87
/*
87
/*
88
 * Automatically serialize ALL control methods? Default is FALSE, meaning
89
 * to use the Serialized/not_serialized method flags on a per method basis.
90
 * Only change this if the ASL code is poorly written and cannot handle
91
 * reentrancy even though methods are marked "NotSerialized".
92
 */
93
u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);
94
95
/*
96
 * Create the predefined _OSI method in the namespace? Default is TRUE
88
 * Create the predefined _OSI method in the namespace? Default is TRUE
97
 * because ACPI CA is fully compatible with other ACPI implementations.
89
 * because ACPI CA is fully compatible with other ACPI implementations.
98
 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
90
 * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
(-)a/drivers/acpi/acpica/acinterp.h (-4 lines)
Lines 454-463 void acpi_ex_enter_interpreter(void); Link Here
454
454
455
void acpi_ex_exit_interpreter(void);
455
void acpi_ex_exit_interpreter(void);
456
456
457
void acpi_ex_reacquire_interpreter(void);
458
459
void acpi_ex_relinquish_interpreter(void);
460
461
u8 acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);
457
u8 acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);
462
458
463
void acpi_ex_acquire_global_lock(u32 rule);
459
void acpi_ex_acquire_global_lock(u32 rule);
(-)a/drivers/acpi/acpica/exsystem.c (-6 / +6 lines)
Lines 77-83 acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) Link Here
77
77
78
		/* We must wait, so unlock the interpreter */
78
		/* We must wait, so unlock the interpreter */
79
79
80
		acpi_ex_relinquish_interpreter();
80
		acpi_ex_exit_interpreter();
81
81
82
		status = acpi_os_wait_semaphore(semaphore, 1, timeout);
82
		status = acpi_os_wait_semaphore(semaphore, 1, timeout);
83
83
Lines 87-93 acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) Link Here
87
87
88
		/* Reacquire the interpreter */
88
		/* Reacquire the interpreter */
89
89
90
		acpi_ex_reacquire_interpreter();
90
		acpi_ex_enter_interpreter();
91
	}
91
	}
92
92
93
	return_ACPI_STATUS(status);
93
	return_ACPI_STATUS(status);
Lines 123-129 acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) Link Here
123
123
124
		/* We must wait, so unlock the interpreter */
124
		/* We must wait, so unlock the interpreter */
125
125
126
		acpi_ex_relinquish_interpreter();
126
		acpi_ex_exit_interpreter();
127
127
128
		status = acpi_os_acquire_mutex(mutex, timeout);
128
		status = acpi_os_acquire_mutex(mutex, timeout);
129
129
Lines 133-139 acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) Link Here
133
133
134
		/* Reacquire the interpreter */
134
		/* Reacquire the interpreter */
135
135
136
		acpi_ex_reacquire_interpreter();
136
		acpi_ex_enter_interpreter();
137
	}
137
	}
138
138
139
	return_ACPI_STATUS(status);
139
	return_ACPI_STATUS(status);
Lines 198-204 acpi_status acpi_ex_system_do_sleep(u64 how_long) Link Here
198
198
199
	/* Since this thread will sleep, we must release the interpreter */
199
	/* Since this thread will sleep, we must release the interpreter */
200
200
201
	acpi_ex_relinquish_interpreter();
201
	acpi_ex_exit_interpreter();
202
202
203
	/*
203
	/*
204
	 * For compatibility with other ACPI implementations and to prevent
204
	 * For compatibility with other ACPI implementations and to prevent
Lines 212-218 acpi_status acpi_ex_system_do_sleep(u64 how_long) Link Here
212
212
213
	/* And now we must get the interpreter again */
213
	/* And now we must get the interpreter again */
214
214
215
	acpi_ex_reacquire_interpreter();
215
	acpi_ex_enter_interpreter();
216
	return (AE_OK);
216
	return (AE_OK);
217
}
217
}
218
218
(-)a/drivers/acpi/acpica/exutils.c (-69 lines)
Lines 100-136 void acpi_ex_enter_interpreter(void) Link Here
100
100
101
/*******************************************************************************
101
/*******************************************************************************
102
 *
102
 *
103
 * FUNCTION:    acpi_ex_reacquire_interpreter
104
 *
105
 * PARAMETERS:  None
106
 *
107
 * RETURN:      None
108
 *
109
 * DESCRIPTION: Reacquire the interpreter execution region from within the
110
 *              interpreter code. Failure to enter the interpreter region is a
111
 *              fatal system error. Used in conjunction with
112
 *              relinquish_interpreter
113
 *
114
 ******************************************************************************/
115
116
void acpi_ex_reacquire_interpreter(void)
117
{
118
	ACPI_FUNCTION_TRACE(ex_reacquire_interpreter);
119
120
	/*
121
	 * If the global serialized flag is set, do not release the interpreter,
122
	 * since it was not actually released by acpi_ex_relinquish_interpreter.
123
	 * This forces the interpreter to be single threaded.
124
	 */
125
	if (!acpi_gbl_all_methods_serialized) {
126
		acpi_ex_enter_interpreter();
127
	}
128
129
	return_VOID;
130
}
131
132
/*******************************************************************************
133
 *
134
 * FUNCTION:    acpi_ex_exit_interpreter
103
 * FUNCTION:    acpi_ex_exit_interpreter
135
 *
104
 *
136
 * PARAMETERS:  None
105
 * PARAMETERS:  None
Lines 160-203 void acpi_ex_exit_interpreter(void) Link Here
160
129
161
/*******************************************************************************
130
/*******************************************************************************
162
 *
131
 *
163
 * FUNCTION:    acpi_ex_relinquish_interpreter
164
 *
165
 * PARAMETERS:  None
166
 *
167
 * RETURN:      None
168
 *
169
 * DESCRIPTION: Exit the interpreter execution region, from within the
170
 *              interpreter - before attempting an operation that will possibly
171
 *              block the running thread.
172
 *
173
 * Cases where the interpreter is unlocked internally
174
 *      1) Method to be blocked on a Sleep() AML opcode
175
 *      2) Method to be blocked on an Acquire() AML opcode
176
 *      3) Method to be blocked on a Wait() AML opcode
177
 *      4) Method to be blocked to acquire the global lock
178
 *      5) Method to be blocked waiting to execute a serialized control method
179
 *          that is currently executing
180
 *      6) About to invoke a user-installed opregion handler
181
 *
182
 ******************************************************************************/
183
184
void acpi_ex_relinquish_interpreter(void)
185
{
186
	ACPI_FUNCTION_TRACE(ex_relinquish_interpreter);
187
188
	/*
189
	 * If the global serialized flag is set, do not release the interpreter.
190
	 * This forces the interpreter to be single threaded.
191
	 */
192
	if (!acpi_gbl_all_methods_serialized) {
193
		acpi_ex_exit_interpreter();
194
	}
195
196
	return_VOID;
197
}
198
199
/*******************************************************************************
200
 *
201
 * FUNCTION:    acpi_ex_truncate_for32bit_table
132
 * FUNCTION:    acpi_ex_truncate_for32bit_table
202
 *
133
 *
203
 * PARAMETERS:  obj_desc        - Object to be truncated
134
 * PARAMETERS:  obj_desc        - Object to be truncated
(-)a/drivers/acpi/osl.c (-12 lines)
Lines 1539-1556 static int __init osi_setup(char *str) Link Here
1539
1539
1540
__setup("acpi_osi=", osi_setup);
1540
__setup("acpi_osi=", osi_setup);
1541
1541
1542
/* enable serialization to combat AE_ALREADY_EXISTS errors */
1543
static int __init acpi_serialize_setup(char *str)
1544
{
1545
	printk(KERN_INFO PREFIX "serialize enabled\n");
1546
1547
	acpi_gbl_all_methods_serialized = TRUE;
1548
1549
	return 1;
1550
}
1551
1552
__setup("acpi_serialize", acpi_serialize_setup);
1553
1554
/* Check of resource interference between native drivers and ACPI
1542
/* Check of resource interference between native drivers and ACPI
1555
 * OperationRegions (SystemIO and System Memory only).
1543
 * OperationRegions (SystemIO and System Memory only).
1556
 * IO ports and memory declared in ACPI might be used by the ACPI subsystem
1544
 * IO ports and memory declared in ACPI might be used by the ACPI subsystem
(-)a/include/acpi/acpixf.h (-2 lines)
Lines 71-77 extern u32 acpi_dbg_layer; Link Here
71
71
72
/* ACPICA runtime options */
72
/* ACPICA runtime options */
73
73
74
extern u8 acpi_gbl_all_methods_serialized;
75
extern u8 acpi_gbl_copy_dsdt_locally;
74
extern u8 acpi_gbl_copy_dsdt_locally;
76
extern u8 acpi_gbl_create_osi_method;
75
extern u8 acpi_gbl_create_osi_method;
77
extern u8 acpi_gbl_disable_auto_repair;
76
extern u8 acpi_gbl_disable_auto_repair;
78
- 

Return to bug 52191