]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Jan 2011 00:28:34 +0000 (16:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Jan 2011 00:28:34 +0000 (16:28 -0800)
* 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPICA: Update version to 20110112
  ACPICA: Update all ACPICA copyrights and signons to 2011
  ACPICA: Fix issues/fault with automatic "serialized" method support
  ACPICA: Debugger: Lock namespace for duration of a namespace dump
  ACPICA: Fix namespace race condition
  ACPICA: Fix memory leak in acpi_ev_asynch_execute_gpe_method().

1  2 
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/acobject.h
drivers/acpi/acpica/evmisc.c
drivers/acpi/acpica/nsinit.c
drivers/acpi/acpica/utmutex.c
include/acpi/actbl1.h

index 0e4dba0d0325329da4c4ebb508c4978c1094190f,c129a295da3cb9cd5b67af404acaccce6de7b50b..82a1bd283db84208080aeb657ebe22ec869e78c7
@@@ -5,7 -5,7 +5,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2010, Intel Corp.
+  * Copyright (C) 2000 - 2011, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -228,10 -228,8 +228,10 @@@ ACPI_EXTERN u8 acpi_gbl_global_lock_pre
   */
  ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock;    /* For GPE data structs and registers */
  ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;       /* For ACPI H/W except GPE registers */
 +ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */
  #define acpi_gbl_gpe_lock     &_acpi_gbl_gpe_lock
  #define acpi_gbl_hardware_lock        &_acpi_gbl_hardware_lock
 +#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
  
  /*****************************************************************************
   *
index 962a3ccff6fda012e10bfa9d6eed9adc7b2e4439,a0272e6792bf6d4c0c62bf4331d40913d387d2b6..1055769f2f01ae97f4f69780fd93b1015512d870
@@@ -6,7 -6,7 +6,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2010, Intel Corp.
+  * Copyright (C) 2000 - 2011, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
  
  #define AOPOBJ_AML_CONSTANT         0x01      /* Integer is an AML constant */
  #define AOPOBJ_STATIC_POINTER       0x02      /* Data is part of an ACPI table, don't delete */
 -#define AOPOBJ_DATA_VALID           0x04      /* Object is intialized and data is valid */
 +#define AOPOBJ_DATA_VALID           0x04      /* Object is initialized and data is valid */
  #define AOPOBJ_OBJECT_INITIALIZED   0x08      /* Region is initialized, _REG was run */
  #define AOPOBJ_SETUP_COMPLETE       0x10      /* Region setup is complete */
  #define AOPOBJ_INVALID              0x20      /* Host OS won't allow a Region address */
- #define AOPOBJ_MODULE_LEVEL         0x40      /* Method is actually module-level code */
- #define AOPOBJ_MODIFIED_NAMESPACE   0x80      /* Method modified the namespace */
  
  /******************************************************************************
   *
@@@ -175,7 -173,7 +173,7 @@@ struct acpi_object_region 
  };
  
  struct acpi_object_method {
-       ACPI_OBJECT_COMMON_HEADER u8 method_flags;
+       ACPI_OBJECT_COMMON_HEADER u8 info_flags;
        u8 param_count;
        u8 sync_level;
        union acpi_operand_object *mutex;
        union {
                ACPI_INTERNAL_METHOD implementation;
                union acpi_operand_object *handler;
-       } extra;
+       } dispatch;
  
        u32 aml_length;
        u8 thread_count;
        acpi_owner_id owner_id;
  };
  
+ /* Flags for info_flags field above */
+ #define ACPI_METHOD_MODULE_LEVEL        0x01  /* Method is actually module-level code */
+ #define ACPI_METHOD_INTERNAL_ONLY       0x02  /* Method is implemented internally (_OSI) */
+ #define ACPI_METHOD_SERIALIZED          0x04  /* Method is serialized */
+ #define ACPI_METHOD_SERIALIZED_PENDING  0x08  /* Method is to be marked serialized */
+ #define ACPI_METHOD_MODIFIED_NAMESPACE  0x10  /* Method modified the namespace */
  /******************************************************************************
   *
   * Objects that can be notified.  All share a common notify_info area.
index 38bba66fcce554a62ed63b3f5afd76d7d18186ba,ccd230b7aba430f744bf3d6474219961fd115184..7dc80946f7bd3c0f10a09fb35b38d44f3f23d651
@@@ -5,7 -5,7 +5,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2010, Intel Corp.
+  * Copyright (C) 2000 - 2011, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -284,39 -284,41 +284,39 @@@ static void ACPI_SYSTEM_XFACE acpi_ev_n
   * RETURN:      ACPI_INTERRUPT_HANDLED
   *
   * DESCRIPTION: Invoked directly from the SCI handler when a global lock
 - *              release interrupt occurs. Attempt to acquire the global lock,
 - *              if successful, signal the thread waiting for the lock.
 + *              release interrupt occurs.  If there's a thread waiting for
 + *              the global lock, signal it.
   *
   * NOTE: Assumes that the semaphore can be signaled from interrupt level. If
   * this is not possible for some reason, a separate thread will have to be
   * scheduled to do this.
   *
   ******************************************************************************/
 +static u8 acpi_ev_global_lock_pending;
  
  static u32 acpi_ev_global_lock_handler(void *context)
  {
 -      u8 acquired = FALSE;
 +      acpi_status status;
 +      acpi_cpu_flags flags;
  
 -      /*
 -       * Attempt to get the lock.
 -       *
 -       * If we don't get it now, it will be marked pending and we will
 -       * take another interrupt when it becomes free.
 -       */
 -      ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_FACS, acquired);
 -      if (acquired) {
 +      flags = acpi_os_acquire_lock(acpi_ev_global_lock_pending_lock);
  
 -              /* Got the lock, now wake all threads waiting for it */
 +      if (!acpi_ev_global_lock_pending) {
 +              goto out;
 +      }
  
 -              acpi_gbl_global_lock_acquired = TRUE;
 -              /* Send a unit to the semaphore */
 +      /* Send a unit to the semaphore */
  
 -              if (ACPI_FAILURE
 -                  (acpi_os_signal_semaphore
 -                   (acpi_gbl_global_lock_semaphore, 1))) {
 -                      ACPI_ERROR((AE_INFO,
 -                                  "Could not signal Global Lock semaphore"));
 -              }
 +      status = acpi_os_signal_semaphore(acpi_gbl_global_lock_semaphore, 1);
 +      if (ACPI_FAILURE(status)) {
 +              ACPI_ERROR((AE_INFO, "Could not signal Global Lock semaphore"));
        }
  
 +      acpi_ev_global_lock_pending = FALSE;
 +
 + out:
 +      acpi_os_release_lock(acpi_ev_global_lock_pending_lock, flags);
 +
        return (ACPI_INTERRUPT_HANDLED);
  }
  
@@@ -413,7 -415,6 +413,7 @@@ static int acpi_ev_global_lock_acquired
  
  acpi_status acpi_ev_acquire_global_lock(u16 timeout)
  {
 +      acpi_cpu_flags flags;
        acpi_status status = AE_OK;
        u8 acquired = FALSE;
  
                return_ACPI_STATUS(AE_OK);
        }
  
 -      /* Attempt to acquire the actual hardware lock */
 +      flags = acpi_os_acquire_lock(acpi_ev_global_lock_pending_lock);
 +
 +      do {
 +
 +              /* Attempt to acquire the actual hardware lock */
  
 -      ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_FACS, acquired);
 -      if (acquired) {
 +              ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_FACS, acquired);
 +              if (acquired) {
 +                      acpi_gbl_global_lock_acquired = TRUE;
 +
 +                      ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
 +                                        "Acquired hardware Global Lock\n"));
 +                      break;
 +              }
  
 -              /* We got the lock */
 +              acpi_ev_global_lock_pending = TRUE;
  
 +              acpi_os_release_lock(acpi_ev_global_lock_pending_lock, flags);
 +
 +              /*
 +               * Did not get the lock. The pending bit was set above, and we
 +               * must wait until we get the global lock released interrupt.
 +               */
                ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
 -                                "Acquired hardware Global Lock\n"));
 +                                "Waiting for hardware Global Lock\n"));
  
 -              acpi_gbl_global_lock_acquired = TRUE;
 -              return_ACPI_STATUS(AE_OK);
 -      }
 +              /*
 +               * Wait for handshake with the global lock interrupt handler.
 +               * This interface releases the interpreter if we must wait.
 +               */
 +              status = acpi_ex_system_wait_semaphore(
 +                                              acpi_gbl_global_lock_semaphore,
 +                                              ACPI_WAIT_FOREVER);
  
 -      /*
 -       * Did not get the lock. The pending bit was set above, and we must now
 -       * wait until we get the global lock released interrupt.
 -       */
 -      ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Waiting for hardware Global Lock\n"));
 +              flags = acpi_os_acquire_lock(acpi_ev_global_lock_pending_lock);
  
 -      /*
 -       * Wait for handshake with the global lock interrupt handler.
 -       * This interface releases the interpreter if we must wait.
 -       */
 -      status = acpi_ex_system_wait_semaphore(acpi_gbl_global_lock_semaphore,
 -                                             ACPI_WAIT_FOREVER);
 +      } while (ACPI_SUCCESS(status));
 +
 +      acpi_ev_global_lock_pending = FALSE;
 +
 +      acpi_os_release_lock(acpi_ev_global_lock_pending_lock, flags);
  
        return_ACPI_STATUS(status);
  }
index 0cac7ec0d2ece0764806fae7a11994da0520ab23,4622852eca5e75c57cbb3ea6ab3517d980172a12..fd7c6380e2941b9cf61500ace2d3a6021b80affe
@@@ -5,7 -5,7 +5,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2010, Intel Corp.
+  * Copyright (C) 2000 - 2011, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -577,7 -577,9 +577,7 @@@ acpi_ns_init_one_device(acpi_handle obj
         * as possible (without an NMI being received in the middle of
         * this) - so disable NMIs and initialize the device:
         */
 -      acpi_nmi_disable();
        status = acpi_ns_evaluate(info);
 -      acpi_nmi_enable();
  
        if (ACPI_SUCCESS(status)) {
                walk_info->num_INI++;
index 199528ff7f1d2edde7b17d832940117b33449a16,a429a74dcffaf7f9dc09636cf1b0cd0cbc691e07..a946c689f03b164b5ab7131fe6506a6958553801
@@@ -5,7 -5,7 +5,7 @@@
   ******************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2010, Intel Corp.
+  * Copyright (C) 2000 - 2011, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -85,7 -85,6 +85,7 @@@ acpi_status acpi_ut_mutex_initialize(vo
  
        spin_lock_init(acpi_gbl_gpe_lock);
        spin_lock_init(acpi_gbl_hardware_lock);
 +      spin_lock_init(acpi_ev_global_lock_pending_lock);
  
        /* Mutex for _OSI support */
        status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);
diff --combined include/acpi/actbl1.h
index cd77aa75c9623eec7edb38499969f437cc613ef4,981349daf5d5121f07d69530573c9c61310b5e9a..7504bc99b29b7359f9ec503a6c0def183c98c2c9
@@@ -5,7 -5,7 +5,7 @@@
   *****************************************************************************/
  
  /*
-  * Copyright (C) 2000 - 2010, Intel Corp.
+  * Copyright (C) 2000 - 2011, Intel Corp.
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -119,7 -119,7 +119,7 @@@ struct acpi_whea_header 
  struct acpi_table_bert {
        struct acpi_table_header header;        /* Common ACPI table header */
        u32 region_length;      /* Length of the boot error region */
 -      u64 address;            /* Physical addresss of the error region */
 +      u64 address;            /* Physical address of the error region */
  };
  
  /* Boot Error Region (not a subtable, pointed to by Address field above) */