diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-09 20:21:53 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:12:06 -0500 |
commit | 618e9ed98aed924a1fc664eb6522db4a5e927043 (patch) | |
tree | 08ace6185b8f9709cb22a23d329def1dae622666 /include/asm-sparc64 | |
parent | aa9143b9719c07fb6f1f6207790c9c5086ae07e7 (diff) |
[SPARC64]: Hypervisor TSB context switching.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/mmu.h | 16 | ||||
-rw-r--r-- | include/asm-sparc64/mmu_context.h | 10 |
2 files changed, 16 insertions, 10 deletions
diff --git a/include/asm-sparc64/mmu.h b/include/asm-sparc64/mmu.h index 55e622711b96..473d990848ee 100644 --- a/include/asm-sparc64/mmu.h +++ b/include/asm-sparc64/mmu.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/page.h> | 5 | #include <asm/page.h> |
6 | #include <asm/const.h> | 6 | #include <asm/const.h> |
7 | #include <asm/hypervisor.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * For the 8k pagesize kernel, use only 10 hw context bits to optimize some | 10 | * For the 8k pagesize kernel, use only 10 hw context bits to optimize some |
@@ -101,13 +102,14 @@ extern void __tsb_insert(unsigned long ent, unsigned long tag, unsigned long pte | |||
101 | extern void tsb_flush(unsigned long ent, unsigned long tag); | 102 | extern void tsb_flush(unsigned long ent, unsigned long tag); |
102 | 103 | ||
103 | typedef struct { | 104 | typedef struct { |
104 | unsigned long sparc64_ctx_val; | 105 | unsigned long sparc64_ctx_val; |
105 | struct tsb *tsb; | 106 | struct tsb *tsb; |
106 | unsigned long tsb_rss_limit; | 107 | unsigned long tsb_rss_limit; |
107 | unsigned long tsb_nentries; | 108 | unsigned long tsb_nentries; |
108 | unsigned long tsb_reg_val; | 109 | unsigned long tsb_reg_val; |
109 | unsigned long tsb_map_vaddr; | 110 | unsigned long tsb_map_vaddr; |
110 | unsigned long tsb_map_pte; | 111 | unsigned long tsb_map_pte; |
112 | struct hv_tsb_descr tsb_descr; | ||
111 | } mm_context_t; | 113 | } mm_context_t; |
112 | 114 | ||
113 | #endif /* !__ASSEMBLY__ */ | 115 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 2760353591ab..eb660b1609c4 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -22,14 +22,18 @@ extern void get_new_mmu_context(struct mm_struct *mm); | |||
22 | extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); | 22 | extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); |
23 | extern void destroy_context(struct mm_struct *mm); | 23 | extern void destroy_context(struct mm_struct *mm); |
24 | 24 | ||
25 | extern void __tsb_context_switch(unsigned long pgd_pa, unsigned long tsb_reg, | 25 | extern void __tsb_context_switch(unsigned long pgd_pa, |
26 | unsigned long tsb_vaddr, unsigned long tsb_pte); | 26 | unsigned long tsb_reg, |
27 | unsigned long tsb_vaddr, | ||
28 | unsigned long tsb_pte, | ||
29 | unsigned long tsb_descr_pa); | ||
27 | 30 | ||
28 | static inline void tsb_context_switch(struct mm_struct *mm) | 31 | static inline void tsb_context_switch(struct mm_struct *mm) |
29 | { | 32 | { |
30 | __tsb_context_switch(__pa(mm->pgd), mm->context.tsb_reg_val, | 33 | __tsb_context_switch(__pa(mm->pgd), mm->context.tsb_reg_val, |
31 | mm->context.tsb_map_vaddr, | 34 | mm->context.tsb_map_vaddr, |
32 | mm->context.tsb_map_pte); | 35 | mm->context.tsb_map_pte, |
36 | __pa(&mm->context.tsb_descr)); | ||
33 | } | 37 | } |
34 | 38 | ||
35 | extern void tsb_grow(struct mm_struct *mm, unsigned long mm_rss, gfp_t gfp_flags); | 39 | extern void tsb_grow(struct mm_struct *mm, unsigned long mm_rss, gfp_t gfp_flags); |