[ARM] 3377/2: add support for intel xsc3 core
[firefly-linux-kernel-4.4.55.git] / include / asm-x86_64 / system.h
index 38c1e8a69c9c03a91c290d3e004a0d55f85bead9..3975989802280ff1ad2ffc7322a68611ad2d5793 100644 (file)
@@ -70,12 +70,6 @@ extern void load_gs_index(unsigned);
                ".previous"                     \
                : :"r" (value), "r" (0))
 
-#define set_debug(value,register) \
-                __asm__("movq %0,%%db" #register  \
-               : /* no output */ \
-               :"r" ((unsigned long) value))
-
-
 #ifdef __KERNEL__
 struct alt_instr { 
        __u8 *instr;            /* original instruction */
@@ -193,6 +187,15 @@ static inline void write_cr4(unsigned long val)
 #define wbinvd() \
        __asm__ __volatile__ ("wbinvd": : :"memory");
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
+
 #endif /* __KERNEL__ */
 
 #define nop() __asm__ __volatile__ ("nop")
@@ -318,7 +321,7 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 #define wmb()  asm volatile("" ::: "memory")
 #endif
 #define read_barrier_depends() do {} while(0)
-#define set_mb(var, value) do { xchg(&var, value); } while (0)
+#define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
 #define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0)
@@ -345,11 +348,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 #define local_irq_disable()    __asm__ __volatile__("cli": : :"memory")
 #define local_irq_enable()     __asm__ __volatile__("sti": : :"memory")
 
-/* used in the idle loop; sti takes one instruction cycle to complete */
-#define safe_halt()            __asm__ __volatile__("sti; hlt": : :"memory")
-/* used when interrupts are already enabled or to shutdown the processor */
-#define halt()                 __asm__ __volatile__("hlt": : :"memory")
-
 #define irqs_disabled()                        \
 ({                                     \
        unsigned long flags;            \
@@ -361,6 +359,11 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 #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)
 #endif
 
+/* used in the idle loop; sti takes one instruction cycle to complete */
+#define safe_halt()            __asm__ __volatile__("sti; hlt": : :"memory")
+/* used when interrupts are already enabled or to shutdown the processor */
+#define halt()                 __asm__ __volatile__("hlt": : :"memory")
+
 void cpu_idle_wait(void);
 
 extern unsigned long arch_align_stack(unsigned long sp);