patch-2.4.14 linux/drivers/acpi/include/platform/acgcc.h

Next file: linux/drivers/acpi/include/platform/aclinux.h
Previous file: linux/drivers/acpi/include/platform/acenv.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/acpi/include/platform/acgcc.h linux/drivers/acpi/include/platform/acgcc.h
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acgcc.h - GCC specific defines, etc.
- *       $Revision: 9 $
+ *       $Revision: 14 $
  *
  *****************************************************************************/
 
@@ -93,6 +93,7 @@
 
 
 #else /* DO IA32 */
+
 #define COMPILER_DEPENDENT_UINT64   unsigned long long
 #define ACPI_ASM_MACROS
 #define causeinterrupt(level)
@@ -100,7 +101,6 @@
 #define disable() __cli()
 #define enable()  __sti()
 #define halt()    __asm__ __volatile__ ("sti; hlt":::"memory")
-#define wbinvd()  __asm__ __volatile__ ("wbinvd":::"memory")
 
 /*! [Begin] no source code translation
  *
@@ -139,8 +139,30 @@
 			:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
 	} while(0)
 
+
+/*
+ * Math helper asm macros
+ */
+#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
+		asm("divl %2;"        \
+		:"=a"(q32), "=d"(r32) \
+		:"r"(d32),            \
+		"0"(n_lo), "1"(n_hi))
+
+
+#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
+	asm("shrl   $1,%2;"             \
+	    "rcrl   $1,%3;"             \
+	    :"=r"(n_hi), "=r"(n_lo)     \
+	    :"0"(n_hi), "1"(n_lo))
+
 /*! [End] no source code translation !*/
 
 #endif /* IA 32 */
+
+/* This macro is used to tag functions as "printf-like" because
+ * some compilers (like GCC) can catch printf format string problems.
+ */
+#define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 4, 5)))
 
 #endif /* __ACGCC_H__ */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)