[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linaro-acpi
Subject:    [Linaro-acpi] [RFC PATCH] ACPI: ARM/ARM64: ensure the ACPI FACS global_lock is never used in HW redu
From:       al.stone () linaro ! org
Date:       2013-10-24 0:16:07
Message-ID: 1382573767-28694-1-git-send-email-al.stone () linaro ! org
[Download RAW message or body]

From: Al Stone <ahs3@redhat.com>

This patch is dependent on the CONFIG_ACPI_REDUCED_HARDWARE patch
already being in place.  It may even make sense to be part of that
series.

The FACS contains a global_lock that is never to be used in Hardware
Reduced mode.  Instead of taking chances, this patch takes out the
macros used for the global_lock if we are in Hardware Reduced mode
so that they cannot be used.


Signed-off-by: Al Stone <al.stone@linaro.org>
---
 arch/arm/include/asm/acpi.h   | 3 ++-
 arch/arm64/include/asm/acpi.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/acpi.h b/arch/arm/include/asm/acpi.h
index ca7efaa..cf67b09 100644
--- a/arch/arm/include/asm/acpi.h
+++ b/arch/arm/include/asm/acpi.h
@@ -82,6 +82,7 @@
 /* Blob handling macros */
 #define	ACPI_BLOB_HEADER_SIZE	8
 
+#ifndef CONFIG_ACPI_REDUCED_HARDWARE
 int __acpi_acquire_global_lock(unsigned int *lock);
 int __acpi_release_global_lock(unsigned int *lock);
 
@@ -90,9 +91,9 @@ int __acpi_release_global_lock(unsigned int *lock);
 
 #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \
 	((Acq) = __acpi_release_global_lock(&facs->global_lock))
+#endif
 
 /* Basic configuration for ACPI */
-/* BOZO: hardware reduced acpi only? */
 #ifdef	CONFIG_ACPI
 extern int acpi_disabled;
 extern int acpi_noirq;
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index a19b73f..bb9411f 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -60,6 +60,7 @@
 /* Blob handling macros */
 #define	ACPI_BLOB_HEADER_SIZE	8
 
+#ifndef CONFIG_ACPI_REDUCED_HARDWARE
 int __acpi_acquire_global_lock(unsigned int *lock);
 int __acpi_release_global_lock(unsigned int *lock);
 
@@ -68,9 +69,9 @@ int __acpi_release_global_lock(unsigned int *lock);
 
 #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \
 	((Acq) = __acpi_release_global_lock(&facs->global_lock))
+#endif
 
 /* Basic configuration for ACPI */
-/* BOZO: hardware reduced acpi only? */
 #ifdef	CONFIG_ACPI
 extern int acpi_disabled;
 extern int acpi_noirq;
-- 
1.8.3.1


_______________________________________________
Linaro-acpi mailing list
Linaro-acpi@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-acpi
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic