Add amd64 stubs for ACPI_ACQUIRE_GLOBAL_LOCK and ACPI_RELEASE_GLOBAL_LOCK

svn path=/branches/ros-amd64-bringup/; revision=46472
This commit is contained in:
Timo Kreuzer 2010-03-26 19:00:34 +00:00
parent 67e1375139
commit 14d311ab86

View file

@ -134,6 +134,33 @@
*/
#define ACPI_UNUSED_VAR __attribute__ ((unused))
#if defined (_AMD64_)
#define COMPILER_DEPENDENT_INT64 long long int
#define COMPILER_DEPENDENT_UINT64 unsigned long long int
// FIXME: These are only sonly stubs to make it compile
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
do { \
int dummy; \
asm("1: movl (%1),%%eax;" \
"movl %%eax,%%edx;" \
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \
} while(0)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
do { \
int dummy; \
asm("1: movl (%1),%%eax;" \
"movl %%eax,%%edx;" \
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
} while(0)
/*! [End] no source code translation !*/
#else /* DO IA32 */
#define COMPILER_DEPENDENT_INT64 long long int
#define COMPILER_DEPENDENT_UINT64 unsigned long long int
@ -164,6 +191,9 @@
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
} while(0)
#endif /* IA 32 */
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
{ \
q32 = n_hi / d32; \