aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/mmu.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-03-22 03:49:59 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-22 04:15:14 -0500
commitdcc1e8dd88d4bc55e32a26dad7633d20ffe606d2 (patch)
treea47592213d94f918867d3dd81bb91dac3e727dea /include/asm-sparc64/mmu.h
parent14778d9072e53d2171f66ffd9657daff41acfaed (diff)
[SPARC64]: Add a secondary TSB for hugepage mappings.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/mmu.h')
-rw-r--r--include/asm-sparc64/mmu.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/include/asm-sparc64/mmu.h b/include/asm-sparc64/mmu.h
index 230ba678d3b0..2d4f2ea9568a 100644
--- a/include/asm-sparc64/mmu.h
+++ b/include/asm-sparc64/mmu.h
@@ -90,18 +90,39 @@ extern void __tsb_insert(unsigned long ent, unsigned long tag, unsigned long pte
90extern void tsb_flush(unsigned long ent, unsigned long tag); 90extern void tsb_flush(unsigned long ent, unsigned long tag);
91extern void tsb_init(struct tsb *tsb, unsigned long size); 91extern void tsb_init(struct tsb *tsb, unsigned long size);
92 92
93typedef struct { 93struct tsb_config {
94 spinlock_t lock;
95 unsigned long sparc64_ctx_val;
96 struct tsb *tsb; 94 struct tsb *tsb;
97 unsigned long tsb_rss_limit; 95 unsigned long tsb_rss_limit;
98 unsigned long tsb_nentries; 96 unsigned long tsb_nentries;
99 unsigned long tsb_reg_val; 97 unsigned long tsb_reg_val;
100 unsigned long tsb_map_vaddr; 98 unsigned long tsb_map_vaddr;
101 unsigned long tsb_map_pte; 99 unsigned long tsb_map_pte;
102 struct hv_tsb_descr tsb_descr; 100};
101
102#define MM_TSB_BASE 0
103
104#ifdef CONFIG_HUGETLB_PAGE
105#define MM_TSB_HUGE 1
106#define MM_NUM_TSBS 2
107#else
108#define MM_NUM_TSBS 1
109#endif
110
111typedef struct {
112 spinlock_t lock;
113 unsigned long sparc64_ctx_val;
114 unsigned long huge_pte_count;
115 struct tsb_config tsb_block[MM_NUM_TSBS];
116 struct hv_tsb_descr tsb_descr[MM_NUM_TSBS];
103} mm_context_t; 117} mm_context_t;
104 118
105#endif /* !__ASSEMBLY__ */ 119#endif /* !__ASSEMBLY__ */
106 120
121#define TSB_CONFIG_TSB 0x00
122#define TSB_CONFIG_RSS_LIMIT 0x08
123#define TSB_CONFIG_NENTRIES 0x10
124#define TSB_CONFIG_REG_VAL 0x18
125#define TSB_CONFIG_MAP_VADDR 0x20
126#define TSB_CONFIG_MAP_PTE 0x28
127
107#endif /* __MMU_H */ 128#endif /* __MMU_H */