diff options
Diffstat (limited to 'arch/x86/include/asm/paravirt.h')
-rw-r--r-- | arch/x86/include/asm/paravirt.h | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 5653f43d90e5..ebbc4d8ab170 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
@@ -105,14 +105,14 @@ static inline void write_cr8(unsigned long x) | |||
105 | } | 105 | } |
106 | #endif | 106 | #endif |
107 | 107 | ||
108 | static inline void raw_safe_halt(void) | 108 | static inline void arch_safe_halt(void) |
109 | { | 109 | { |
110 | PVOP_VCALL0(pv_irq_ops.safe_halt); | 110 | PVOP_VCALL0(pv_irq_ops.safe_halt); |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline void halt(void) | 113 | static inline void halt(void) |
114 | { | 114 | { |
115 | PVOP_VCALL0(pv_irq_ops.safe_halt); | 115 | PVOP_VCALL0(pv_irq_ops.halt); |
116 | } | 116 | } |
117 | 117 | ||
118 | static inline void wbinvd(void) | 118 | static inline void wbinvd(void) |
@@ -416,11 +416,6 @@ static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) | |||
416 | PVOP_VCALL2(pv_mmu_ops.alloc_pmd, mm, pfn); | 416 | PVOP_VCALL2(pv_mmu_ops.alloc_pmd, mm, pfn); |
417 | } | 417 | } |
418 | 418 | ||
419 | static inline void paravirt_alloc_pmd_clone(unsigned long pfn, unsigned long clonepfn, | ||
420 | unsigned long start, unsigned long count) | ||
421 | { | ||
422 | PVOP_VCALL4(pv_mmu_ops.alloc_pmd_clone, pfn, clonepfn, start, count); | ||
423 | } | ||
424 | static inline void paravirt_release_pmd(unsigned long pfn) | 419 | static inline void paravirt_release_pmd(unsigned long pfn) |
425 | { | 420 | { |
426 | PVOP_VCALL1(pv_mmu_ops.release_pmd, pfn); | 421 | PVOP_VCALL1(pv_mmu_ops.release_pmd, pfn); |
@@ -440,6 +435,11 @@ static inline void pte_update(struct mm_struct *mm, unsigned long addr, | |||
440 | { | 435 | { |
441 | PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); | 436 | PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); |
442 | } | 437 | } |
438 | static inline void pmd_update(struct mm_struct *mm, unsigned long addr, | ||
439 | pmd_t *pmdp) | ||
440 | { | ||
441 | PVOP_VCALL3(pv_mmu_ops.pmd_update, mm, addr, pmdp); | ||
442 | } | ||
443 | 443 | ||
444 | static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, | 444 | static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, |
445 | pte_t *ptep) | 445 | pte_t *ptep) |
@@ -447,6 +447,12 @@ static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, | |||
447 | PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep); | 447 | PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep); |
448 | } | 448 | } |
449 | 449 | ||
450 | static inline void pmd_update_defer(struct mm_struct *mm, unsigned long addr, | ||
451 | pmd_t *pmdp) | ||
452 | { | ||
453 | PVOP_VCALL3(pv_mmu_ops.pmd_update_defer, mm, addr, pmdp); | ||
454 | } | ||
455 | |||
450 | static inline pte_t __pte(pteval_t val) | 456 | static inline pte_t __pte(pteval_t val) |
451 | { | 457 | { |
452 | pteval_t ret; | 458 | pteval_t ret; |
@@ -548,6 +554,19 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
548 | PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte); | 554 | PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte); |
549 | } | 555 | } |
550 | 556 | ||
557 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
558 | static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, | ||
559 | pmd_t *pmdp, pmd_t pmd) | ||
560 | { | ||
561 | if (sizeof(pmdval_t) > sizeof(long)) | ||
562 | /* 5 arg words */ | ||
563 | pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); | ||
564 | else | ||
565 | PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, | ||
566 | native_pmd_val(pmd)); | ||
567 | } | ||
568 | #endif | ||
569 | |||
551 | static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) | 570 | static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) |
552 | { | 571 | { |
553 | pmdval_t val = native_pmd_val(pmd); | 572 | pmdval_t val = native_pmd_val(pmd); |
@@ -829,32 +848,32 @@ static __always_inline void arch_spin_unlock(struct arch_spinlock *lock) | |||
829 | #define __PV_IS_CALLEE_SAVE(func) \ | 848 | #define __PV_IS_CALLEE_SAVE(func) \ |
830 | ((struct paravirt_callee_save) { func }) | 849 | ((struct paravirt_callee_save) { func }) |
831 | 850 | ||
832 | static inline unsigned long __raw_local_save_flags(void) | 851 | static inline notrace unsigned long arch_local_save_flags(void) |
833 | { | 852 | { |
834 | return PVOP_CALLEE0(unsigned long, pv_irq_ops.save_fl); | 853 | return PVOP_CALLEE0(unsigned long, pv_irq_ops.save_fl); |
835 | } | 854 | } |
836 | 855 | ||
837 | static inline void raw_local_irq_restore(unsigned long f) | 856 | static inline notrace void arch_local_irq_restore(unsigned long f) |
838 | { | 857 | { |
839 | PVOP_VCALLEE1(pv_irq_ops.restore_fl, f); | 858 | PVOP_VCALLEE1(pv_irq_ops.restore_fl, f); |
840 | } | 859 | } |
841 | 860 | ||
842 | static inline void raw_local_irq_disable(void) | 861 | static inline notrace void arch_local_irq_disable(void) |
843 | { | 862 | { |
844 | PVOP_VCALLEE0(pv_irq_ops.irq_disable); | 863 | PVOP_VCALLEE0(pv_irq_ops.irq_disable); |
845 | } | 864 | } |
846 | 865 | ||
847 | static inline void raw_local_irq_enable(void) | 866 | static inline notrace void arch_local_irq_enable(void) |
848 | { | 867 | { |
849 | PVOP_VCALLEE0(pv_irq_ops.irq_enable); | 868 | PVOP_VCALLEE0(pv_irq_ops.irq_enable); |
850 | } | 869 | } |
851 | 870 | ||
852 | static inline unsigned long __raw_local_irq_save(void) | 871 | static inline notrace unsigned long arch_local_irq_save(void) |
853 | { | 872 | { |
854 | unsigned long f; | 873 | unsigned long f; |
855 | 874 | ||
856 | f = __raw_local_save_flags(); | 875 | f = arch_local_save_flags(); |
857 | raw_local_irq_disable(); | 876 | arch_local_irq_disable(); |
858 | return f; | 877 | return f; |
859 | } | 878 | } |
860 | 879 | ||