vserver 1.9.5.x5
[linux-2.6.git] / include / asm-x86_64 / system.h
index 6671eb6..c171093 100644 (file)
@@ -35,7 +35,7 @@
                     "thread_return:\n\t"                                           \
                     "movq %%gs:%P[pda_pcurrent],%%rsi\n\t"                       \
                     "movq %P[thread_info](%%rsi),%%r8\n\t"                       \
-                    "btr  %[tif_fork],%P[ti_flags](%%r8)\n\t"                    \
+                    LOCK "btr  %[tif_fork],%P[ti_flags](%%r8)\n\t"               \
                     "movq %%rax,%%rdi\n\t"                                       \
                     "jc   ret_from_fork\n\t"                                     \
                     RESTORE_CONTEXT                                                \
@@ -123,7 +123,7 @@ struct alt_instr {
  * If you use variable sized constraints like "m" or "g" in the 
  * replacement maake sure to pad to the worst case length.
  */
-#define alternative_input(oldinstr, newinstr, feature, input)          \
+#define alternative_input(oldinstr, newinstr, feature, input...)       \
        asm volatile ("661:\n\t" oldinstr "\n662:\n"                    \
                      ".section .altinstructions,\"a\"\n"               \
                      "  .align 8\n"                                    \
@@ -135,7 +135,7 @@ struct alt_instr {
                      ".previous\n"                                     \
                      ".section .altinstr_replacement,\"ax\"\n"         \
                      "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
-                     ".previous" :: "i" (feature), input)
+                     ".previous" :: "i" (feature), ##input)
 
 /*
  * Clear and set 'TS' bit respectively
@@ -326,6 +326,8 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 /* For spinlocks etc */
 #define local_irq_save(x)      do { warn_if_not_ulong(x); __asm__ __volatile__("# local_irq_save \n\t pushfq ; popq %0 ; cli":"=g" (x): /* no input */ :"memory"); } while (0)
 
+void cpu_idle_wait(void);
+
 /*
  * disable hlt during certain critical i/o operations
  */