Merge branch 'misc' into for-linus
[linux-2.6-microblaze.git] / arch / x86 / include / asm / paravirt_types.h
index 0f400c0..bb2de45 100644 (file)
@@ -103,8 +103,6 @@ struct pv_cpu_ops {
        unsigned long (*get_debugreg)(int regno);
        void (*set_debugreg)(int regno, unsigned long value);
 
-       void (*clts)(void);
-
        unsigned long (*read_cr0)(void);
        void (*write_cr0)(unsigned long);
 
@@ -310,6 +308,8 @@ struct pv_lock_ops {
 
        void (*wait)(u8 *ptr, u8 val);
        void (*kick)(int cpu);
+
+       struct paravirt_callee_save vcpu_is_preempted;
 };
 
 /* This contains all the paravirt structures: we get a convenient
@@ -508,6 +508,18 @@ int paravirt_disable_iospace(void);
 #define PVOP_TEST_NULL(op)     ((void)op)
 #endif
 
+#define PVOP_RETMASK(rettype)                                          \
+       ({      unsigned long __mask = ~0UL;                            \
+               switch (sizeof(rettype)) {                              \
+               case 1: __mask =       0xffUL; break;                   \
+               case 2: __mask =     0xffffUL; break;                   \
+               case 4: __mask = 0xffffffffUL; break;                   \
+               default: break;                                         \
+               }                                                       \
+               __mask;                                                 \
+       })
+
+
 #define ____PVOP_CALL(rettype, op, clbr, call_clbr, extra_clbr,                \
                      pre, post, ...)                                   \
        ({                                                              \
@@ -535,7 +547,7 @@ int paravirt_disable_iospace(void);
                                       paravirt_clobber(clbr),          \
                                       ##__VA_ARGS__                    \
                                     : "memory", "cc" extra_clbr);      \
-                       __ret = (rettype)__eax;                         \
+                       __ret = (rettype)(__eax & PVOP_RETMASK(rettype));       \
                }                                                       \
                __ret;                                                  \
        })