aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-12 15:52:47 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 15:52:47 -0400
commit6439d1c693bae2e7552ceaf16e45a6e819d18873 (patch)
tree3ccd1bfbef1794b6fd45a2e8181659105cc0c0fc /arch/sparc/mm
parent3d8273675d4771d30e1e1c3dbae820dec55a0950 (diff)
sparc32: Un-btfixup PAGE_{NONE,COPY,READONLY,SHARED,KERNEL}.
That lets us also get rid of the run-time initialization of protection_map[] and all the ugly module workarounds for PAGE_KERNEL and PAGE_SHARED to deal with the fact that we can't do btfixups for modular code. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/init_32.c23
-rw-r--r--arch/sparc/mm/srmmu.c9
2 files changed, 0 insertions, 32 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index 79b215e9b5ca..61f9b7039760 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -44,9 +44,6 @@ EXPORT_SYMBOL(phys_base);
44unsigned long pfn_base; 44unsigned long pfn_base;
45EXPORT_SYMBOL(pfn_base); 45EXPORT_SYMBOL(pfn_base);
46 46
47unsigned long page_kernel;
48EXPORT_SYMBOL(page_kernel);
49
50struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1]; 47struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1];
51unsigned long sparc_unmapped_base; 48unsigned long sparc_unmapped_base;
52 49
@@ -293,9 +290,6 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
293extern void srmmu_paging_init(void); 290extern void srmmu_paging_init(void);
294extern void device_scan(void); 291extern void device_scan(void);
295 292
296pgprot_t PAGE_SHARED __read_mostly;
297EXPORT_SYMBOL(PAGE_SHARED);
298
299void __init paging_init(void) 293void __init paging_init(void)
300{ 294{
301 switch(sparc_cpu_model) { 295 switch(sparc_cpu_model) {
@@ -315,23 +309,6 @@ void __init paging_init(void)
315 prom_halt(); 309 prom_halt();
316 } 310 }
317 311
318 /* Initialize the protection map with non-constant, MMU dependent values. */
319 protection_map[0] = PAGE_NONE;
320 protection_map[1] = PAGE_READONLY;
321 protection_map[2] = PAGE_COPY;
322 protection_map[3] = PAGE_COPY;
323 protection_map[4] = PAGE_READONLY;
324 protection_map[5] = PAGE_READONLY;
325 protection_map[6] = PAGE_COPY;
326 protection_map[7] = PAGE_COPY;
327 protection_map[8] = PAGE_NONE;
328 protection_map[9] = PAGE_READONLY;
329 protection_map[10] = PAGE_SHARED;
330 protection_map[11] = PAGE_SHARED;
331 protection_map[12] = PAGE_READONLY;
332 protection_map[13] = PAGE_READONLY;
333 protection_map[14] = PAGE_SHARED;
334 protection_map[15] = PAGE_SHARED;
335 btfixup(); 312 btfixup();
336 prom_build_devicetree(); 313 prom_build_devicetree();
337 of_fill_in_cpu_data(); 314 of_fill_in_cpu_data();
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index d852962d58d8..c6962715ef08 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -59,8 +59,6 @@ extern struct resource sparc_iomap;
59 59
60extern unsigned long last_valid_pfn; 60extern unsigned long last_valid_pfn;
61 61
62extern unsigned long page_kernel;
63
64static pgd_t *srmmu_swapper_pg_dir; 62static pgd_t *srmmu_swapper_pg_dir;
65 63
66#ifdef CONFIG_SMP 64#ifdef CONFIG_SMP
@@ -2078,13 +2076,6 @@ void __init ld_mmu_srmmu(void)
2078 extern void ld_mmu_iounit(void); 2076 extern void ld_mmu_iounit(void);
2079 extern void ___xchg32_sun4md(void); 2077 extern void ___xchg32_sun4md(void);
2080 2078
2081 BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE));
2082 PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
2083 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
2084 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY));
2085 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
2086 page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
2087
2088 /* Functions */ 2079 /* Functions */
2089#ifndef CONFIG_SMP 2080#ifndef CONFIG_SMP
2090 BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); 2081 BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2);