aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c4
-rw-r--r--arch/sparc64/mm/init.c32
2 files changed, 15 insertions, 21 deletions
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 3c06bfb92a8c..f1f01378d079 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -241,10 +241,6 @@ EXPORT_SYMBOL(verify_compat_iovec);
241#endif 241#endif
242 242
243EXPORT_SYMBOL(dump_fpu); 243EXPORT_SYMBOL(dump_fpu);
244EXPORT_SYMBOL(pte_alloc_one_kernel);
245#ifndef CONFIG_SMP
246EXPORT_SYMBOL(pgt_quicklists);
247#endif
248EXPORT_SYMBOL(put_fs_struct); 244EXPORT_SYMBOL(put_fs_struct);
249 245
250/* math-emu wants this */ 246/* math-emu wants this */
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 936ae1a594ac..7c456afaa9a5 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)