aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 936ae1a594a..7c456afaa9a 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -141,26 +141,25 @@ unsigned long sparc64_kern_sec_context __read_mostly;
141 141
142int bigkernel = 0; 142int bigkernel = 0;
143 143
144/* XXX Tune this... */ 144kmem_cache_t *pgtable_cache __read_mostly;
145#define PGT_CACHE_LOW 25
146#define PGT_CACHE_HIGH 50
147 145
148#ifndef CONFIG_SMP 146static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags)
149struct pgtable_cache_struct pgt_quicklists; 147{
150#endif 148 clear_page(addr);
149}
151 150
152void check_pgt_cache(void) 151void pgtable_cache_init(void)
153{ 152{
154 preempt_disable(); 153 pgtable_cache = kmem_cache_create("pgtable_cache",
155 if (pgtable_cache_size > PGT_CACHE_HIGH) { 154 PAGE_SIZE, PAGE_SIZE,
156 do { 155 SLAB_HWCACHE_ALIGN |
157 if (pgd_quicklist) 156 SLAB_MUST_HWCACHE_ALIGN,
158 free_pgd_slow(get_pgd_fast()); 157 zero_ctor,
159 if (pte_quicklist) 158 NULL);
160 free_pte_slow(pte_alloc_one_fast()); 159 if (!pgtable_cache) {
161 } while (pgtable_cache_size > PGT_CACHE_LOW); 160 prom_printf("pgtable_cache_init(): Could not create!\n");
161 prom_halt();
162 } 162 }
163 preempt_enable();
164} 163}
165 164
166#ifdef CONFIG_DEBUG_DCFLUSH 165#ifdef CONFIG_DEBUG_DCFLUSH
@@ -340,7 +339,6 @@ void show_mem(void)
340 nr_swap_pages << (PAGE_SHIFT-10)); 339 nr_swap_pages << (PAGE_SHIFT-10));
341 printk("%ld pages of RAM\n", num_physpages); 340 printk("%ld pages of RAM\n", num_physpages);
342 printk("%d free pages\n", nr_free_pages()); 341 printk("%d free pages\n", nr_free_pages());
343 printk("%d pages in page table cache\n",pgtable_cache_size);
344} 342}
345 343
346void mmu_info(struct seq_file *m) 344void mmu_info(struct seq_file *m)