diff options
Diffstat (limited to 'include/asm-i386/paravirt.h')
-rw-r--r-- | include/asm-i386/paravirt.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 7f846a7d6bcc..7df88be2dd9e 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -52,6 +52,8 @@ struct paravirt_ops | |||
52 | /* Basic arch-specific setup */ | 52 | /* Basic arch-specific setup */ |
53 | void (*arch_setup)(void); | 53 | void (*arch_setup)(void); |
54 | char *(*memory_setup)(void); | 54 | char *(*memory_setup)(void); |
55 | void (*post_allocator_init)(void); | ||
56 | |||
55 | void (*init_IRQ)(void); | 57 | void (*init_IRQ)(void); |
56 | void (*time_init)(void); | 58 | void (*time_init)(void); |
57 | 59 | ||
@@ -116,7 +118,7 @@ struct paravirt_ops | |||
116 | 118 | ||
117 | u64 (*read_tsc)(void); | 119 | u64 (*read_tsc)(void); |
118 | u64 (*read_pmc)(void); | 120 | u64 (*read_pmc)(void); |
119 | u64 (*get_scheduled_cycles)(void); | 121 | unsigned long long (*sched_clock)(void); |
120 | unsigned long (*get_cpu_khz)(void); | 122 | unsigned long (*get_cpu_khz)(void); |
121 | 123 | ||
122 | /* Segment descriptor handling */ | 124 | /* Segment descriptor handling */ |
@@ -173,7 +175,7 @@ struct paravirt_ops | |||
173 | unsigned long va); | 175 | unsigned long va); |
174 | 176 | ||
175 | /* Hooks for allocating/releasing pagetable pages */ | 177 | /* Hooks for allocating/releasing pagetable pages */ |
176 | void (*alloc_pt)(u32 pfn); | 178 | void (*alloc_pt)(struct mm_struct *mm, u32 pfn); |
177 | void (*alloc_pd)(u32 pfn); | 179 | void (*alloc_pd)(u32 pfn); |
178 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); | 180 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); |
179 | void (*release_pt)(u32 pfn); | 181 | void (*release_pt)(u32 pfn); |
@@ -260,6 +262,7 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *site, unsigned len) | |||
260 | unsigned paravirt_patch_insns(void *site, unsigned len, | 262 | unsigned paravirt_patch_insns(void *site, unsigned len, |
261 | const char *start, const char *end); | 263 | const char *start, const char *end); |
262 | 264 | ||
265 | int paravirt_disable_iospace(void); | ||
263 | 266 | ||
264 | /* | 267 | /* |
265 | * This generates an indirect call based on the operation type number. | 268 | * This generates an indirect call based on the operation type number. |
@@ -563,7 +566,10 @@ static inline u64 paravirt_read_tsc(void) | |||
563 | 566 | ||
564 | #define rdtscll(val) (val = paravirt_read_tsc()) | 567 | #define rdtscll(val) (val = paravirt_read_tsc()) |
565 | 568 | ||
566 | #define get_scheduled_cycles(val) (val = paravirt_ops.get_scheduled_cycles()) | 569 | static inline unsigned long long paravirt_sched_clock(void) |
570 | { | ||
571 | return PVOP_CALL0(unsigned long long, sched_clock); | ||
572 | } | ||
567 | #define calculate_cpu_khz() (paravirt_ops.get_cpu_khz()) | 573 | #define calculate_cpu_khz() (paravirt_ops.get_cpu_khz()) |
568 | 574 | ||
569 | #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) | 575 | #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) |
@@ -669,6 +675,12 @@ static inline void setup_secondary_clock(void) | |||
669 | } | 675 | } |
670 | #endif | 676 | #endif |
671 | 677 | ||
678 | static inline void paravirt_post_allocator_init(void) | ||
679 | { | ||
680 | if (paravirt_ops.post_allocator_init) | ||
681 | (*paravirt_ops.post_allocator_init)(); | ||
682 | } | ||
683 | |||
672 | static inline void paravirt_pagetable_setup_start(pgd_t *base) | 684 | static inline void paravirt_pagetable_setup_start(pgd_t *base) |
673 | { | 685 | { |
674 | if (paravirt_ops.pagetable_setup_start) | 686 | if (paravirt_ops.pagetable_setup_start) |
@@ -725,9 +737,9 @@ static inline void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, | |||
725 | PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va); | 737 | PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va); |
726 | } | 738 | } |
727 | 739 | ||
728 | static inline void paravirt_alloc_pt(unsigned pfn) | 740 | static inline void paravirt_alloc_pt(struct mm_struct *mm, unsigned pfn) |
729 | { | 741 | { |
730 | PVOP_VCALL1(alloc_pt, pfn); | 742 | PVOP_VCALL2(alloc_pt, mm, pfn); |
731 | } | 743 | } |
732 | static inline void paravirt_release_pt(unsigned pfn) | 744 | static inline void paravirt_release_pt(unsigned pfn) |
733 | { | 745 | { |