]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/asm-x86/paravirt.h
Merge branch 'linus' into x86/header-guards
[mv-sheeva.git] / include / asm-x86 / paravirt.h
index 65ed02cdbbd79b65be3e5a7f491d465294678214..2e6821a0b6e78b0f6d03ecce89dd58377364e3b4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ASM_PARAVIRT_H
-#define __ASM_PARAVIRT_H
+#ifndef ASM_X86__PARAVIRT_H
+#define ASM_X86__PARAVIRT_H
 /* Various instructions on x86 need to be replaced for
  * para-virtualization: those hooks are defined here. */
 
@@ -205,7 +205,6 @@ struct pv_apic_ops {
         * these shouldn't be in this interface.
         */
        void (*apic_write)(unsigned long reg, u32 v);
-       void (*apic_write_atomic)(unsigned long reg, u32 v);
        u32 (*apic_read)(unsigned long reg);
        void (*setup_boot_clock)(void);
        void (*setup_secondary_clock)(void);
@@ -907,11 +906,6 @@ static inline void apic_write(unsigned long reg, u32 v)
        PVOP_VCALL2(pv_apic_ops.apic_write, reg, v);
 }
 
-static inline void apic_write_atomic(unsigned long reg, u32 v)
-{
-       PVOP_VCALL2(pv_apic_ops.apic_write_atomic, reg, v);
-}
-
 static inline u32 apic_read(unsigned long reg)
 {
        return PVOP_CALL1(unsigned long, pv_apic_ops.apic_read, reg);
@@ -1094,6 +1088,9 @@ static inline pteval_t pte_flags(pte_t pte)
                ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
                                 pte.pte);
 
+#ifdef CONFIG_PARAVIRT_DEBUG
+       BUG_ON(ret & PTE_PFN_MASK);
+#endif
        return ret;
 }
 
@@ -1387,6 +1384,8 @@ void _paravirt_nop(void);
 
 void paravirt_use_bytelocks(void);
 
+#ifdef CONFIG_SMP
+
 static inline int __raw_spin_is_locked(struct raw_spinlock *lock)
 {
        return PVOP_CALL1(int, pv_lock_ops.spin_is_locked, lock);
@@ -1399,7 +1398,7 @@ static inline int __raw_spin_is_contended(struct raw_spinlock *lock)
 
 static __always_inline void __raw_spin_lock(struct raw_spinlock *lock)
 {
-       return PVOP_VCALL1(pv_lock_ops.spin_lock, lock);
+       PVOP_VCALL1(pv_lock_ops.spin_lock, lock);
 }
 
 static __always_inline int __raw_spin_trylock(struct raw_spinlock *lock)
@@ -1409,9 +1408,11 @@ static __always_inline int __raw_spin_trylock(struct raw_spinlock *lock)
 
 static __always_inline void __raw_spin_unlock(struct raw_spinlock *lock)
 {
-       return PVOP_VCALL1(pv_lock_ops.spin_unlock, lock);
+       PVOP_VCALL1(pv_lock_ops.spin_unlock, lock);
 }
 
+#endif
+
 /* These all sit in the .parainstructions section to tell us what to patch. */
 struct paravirt_patch_site {
        u8 *instr;              /* original instructions */
@@ -1633,4 +1634,4 @@ static inline unsigned long __raw_local_irq_save(void)
 
 #endif /* __ASSEMBLY__ */
 #endif /* CONFIG_PARAVIRT */
-#endif /* __ASM_PARAVIRT_H */
+#endif /* ASM_X86__PARAVIRT_H */