Deleted Added
full compact
evmisc.c (67754) evmisc.c (69450)
1/******************************************************************************
2 *
3 * Module Name: evmisc - ACPI device notification handler dispatch
4 * and ACPI Global Lock support
1/******************************************************************************
2 *
3 * Module Name: evmisc - ACPI device notification handler dispatch
4 * and ACPI Global Lock support
5 * $Revision: 15 $
5 * $Revision: 19 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights

--- 249 unchanged lines hidden (view full) ---

263 * RETURN: None
264 *
265 * DESCRIPTION: Invoked by SCI interrupt handler upon acquisition of the
266 * Global Lock. Simply signal all threads that are waiting
267 * for the lock.
268 *
269 **************************************************************************/
270
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights

--- 249 unchanged lines hidden (view full) ---

263 * RETURN: None
264 *
265 * DESCRIPTION: Invoked by SCI interrupt handler upon acquisition of the
266 * Global Lock. Simply signal all threads that are waiting
267 * for the lock.
268 *
269 **************************************************************************/
270
271void
271static void
272AcpiEvGlobalLockThread (
273 void *Context)
274{
275
276 /* Signal threads that are waiting for the lock */
277
278 if (AcpiGbl_GlobalLockThreadCount)
279 {

--- 12 unchanged lines hidden (view full) ---

292 * RETURN: Status
293 *
294 * DESCRIPTION: Invoked directly from the SCI handler when a global lock
295 * release interrupt occurs. Grab the global lock and queue
296 * the global lock thread for execution
297 *
298 **************************************************************************/
299
272AcpiEvGlobalLockThread (
273 void *Context)
274{
275
276 /* Signal threads that are waiting for the lock */
277
278 if (AcpiGbl_GlobalLockThreadCount)
279 {

--- 12 unchanged lines hidden (view full) ---

292 * RETURN: Status
293 *
294 * DESCRIPTION: Invoked directly from the SCI handler when a global lock
295 * release interrupt occurs. Grab the global lock and queue
296 * the global lock thread for execution
297 *
298 **************************************************************************/
299
300UINT32
300static UINT32
301AcpiEvGlobalLockHandler (
302 void *Context)
303{
304 BOOLEAN Acquired = FALSE;
305 void *GlobalLock;
306
307
308 /*
309 * Attempt to get the lock
310 * If we don't get it now, it will be marked pending and we will
311 * take another interrupt when it becomes free.
312 */
313
301AcpiEvGlobalLockHandler (
302 void *Context)
303{
304 BOOLEAN Acquired = FALSE;
305 void *GlobalLock;
306
307
308 /*
309 * Attempt to get the lock
310 * If we don't get it now, it will be marked pending and we will
311 * take another interrupt when it becomes free.
312 */
313
314 GlobalLock = &AcpiGbl_FACS->GlobalLock;
314 GlobalLock = AcpiGbl_FACS->GlobalLock;
315 ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
316 if (Acquired)
317 {
318 /* Got the lock, now wake all threads waiting for it */
319
320 AcpiGbl_GlobalLockAcquired = TRUE;
321
322 /* Run the Global Lock thread which will signal all waiting threads */

--- 70 unchanged lines hidden (view full) ---

393 if (!AcpiGbl_FACS)
394 {
395 return_ACPI_STATUS (AE_OK);
396 }
397
398
399 /* We must acquire the actual hardware lock */
400
315 ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
316 if (Acquired)
317 {
318 /* Got the lock, now wake all threads waiting for it */
319
320 AcpiGbl_GlobalLockAcquired = TRUE;
321
322 /* Run the Global Lock thread which will signal all waiting threads */

--- 70 unchanged lines hidden (view full) ---

393 if (!AcpiGbl_FACS)
394 {
395 return_ACPI_STATUS (AE_OK);
396 }
397
398
399 /* We must acquire the actual hardware lock */
400
401 GlobalLock = &AcpiGbl_FACS->GlobalLock;
401 GlobalLock = AcpiGbl_FACS->GlobalLock;
402 ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
403 if (Acquired)
404 {
405 /* We got the lock */
406
407 DEBUG_PRINT (ACPI_INFO, ("Acquired the HW Global Lock\n"));
408
409 AcpiGbl_GlobalLockAcquired = TRUE;

--- 52 unchanged lines hidden (view full) ---

462
463 if (!AcpiGbl_GlobalLockThreadCount)
464 {
465 /*
466 * No more threads holding lock, we can do the actual hardware
467 * release
468 */
469
402 ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
403 if (Acquired)
404 {
405 /* We got the lock */
406
407 DEBUG_PRINT (ACPI_INFO, ("Acquired the HW Global Lock\n"));
408
409 AcpiGbl_GlobalLockAcquired = TRUE;

--- 52 unchanged lines hidden (view full) ---

462
463 if (!AcpiGbl_GlobalLockThreadCount)
464 {
465 /*
466 * No more threads holding lock, we can do the actual hardware
467 * release
468 */
469
470 GlobalLock = &AcpiGbl_FACS->GlobalLock;
470 GlobalLock = AcpiGbl_FACS->GlobalLock;
471 ACPI_RELEASE_GLOBAL_LOCK (GlobalLock, Pending);
472 AcpiGbl_GlobalLockAcquired = FALSE;
473
474 /*
475 * If the pending bit was set, we must write GBL_RLS to the control
476 * register
477 */
478 if (Pending)
479 {
471 ACPI_RELEASE_GLOBAL_LOCK (GlobalLock, Pending);
472 AcpiGbl_GlobalLockAcquired = FALSE;
473
474 /*
475 * If the pending bit was set, we must write GBL_RLS to the control
476 * register
477 */
478 if (Pending)
479 {
480 AcpiHwRegisterAccess (ACPI_WRITE, ACPI_MTX_LOCK,
481 PM1_CONTROL | GBL_RLS, 1);
480 AcpiHwRegisterBitAccess (ACPI_WRITE, ACPI_MTX_LOCK,
481 GBL_RLS, 1);
482 }
483 }
484
485 return_VOID;
486}
482 }
483 }
484
485 return_VOID;
486}