ACPICA: Misc fixes for recent global lock code update

Fixes as a result of running full validation test suite.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
index c40b191..fd543ee 100644
--- a/drivers/acpi/executer/exutils.c
+++ b/drivers/acpi/executer/exutils.c
@@ -278,7 +278,8 @@
  *
  * FUNCTION:    acpi_ex_release_global_lock
  *
- * PARAMETERS:  None
+ * PARAMETERS:  field_flags           - Flags with Lock rule:
+ *                                      always_lock or never_lock
  *
  * RETURN:      None
  *
@@ -286,12 +287,18 @@
  *
  ******************************************************************************/
 
-void acpi_ex_release_global_lock(void)
+void acpi_ex_release_global_lock(u32 field_flags)
 {
 	acpi_status status;
 
 	ACPI_FUNCTION_TRACE(ex_release_global_lock);
 
+	/* Only use the lock if the always_lock bit is set */
+
+	if (!(field_flags & AML_FIELD_LOCK_RULE_MASK)) {
+		return_VOID;
+	}
+
 	/* Release the global lock */
 
 	status = acpi_ex_release_mutex_object(acpi_gbl_global_lock_mutex);