diff options
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/fault_32.c | 9 | ||||
-rw-r--r-- | arch/sparc/mm/fault_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/mm/init_32.c | 7 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 9 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/mm/io-unit.c | 21 | ||||
-rw-r--r-- | arch/sparc/mm/iommu.c | 25 | ||||
-rw-r--r-- | arch/sparc/mm/leon_mm.c | 4 | ||||
-rw-r--r-- | arch/sparc/mm/mm_32.h | 24 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 13 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.h | 4 | ||||
-rw-r--r-- | arch/sparc/mm/tsb.c | 1 |
12 files changed, 74 insertions, 51 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index 59dbd4645725..908e8c17c902 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c | |||
@@ -26,14 +26,14 @@ | |||
26 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
27 | #include <asm/openprom.h> | 27 | #include <asm/openprom.h> |
28 | #include <asm/oplib.h> | 28 | #include <asm/oplib.h> |
29 | #include <asm/setup.h> | ||
29 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
30 | #include <asm/traps.h> | 31 | #include <asm/traps.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | 33 | ||
33 | int show_unhandled_signals = 1; | 34 | #include "mm_32.h" |
34 | 35 | ||
35 | static void unhandled_fault(unsigned long, struct task_struct *, | 36 | int show_unhandled_signals = 1; |
36 | struct pt_regs *) __attribute__ ((noreturn)); | ||
37 | 37 | ||
38 | static void __noreturn unhandled_fault(unsigned long address, | 38 | static void __noreturn unhandled_fault(unsigned long address, |
39 | struct task_struct *tsk, | 39 | struct task_struct *tsk, |
@@ -141,9 +141,6 @@ static void __do_fault_siginfo(int code, int sig, struct pt_regs *regs, | |||
141 | force_sig_info (sig, &info, current); | 141 | force_sig_info (sig, &info, current); |
142 | } | 142 | } |
143 | 143 | ||
144 | extern unsigned long safe_compute_effective_address(struct pt_regs *, | ||
145 | unsigned int); | ||
146 | |||
147 | static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault) | 144 | static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault) |
148 | { | 145 | { |
149 | unsigned int insn; | 146 | unsigned int insn; |
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 4ced3fc66130..587cd0565128 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/lsu.h> | 32 | #include <asm/lsu.h> |
33 | #include <asm/sections.h> | 33 | #include <asm/sections.h> |
34 | #include <asm/mmu_context.h> | 34 | #include <asm/mmu_context.h> |
35 | #include <asm/setup.h> | ||
35 | 36 | ||
36 | int show_unhandled_signals = 1; | 37 | int show_unhandled_signals = 1; |
37 | 38 | ||
@@ -196,9 +197,6 @@ static void do_fault_siginfo(int code, int sig, struct pt_regs *regs, | |||
196 | force_sig_info(sig, &info, current); | 197 | force_sig_info(sig, &info, current); |
197 | } | 198 | } |
198 | 199 | ||
199 | extern int handle_ldf_stq(u32, struct pt_regs *); | ||
200 | extern int handle_ld_nf(u32, struct pt_regs *); | ||
201 | |||
202 | static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn) | 200 | static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn) |
203 | { | 201 | { |
204 | if (!insn) { | 202 | if (!insn) { |
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index db6987082805..eb8287155279 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c | |||
@@ -31,10 +31,13 @@ | |||
31 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
32 | #include <asm/vaddrs.h> | 32 | #include <asm/vaddrs.h> |
33 | #include <asm/pgalloc.h> /* bug in asm-generic/tlb.h: check_pgt_cache */ | 33 | #include <asm/pgalloc.h> /* bug in asm-generic/tlb.h: check_pgt_cache */ |
34 | #include <asm/setup.h> | ||
34 | #include <asm/tlb.h> | 35 | #include <asm/tlb.h> |
35 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
36 | #include <asm/leon.h> | 37 | #include <asm/leon.h> |
37 | 38 | ||
39 | #include "mm_32.h" | ||
40 | |||
38 | unsigned long *sparc_valid_addr_bitmap; | 41 | unsigned long *sparc_valid_addr_bitmap; |
39 | EXPORT_SYMBOL(sparc_valid_addr_bitmap); | 42 | EXPORT_SYMBOL(sparc_valid_addr_bitmap); |
40 | 43 | ||
@@ -63,7 +66,6 @@ void show_mem(unsigned int filter) | |||
63 | } | 66 | } |
64 | 67 | ||
65 | 68 | ||
66 | extern unsigned long cmdline_memory_size; | ||
67 | unsigned long last_valid_pfn; | 69 | unsigned long last_valid_pfn; |
68 | 70 | ||
69 | unsigned long calc_highpages(void) | 71 | unsigned long calc_highpages(void) |
@@ -246,9 +248,6 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) | |||
246 | * init routine based upon the Sun model type on the Sparc. | 248 | * init routine based upon the Sun model type on the Sparc. |
247 | * | 249 | * |
248 | */ | 250 | */ |
249 | extern void srmmu_paging_init(void); | ||
250 | extern void device_scan(void); | ||
251 | |||
252 | void __init paging_init(void) | 251 | void __init paging_init(void) |
253 | { | 252 | { |
254 | srmmu_paging_init(); | 253 | srmmu_paging_init(); |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index ed3c969a5f4c..16b58ff11e65 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <asm/prom.h> | 47 | #include <asm/prom.h> |
48 | #include <asm/mdesc.h> | 48 | #include <asm/mdesc.h> |
49 | #include <asm/cpudata.h> | 49 | #include <asm/cpudata.h> |
50 | #include <asm/setup.h> | ||
50 | #include <asm/irq.h> | 51 | #include <asm/irq.h> |
51 | 52 | ||
52 | #include "init_64.h" | 53 | #include "init_64.h" |
@@ -794,11 +795,11 @@ struct node_mem_mask { | |||
794 | static struct node_mem_mask node_masks[MAX_NUMNODES]; | 795 | static struct node_mem_mask node_masks[MAX_NUMNODES]; |
795 | static int num_node_masks; | 796 | static int num_node_masks; |
796 | 797 | ||
798 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
799 | |||
797 | int numa_cpu_lookup_table[NR_CPUS]; | 800 | int numa_cpu_lookup_table[NR_CPUS]; |
798 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; | 801 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; |
799 | 802 | ||
800 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
801 | |||
802 | struct mdesc_mblock { | 803 | struct mdesc_mblock { |
803 | u64 base; | 804 | u64 base; |
804 | u64 size; | 805 | u64 size; |
@@ -887,17 +888,21 @@ static void __init allocate_node_data(int nid) | |||
887 | 888 | ||
888 | static void init_node_masks_nonnuma(void) | 889 | static void init_node_masks_nonnuma(void) |
889 | { | 890 | { |
891 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
890 | int i; | 892 | int i; |
893 | #endif | ||
891 | 894 | ||
892 | numadbg("Initializing tables for non-numa.\n"); | 895 | numadbg("Initializing tables for non-numa.\n"); |
893 | 896 | ||
894 | node_masks[0].mask = node_masks[0].val = 0; | 897 | node_masks[0].mask = node_masks[0].val = 0; |
895 | num_node_masks = 1; | 898 | num_node_masks = 1; |
896 | 899 | ||
900 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
897 | for (i = 0; i < NR_CPUS; i++) | 901 | for (i = 0; i < NR_CPUS; i++) |
898 | numa_cpu_lookup_table[i] = 0; | 902 | numa_cpu_lookup_table[i] = 0; |
899 | 903 | ||
900 | cpumask_setall(&numa_cpumask_lookup_table[0]); | 904 | cpumask_setall(&numa_cpumask_lookup_table[0]); |
905 | #endif | ||
901 | } | 906 | } |
902 | 907 | ||
903 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 908 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
diff --git a/arch/sparc/mm/init_64.h b/arch/sparc/mm/init_64.h index 5d3782deb403..0668b364f44d 100644 --- a/arch/sparc/mm/init_64.h +++ b/arch/sparc/mm/init_64.h | |||
@@ -21,7 +21,7 @@ extern unsigned int sparc64_highest_unlocked_tlb_ent; | |||
21 | extern unsigned long sparc64_kern_pri_context; | 21 | extern unsigned long sparc64_kern_pri_context; |
22 | extern unsigned long sparc64_kern_pri_nuc_bits; | 22 | extern unsigned long sparc64_kern_pri_nuc_bits; |
23 | extern unsigned long sparc64_kern_sec_context; | 23 | extern unsigned long sparc64_kern_sec_context; |
24 | extern void mmu_info(struct seq_file *m); | 24 | void mmu_info(struct seq_file *m); |
25 | 25 | ||
26 | struct linux_prom_translation { | 26 | struct linux_prom_translation { |
27 | unsigned long virt; | 27 | unsigned long virt; |
@@ -36,7 +36,7 @@ extern unsigned int prom_trans_ents; | |||
36 | /* Exported for SMP bootup purposes. */ | 36 | /* Exported for SMP bootup purposes. */ |
37 | extern unsigned long kern_locked_tte_data; | 37 | extern unsigned long kern_locked_tte_data; |
38 | 38 | ||
39 | extern void prom_world(int enter); | 39 | void prom_world(int enter); |
40 | 40 | ||
41 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | 41 | #ifdef CONFIG_SPARSEMEM_VMEMMAP |
42 | #define VMEMMAP_CHUNK_SHIFT 22 | 42 | #define VMEMMAP_CHUNK_SHIFT 22 |
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index eb99862e9654..f311bf219016 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <asm/dma.h> | 25 | #include <asm/dma.h> |
26 | #include <asm/oplib.h> | 26 | #include <asm/oplib.h> |
27 | 27 | ||
28 | #include "mm_32.h" | ||
29 | |||
28 | /* #define IOUNIT_DEBUG */ | 30 | /* #define IOUNIT_DEBUG */ |
29 | #ifdef IOUNIT_DEBUG | 31 | #ifdef IOUNIT_DEBUG |
30 | #define IOD(x) printk(x) | 32 | #define IOD(x) printk(x) |
@@ -38,7 +40,8 @@ | |||
38 | static void __init iounit_iommu_init(struct platform_device *op) | 40 | static void __init iounit_iommu_init(struct platform_device *op) |
39 | { | 41 | { |
40 | struct iounit_struct *iounit; | 42 | struct iounit_struct *iounit; |
41 | iopte_t *xpt, *xptend; | 43 | iopte_t __iomem *xpt; |
44 | iopte_t __iomem *xptend; | ||
42 | 45 | ||
43 | iounit = kzalloc(sizeof(struct iounit_struct), GFP_ATOMIC); | 46 | iounit = kzalloc(sizeof(struct iounit_struct), GFP_ATOMIC); |
44 | if (!iounit) { | 47 | if (!iounit) { |
@@ -62,10 +65,10 @@ static void __init iounit_iommu_init(struct platform_device *op) | |||
62 | op->dev.archdata.iommu = iounit; | 65 | op->dev.archdata.iommu = iounit; |
63 | iounit->page_table = xpt; | 66 | iounit->page_table = xpt; |
64 | spin_lock_init(&iounit->lock); | 67 | spin_lock_init(&iounit->lock); |
65 | 68 | ||
66 | for (xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t); | 69 | xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t); |
67 | xpt < xptend;) | 70 | for (; xpt < xptend; xpt++) |
68 | iopte_val(*xpt++) = 0; | 71 | sbus_writel(0, xpt); |
69 | } | 72 | } |
70 | 73 | ||
71 | static int __init iounit_init(void) | 74 | static int __init iounit_init(void) |
@@ -130,7 +133,7 @@ nexti: scan = find_next_zero_bit(iounit->bmap, limit, scan); | |||
130 | vaddr = IOUNIT_DMA_BASE + (scan << PAGE_SHIFT) + (vaddr & ~PAGE_MASK); | 133 | vaddr = IOUNIT_DMA_BASE + (scan << PAGE_SHIFT) + (vaddr & ~PAGE_MASK); |
131 | for (k = 0; k < npages; k++, iopte = __iopte(iopte_val(iopte) + 0x100), scan++) { | 134 | for (k = 0; k < npages; k++, iopte = __iopte(iopte_val(iopte) + 0x100), scan++) { |
132 | set_bit(scan, iounit->bmap); | 135 | set_bit(scan, iounit->bmap); |
133 | iounit->page_table[scan] = iopte; | 136 | sbus_writel(iopte, &iounit->page_table[scan]); |
134 | } | 137 | } |
135 | IOD(("%08lx\n", vaddr)); | 138 | IOD(("%08lx\n", vaddr)); |
136 | return vaddr; | 139 | return vaddr; |
@@ -202,7 +205,7 @@ static int iounit_map_dma_area(struct device *dev, dma_addr_t *pba, unsigned lon | |||
202 | struct iounit_struct *iounit = dev->archdata.iommu; | 205 | struct iounit_struct *iounit = dev->archdata.iommu; |
203 | unsigned long page, end; | 206 | unsigned long page, end; |
204 | pgprot_t dvma_prot; | 207 | pgprot_t dvma_prot; |
205 | iopte_t *iopte; | 208 | iopte_t __iomem *iopte; |
206 | 209 | ||
207 | *pba = addr; | 210 | *pba = addr; |
208 | 211 | ||
@@ -224,8 +227,8 @@ static int iounit_map_dma_area(struct device *dev, dma_addr_t *pba, unsigned lon | |||
224 | 227 | ||
225 | i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT); | 228 | i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT); |
226 | 229 | ||
227 | iopte = (iopte_t *)(iounit->page_table + i); | 230 | iopte = iounit->page_table + i; |
228 | *iopte = MKIOPTE(__pa(page)); | 231 | sbus_writel(MKIOPTE(__pa(page)), iopte); |
229 | } | 232 | } |
230 | addr += PAGE_SIZE; | 233 | addr += PAGE_SIZE; |
231 | va += PAGE_SIZE; | 234 | va += PAGE_SIZE; |
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 28f96f27c768..491511d37e37 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/iommu.h> | 27 | #include <asm/iommu.h> |
28 | #include <asm/dma.h> | 28 | #include <asm/dma.h> |
29 | 29 | ||
30 | #include "mm_32.h" | ||
31 | |||
30 | /* | 32 | /* |
31 | * This can be sized dynamically, but we will do this | 33 | * This can be sized dynamically, but we will do this |
32 | * only when we have a guidance about actual I/O pressures. | 34 | * only when we have a guidance about actual I/O pressures. |
@@ -37,9 +39,6 @@ | |||
37 | #define IOMMU_NPTES (IOMMU_WINSIZE/PAGE_SIZE) /* 64K PTEs, 256KB */ | 39 | #define IOMMU_NPTES (IOMMU_WINSIZE/PAGE_SIZE) /* 64K PTEs, 256KB */ |
38 | #define IOMMU_ORDER 6 /* 4096 * (1<<6) */ | 40 | #define IOMMU_ORDER 6 /* 4096 * (1<<6) */ |
39 | 41 | ||
40 | /* srmmu.c */ | ||
41 | extern int viking_mxcc_present; | ||
42 | extern int flush_page_for_dma_global; | ||
43 | static int viking_flush; | 42 | static int viking_flush; |
44 | /* viking.S */ | 43 | /* viking.S */ |
45 | extern void viking_flush_page(unsigned long page); | 44 | extern void viking_flush_page(unsigned long page); |
@@ -59,6 +58,8 @@ static void __init sbus_iommu_init(struct platform_device *op) | |||
59 | struct iommu_struct *iommu; | 58 | struct iommu_struct *iommu; |
60 | unsigned int impl, vers; | 59 | unsigned int impl, vers; |
61 | unsigned long *bitmap; | 60 | unsigned long *bitmap; |
61 | unsigned long control; | ||
62 | unsigned long base; | ||
62 | unsigned long tmp; | 63 | unsigned long tmp; |
63 | 64 | ||
64 | iommu = kmalloc(sizeof(struct iommu_struct), GFP_KERNEL); | 65 | iommu = kmalloc(sizeof(struct iommu_struct), GFP_KERNEL); |
@@ -73,12 +74,14 @@ static void __init sbus_iommu_init(struct platform_device *op) | |||
73 | prom_printf("Cannot map IOMMU registers\n"); | 74 | prom_printf("Cannot map IOMMU registers\n"); |
74 | prom_halt(); | 75 | prom_halt(); |
75 | } | 76 | } |
76 | impl = (iommu->regs->control & IOMMU_CTRL_IMPL) >> 28; | 77 | |
77 | vers = (iommu->regs->control & IOMMU_CTRL_VERS) >> 24; | 78 | control = sbus_readl(&iommu->regs->control); |
78 | tmp = iommu->regs->control; | 79 | impl = (control & IOMMU_CTRL_IMPL) >> 28; |
79 | tmp &= ~(IOMMU_CTRL_RNGE); | 80 | vers = (control & IOMMU_CTRL_VERS) >> 24; |
80 | tmp |= (IOMMU_RNGE_256MB | IOMMU_CTRL_ENAB); | 81 | control &= ~(IOMMU_CTRL_RNGE); |
81 | iommu->regs->control = tmp; | 82 | control |= (IOMMU_RNGE_256MB | IOMMU_CTRL_ENAB); |
83 | sbus_writel(control, &iommu->regs->control); | ||
84 | |||
82 | iommu_invalidate(iommu->regs); | 85 | iommu_invalidate(iommu->regs); |
83 | iommu->start = IOMMU_START; | 86 | iommu->start = IOMMU_START; |
84 | iommu->end = 0xffffffff; | 87 | iommu->end = 0xffffffff; |
@@ -100,7 +103,9 @@ static void __init sbus_iommu_init(struct platform_device *op) | |||
100 | memset(iommu->page_table, 0, IOMMU_NPTES*sizeof(iopte_t)); | 103 | memset(iommu->page_table, 0, IOMMU_NPTES*sizeof(iopte_t)); |
101 | flush_cache_all(); | 104 | flush_cache_all(); |
102 | flush_tlb_all(); | 105 | flush_tlb_all(); |
103 | iommu->regs->base = __pa((unsigned long) iommu->page_table) >> 4; | 106 | |
107 | base = __pa((unsigned long)iommu->page_table) >> 4; | ||
108 | sbus_writel(base, &iommu->regs->base); | ||
104 | iommu_invalidate(iommu->regs); | 109 | iommu_invalidate(iommu->regs); |
105 | 110 | ||
106 | bitmap = kmalloc(IOMMU_NPTES>>3, GFP_KERNEL); | 111 | bitmap = kmalloc(IOMMU_NPTES>>3, GFP_KERNEL); |
diff --git a/arch/sparc/mm/leon_mm.c b/arch/sparc/mm/leon_mm.c index 5bed085a2c17..3b17b6f7895a 100644 --- a/arch/sparc/mm/leon_mm.c +++ b/arch/sparc/mm/leon_mm.c | |||
@@ -15,10 +15,10 @@ | |||
15 | #include <asm/leon.h> | 15 | #include <asm/leon.h> |
16 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
17 | 17 | ||
18 | #include "srmmu.h" | 18 | #include "mm_32.h" |
19 | 19 | ||
20 | int leon_flush_during_switch = 1; | 20 | int leon_flush_during_switch = 1; |
21 | int srmmu_swprobe_trace; | 21 | static int srmmu_swprobe_trace; |
22 | 22 | ||
23 | static inline unsigned long leon_get_ctable_ptr(void) | 23 | static inline unsigned long leon_get_ctable_ptr(void) |
24 | { | 24 | { |
diff --git a/arch/sparc/mm/mm_32.h b/arch/sparc/mm/mm_32.h new file mode 100644 index 000000000000..a6c27ca9a721 --- /dev/null +++ b/arch/sparc/mm/mm_32.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* fault_32.c - visible as they are called from assembler */ | ||
2 | asmlinkage int lookup_fault(unsigned long pc, unsigned long ret_pc, | ||
3 | unsigned long address); | ||
4 | asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, | ||
5 | unsigned long address); | ||
6 | |||
7 | void window_overflow_fault(void); | ||
8 | void window_underflow_fault(unsigned long sp); | ||
9 | void window_ret_fault(struct pt_regs *regs); | ||
10 | |||
11 | /* srmmu.c */ | ||
12 | extern char *srmmu_name; | ||
13 | extern int viking_mxcc_present; | ||
14 | extern int flush_page_for_dma_global; | ||
15 | |||
16 | extern void (*poke_srmmu)(void); | ||
17 | |||
18 | void __init srmmu_paging_init(void); | ||
19 | |||
20 | /* iommu.c */ | ||
21 | void ld_mmu_iommu(void); | ||
22 | |||
23 | /* io-unit.c */ | ||
24 | void ld_mmu_iounit(void); | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index cfbe53c17b0d..be65f035d18a 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <asm/mxcc.h> | 49 | #include <asm/mxcc.h> |
50 | #include <asm/ross.h> | 50 | #include <asm/ross.h> |
51 | 51 | ||
52 | #include "srmmu.h" | 52 | #include "mm_32.h" |
53 | 53 | ||
54 | enum mbus_module srmmu_modtype; | 54 | enum mbus_module srmmu_modtype; |
55 | static unsigned int hwbug_bitmask; | 55 | static unsigned int hwbug_bitmask; |
@@ -100,7 +100,6 @@ static unsigned long srmmu_nocache_end; | |||
100 | #define SRMMU_NOCACHE_ALIGN_MAX (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS) | 100 | #define SRMMU_NOCACHE_ALIGN_MAX (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS) |
101 | 101 | ||
102 | void *srmmu_nocache_pool; | 102 | void *srmmu_nocache_pool; |
103 | void *srmmu_nocache_bitmap; | ||
104 | static struct bit_map srmmu_nocache_map; | 103 | static struct bit_map srmmu_nocache_map; |
105 | 104 | ||
106 | static inline int srmmu_pmd_none(pmd_t pmd) | 105 | static inline int srmmu_pmd_none(pmd_t pmd) |
@@ -173,7 +172,7 @@ static void *__srmmu_get_nocache(int size, int align) | |||
173 | printk(KERN_ERR "srmmu: out of nocache %d: %d/%d\n", | 172 | printk(KERN_ERR "srmmu: out of nocache %d: %d/%d\n", |
174 | size, (int) srmmu_nocache_size, | 173 | size, (int) srmmu_nocache_size, |
175 | srmmu_nocache_map.used << SRMMU_NOCACHE_BITMAP_SHIFT); | 174 | srmmu_nocache_map.used << SRMMU_NOCACHE_BITMAP_SHIFT); |
176 | return 0; | 175 | return NULL; |
177 | } | 176 | } |
178 | 177 | ||
179 | addr = SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT); | 178 | addr = SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT); |
@@ -269,6 +268,7 @@ static void __init srmmu_nocache_calcsize(void) | |||
269 | 268 | ||
270 | static void __init srmmu_nocache_init(void) | 269 | static void __init srmmu_nocache_init(void) |
271 | { | 270 | { |
271 | void *srmmu_nocache_bitmap; | ||
272 | unsigned int bitmap_bits; | 272 | unsigned int bitmap_bits; |
273 | pgd_t *pgd; | 273 | pgd_t *pgd; |
274 | pmd_t *pmd; | 274 | pmd_t *pmd; |
@@ -728,7 +728,7 @@ static inline unsigned long srmmu_probe(unsigned long vaddr) | |||
728 | "=r" (retval) : | 728 | "=r" (retval) : |
729 | "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE)); | 729 | "r" (vaddr | 0x400), "i" (ASI_M_FLUSH_PROBE)); |
730 | } else { | 730 | } else { |
731 | retval = leon_swprobe(vaddr, 0); | 731 | retval = leon_swprobe(vaddr, NULL); |
732 | } | 732 | } |
733 | return retval; | 733 | return retval; |
734 | } | 734 | } |
@@ -865,8 +865,6 @@ static void __init map_kernel(void) | |||
865 | 865 | ||
866 | void (*poke_srmmu)(void) = NULL; | 866 | void (*poke_srmmu)(void) = NULL; |
867 | 867 | ||
868 | extern unsigned long bootmem_init(unsigned long *pages_avail); | ||
869 | |||
870 | void __init srmmu_paging_init(void) | 868 | void __init srmmu_paging_init(void) |
871 | { | 869 | { |
872 | int i; | 870 | int i; |
@@ -1771,9 +1769,6 @@ static struct sparc32_cachetlb_ops smp_cachetlb_ops = { | |||
1771 | /* Load up routines and constants for sun4m and sun4d mmu */ | 1769 | /* Load up routines and constants for sun4m and sun4d mmu */ |
1772 | void __init load_mmu(void) | 1770 | void __init load_mmu(void) |
1773 | { | 1771 | { |
1774 | extern void ld_mmu_iommu(void); | ||
1775 | extern void ld_mmu_iounit(void); | ||
1776 | |||
1777 | /* Functions */ | 1772 | /* Functions */ |
1778 | get_srmmu_type(); | 1773 | get_srmmu_type(); |
1779 | 1774 | ||
diff --git a/arch/sparc/mm/srmmu.h b/arch/sparc/mm/srmmu.h deleted file mode 100644 index 5703274ccf89..000000000000 --- a/arch/sparc/mm/srmmu.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* srmmu.c */ | ||
2 | extern char *srmmu_name; | ||
3 | |||
4 | extern void (*poke_srmmu)(void); | ||
diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c index fe19b81acc09..a06576683c38 100644 --- a/arch/sparc/mm/tsb.c +++ b/arch/sparc/mm/tsb.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <asm/page.h> | 9 | #include <asm/page.h> |
10 | #include <asm/pgtable.h> | 10 | #include <asm/pgtable.h> |
11 | #include <asm/mmu_context.h> | 11 | #include <asm/mmu_context.h> |
12 | #include <asm/setup.h> | ||
12 | #include <asm/tsb.h> | 13 | #include <asm/tsb.h> |
13 | #include <asm/tlb.h> | 14 | #include <asm/tlb.h> |
14 | #include <asm/oplib.h> | 15 | #include <asm/oplib.h> |