aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/mm/fault.c2
-rw-r--r--arch/sparc/mm/init.c8
-rw-r--r--arch/sparc/mm/srmmu.c38
-rw-r--r--arch/sparc/mm/tsunami.S1
-rw-r--r--include/asm-sparc/mbus.h2
-rw-r--r--include/asm-sparc/page.h2
6 files changed, 25 insertions, 28 deletions
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c
index 0a3cd8f6cfe4..3604c2e86709 100644
--- a/arch/sparc/mm/fault.c
+++ b/arch/sparc/mm/fault.c
@@ -451,7 +451,7 @@ asmlinkage void do_sun4c_fault(struct pt_regs *regs, int text_fault, int write,
451} 451}
452 452
453/* This always deals with user addresses. */ 453/* This always deals with user addresses. */
454inline void force_user_fault(unsigned long address, int write) 454static void force_user_fault(unsigned long address, int write)
455{ 455{
456 struct vm_area_struct *vma; 456 struct vm_area_struct *vma;
457 struct task_struct *tsk = current; 457 struct task_struct *tsk = current;
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index 7794ecb896e3..8f94a2d62f13 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -128,7 +128,7 @@ unsigned long calc_highpages(void)
128 return nr; 128 return nr;
129} 129}
130 130
131unsigned long calc_max_low_pfn(void) 131static unsigned long calc_max_low_pfn(void)
132{ 132{
133 int i; 133 int i;
134 unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); 134 unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT);
@@ -292,7 +292,7 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
292 * 292 *
293 * We simply copy the 2.4 implementation for now. 293 * We simply copy the 2.4 implementation for now.
294 */ 294 */
295int pgt_cache_water[2] = { 25, 50 }; 295static int pgt_cache_water[2] = { 25, 50 };
296 296
297void check_pgt_cache(void) 297void check_pgt_cache(void)
298{ 298{
@@ -356,8 +356,6 @@ void __init paging_init(void)
356 device_scan(); 356 device_scan();
357} 357}
358 358
359struct cache_palias *sparc_aliases;
360
361static void __init taint_real_pages(void) 359static void __init taint_real_pages(void)
362{ 360{
363 int i; 361 int i;
@@ -375,7 +373,7 @@ static void __init taint_real_pages(void)
375 } 373 }
376} 374}
377 375
378void map_high_region(unsigned long start_pfn, unsigned long end_pfn) 376static void map_high_region(unsigned long start_pfn, unsigned long end_pfn)
379{ 377{
380 unsigned long tmp; 378 unsigned long tmp;
381 379
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 23d3291a3e81..c624e04ff03e 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -50,7 +50,7 @@
50#include <asm/btfixup.h> 50#include <asm/btfixup.h>
51 51
52enum mbus_module srmmu_modtype; 52enum mbus_module srmmu_modtype;
53unsigned int hwbug_bitmask; 53static unsigned int hwbug_bitmask;
54int vac_cache_size; 54int vac_cache_size;
55int vac_line_size; 55int vac_line_size;
56 56
@@ -60,7 +60,7 @@ extern unsigned long last_valid_pfn;
60 60
61extern unsigned long page_kernel; 61extern unsigned long page_kernel;
62 62
63pgd_t *srmmu_swapper_pg_dir; 63static pgd_t *srmmu_swapper_pg_dir;
64 64
65#ifdef CONFIG_SMP 65#ifdef CONFIG_SMP
66#define FLUSH_BEGIN(mm) 66#define FLUSH_BEGIN(mm)
@@ -83,12 +83,12 @@ BTFIXUPDEF_CALL(void, local_flush_page_for_dma, unsigned long)
83char *srmmu_name; 83char *srmmu_name;
84 84
85ctxd_t *srmmu_ctx_table_phys; 85ctxd_t *srmmu_ctx_table_phys;
86ctxd_t *srmmu_context_table; 86static ctxd_t *srmmu_context_table;
87 87
88int viking_mxcc_present; 88int viking_mxcc_present;
89static DEFINE_SPINLOCK(srmmu_context_spinlock); 89static DEFINE_SPINLOCK(srmmu_context_spinlock);
90 90
91int is_hypersparc; 91static int is_hypersparc;
92 92
93/* 93/*
94 * In general all page table modifications should use the V8 atomic 94 * In general all page table modifications should use the V8 atomic
@@ -112,11 +112,11 @@ static inline int srmmu_device_memory(unsigned long x)
112 return ((x & 0xF0000000) != 0); 112 return ((x & 0xF0000000) != 0);
113} 113}
114 114
115int srmmu_cache_pagetables; 115static int srmmu_cache_pagetables;
116 116
117/* these will be initialized in srmmu_nocache_calcsize() */ 117/* these will be initialized in srmmu_nocache_calcsize() */
118unsigned long srmmu_nocache_size; 118static unsigned long srmmu_nocache_size;
119unsigned long srmmu_nocache_end; 119static unsigned long srmmu_nocache_end;
120 120
121/* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */ 121/* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */
122#define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) 122#define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4)
@@ -324,7 +324,7 @@ static unsigned long __srmmu_get_nocache(int size, int align)
324 return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); 324 return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT));
325} 325}
326 326
327unsigned inline long srmmu_get_nocache(int size, int align) 327static unsigned long srmmu_get_nocache(int size, int align)
328{ 328{
329 unsigned long tmp; 329 unsigned long tmp;
330 330
@@ -336,7 +336,7 @@ unsigned inline long srmmu_get_nocache(int size, int align)
336 return tmp; 336 return tmp;
337} 337}
338 338
339void srmmu_free_nocache(unsigned long vaddr, int size) 339static void srmmu_free_nocache(unsigned long vaddr, int size)
340{ 340{
341 int offset; 341 int offset;
342 342
@@ -369,7 +369,8 @@ void srmmu_free_nocache(unsigned long vaddr, int size)
369 bit_map_clear(&srmmu_nocache_map, offset, size); 369 bit_map_clear(&srmmu_nocache_map, offset, size);
370} 370}
371 371
372void srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end); 372static void srmmu_early_allocate_ptable_skeleton(unsigned long start,
373 unsigned long end);
373 374
374extern unsigned long probe_memory(void); /* in fault.c */ 375extern unsigned long probe_memory(void); /* in fault.c */
375 376
@@ -377,7 +378,7 @@ extern unsigned long probe_memory(void); /* in fault.c */
377 * Reserve nocache dynamically proportionally to the amount of 378 * Reserve nocache dynamically proportionally to the amount of
378 * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002 379 * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002
379 */ 380 */
380void srmmu_nocache_calcsize(void) 381static void srmmu_nocache_calcsize(void)
381{ 382{
382 unsigned long sysmemavail = probe_memory() / 1024; 383 unsigned long sysmemavail = probe_memory() / 1024;
383 int srmmu_nocache_npages; 384 int srmmu_nocache_npages;
@@ -398,7 +399,7 @@ void srmmu_nocache_calcsize(void)
398 srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; 399 srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size;
399} 400}
400 401
401void __init srmmu_nocache_init(void) 402static void __init srmmu_nocache_init(void)
402{ 403{
403 unsigned int bitmap_bits; 404 unsigned int bitmap_bits;
404 pgd_t *pgd; 405 pgd_t *pgd;
@@ -645,7 +646,7 @@ static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len)
645 * mappings on the kernel stack without any special code as we did 646 * mappings on the kernel stack without any special code as we did
646 * need on the sun4c. 647 * need on the sun4c.
647 */ 648 */
648struct thread_info *srmmu_alloc_thread_info(void) 649static struct thread_info *srmmu_alloc_thread_info(void)
649{ 650{
650 struct thread_info *ret; 651 struct thread_info *ret;
651 652
@@ -1045,13 +1046,14 @@ extern void hypersparc_setup_blockops(void);
1045 * around 8mb mapped for us. 1046 * around 8mb mapped for us.
1046 */ 1047 */
1047 1048
1048void __init early_pgtable_allocfail(char *type) 1049static void __init early_pgtable_allocfail(char *type)
1049{ 1050{
1050 prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type); 1051 prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type);
1051 prom_halt(); 1052 prom_halt();
1052} 1053}
1053 1054
1054void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end) 1055static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start,
1056 unsigned long end)
1055{ 1057{
1056 pgd_t *pgdp; 1058 pgd_t *pgdp;
1057 pmd_t *pmdp; 1059 pmd_t *pmdp;
@@ -1081,7 +1083,8 @@ void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned l
1081 } 1083 }
1082} 1084}
1083 1085
1084void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long end) 1086static void __init srmmu_allocate_ptable_skeleton(unsigned long start,
1087 unsigned long end)
1085{ 1088{
1086 pgd_t *pgdp; 1089 pgd_t *pgdp;
1087 pmd_t *pmdp; 1090 pmd_t *pmdp;
@@ -1116,7 +1119,8 @@ void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long en
1116 * looking at the prom's page table directly which is what most 1119 * looking at the prom's page table directly which is what most
1117 * other OS's do. Yuck... this is much better. 1120 * other OS's do. Yuck... this is much better.
1118 */ 1121 */
1119void __init srmmu_inherit_prom_mappings(unsigned long start,unsigned long end) 1122static void __init srmmu_inherit_prom_mappings(unsigned long start,
1123 unsigned long end)
1120{ 1124{
1121 pgd_t *pgdp; 1125 pgd_t *pgdp;
1122 pmd_t *pmdp; 1126 pmd_t *pmdp;
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
index db0d6de33a87..4e55e8f76648 100644
--- a/arch/sparc/mm/tsunami.S
+++ b/arch/sparc/mm/tsunami.S
@@ -93,7 +93,6 @@ tsunami_flush_tlb_page_out:
93 ldd [src + offset + 0x00], t2; \ 93 ldd [src + offset + 0x00], t2; \
94 std t2, [dst + offset + 0x00]; 94 std t2, [dst + offset + 0x00];
95 95
96 .globl tsunami_copy_1page
97tsunami_copy_1page: 96tsunami_copy_1page:
98/* NOTE: This routine has to be shorter than 70insns --jj */ 97/* NOTE: This routine has to be shorter than 70insns --jj */
99 or %g0, (PAGE_SIZE >> 8), %g1 98 or %g0, (PAGE_SIZE >> 8), %g1
diff --git a/include/asm-sparc/mbus.h b/include/asm-sparc/mbus.h
index bb5ae614b166..69f07a022ee6 100644
--- a/include/asm-sparc/mbus.h
+++ b/include/asm-sparc/mbus.h
@@ -43,8 +43,6 @@ extern unsigned int viking_rev, swift_rev, cypress_rev;
43#define HWBUG_SUPERSCALAR_BAD 0x00000080 43#define HWBUG_SUPERSCALAR_BAD 0x00000080
44#define HWBUG_PACINIT_BITROT 0x00000100 44#define HWBUG_PACINIT_BITROT 0x00000100
45 45
46extern unsigned int hwbug_bitmask;
47
48/* First the module type values. To find out which you have, just load 46/* First the module type values. To find out which you have, just load
49 * the mmu control register from ASI_M_MMUREG alternate address space and 47 * the mmu control register from ASI_M_MMUREG alternate address space and
50 * shift the value right 28 bits. 48 * shift the value right 28 bits.
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h
index 6aa9e4c910cf..14de518cc38f 100644
--- a/include/asm-sparc/page.h
+++ b/include/asm-sparc/page.h
@@ -58,8 +58,6 @@ struct cache_palias {
58 int context; 58 int context;
59}; 59};
60 60
61extern struct cache_palias *sparc_aliases;
62
63/* passing structs on the Sparc slow us down tremendously... */ 61/* passing structs on the Sparc slow us down tremendously... */
64 62
65/* #define STRICT_MM_TYPECHECKS */ 63/* #define STRICT_MM_TYPECHECKS */