diff options
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 19 | ||||
-rw-r--r-- | arch/mips/mm/dma-default.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/highmem.c | 9 | ||||
-rw-r--r-- | arch/mips/mm/init.c | 3 | ||||
-rw-r--r-- | arch/mips/mm/ioremap.c | 9 | ||||
-rw-r--r-- | arch/mips/mm/tlbex.c | 8 |
6 files changed, 15 insertions, 35 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index c43f4b26a690..58d9075e86fe 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -780,7 +780,7 @@ static void __cpuinit probe_pcache(void) | |||
780 | c->dcache.ways = 2; | 780 | c->dcache.ways = 2; |
781 | c->dcache.waybit = 0; | 781 | c->dcache.waybit = 0; |
782 | 782 | ||
783 | c->options |= MIPS_CPU_CACHE_CDEX_P; | 783 | c->options |= MIPS_CPU_CACHE_CDEX_P | MIPS_CPU_PREFETCH; |
784 | break; | 784 | break; |
785 | 785 | ||
786 | case CPU_TX49XX: | 786 | case CPU_TX49XX: |
@@ -1026,13 +1026,7 @@ static void __cpuinit probe_pcache(void) | |||
1026 | c->icache.flags |= MIPS_CACHE_VTAG; | 1026 | c->icache.flags |= MIPS_CACHE_VTAG; |
1027 | break; | 1027 | break; |
1028 | 1028 | ||
1029 | case CPU_AU1000: | 1029 | case CPU_ALCHEMY: |
1030 | case CPU_AU1500: | ||
1031 | case CPU_AU1100: | ||
1032 | case CPU_AU1550: | ||
1033 | case CPU_AU1200: | ||
1034 | case CPU_AU1210: | ||
1035 | case CPU_AU1250: | ||
1036 | c->icache.flags |= MIPS_CACHE_IC_F_DC; | 1030 | c->icache.flags |= MIPS_CACHE_IC_F_DC; |
1037 | break; | 1031 | break; |
1038 | } | 1032 | } |
@@ -1244,7 +1238,7 @@ void au1x00_fixup_config_od(void) | |||
1244 | /* | 1238 | /* |
1245 | * Au1100 errata actually keeps silence about this bit, so we set it | 1239 | * Au1100 errata actually keeps silence about this bit, so we set it |
1246 | * just in case for those revisions that require it to be set according | 1240 | * just in case for those revisions that require it to be set according |
1247 | * to arch/mips/au1000/common/cputable.c | 1241 | * to the (now gone) cpu table. |
1248 | */ | 1242 | */ |
1249 | case 0x02030200: /* Au1100 AB */ | 1243 | case 0x02030200: /* Au1100 AB */ |
1250 | case 0x02030201: /* Au1100 BA */ | 1244 | case 0x02030201: /* Au1100 BA */ |
@@ -1314,11 +1308,10 @@ static void __cpuinit coherency_setup(void) | |||
1314 | break; | 1308 | break; |
1315 | /* | 1309 | /* |
1316 | * We need to catch the early Alchemy SOCs with | 1310 | * We need to catch the early Alchemy SOCs with |
1317 | * the write-only co_config.od bit and set it back to one... | 1311 | * the write-only co_config.od bit and set it back to one on: |
1312 | * Au1000 rev DA, HA, HB; Au1100 AB, BA, BC, Au1500 AB | ||
1318 | */ | 1313 | */ |
1319 | case CPU_AU1000: /* rev. DA, HA, HB */ | 1314 | case CPU_ALCHEMY: |
1320 | case CPU_AU1100: /* rev. AB, BA, BC ?? */ | ||
1321 | case CPU_AU1500: /* rev. AB */ | ||
1322 | au1x00_fixup_config_od(); | 1315 | au1x00_fixup_config_od(); |
1323 | break; | 1316 | break; |
1324 | 1317 | ||
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 546e6977d4ff..bed56f1ac837 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -225,7 +225,7 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | |||
225 | if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) { | 225 | if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) { |
226 | unsigned long addr; | 226 | unsigned long addr; |
227 | 227 | ||
228 | addr = plat_dma_addr_to_phys(dma_address); | 228 | addr = dma_addr_to_virt(dma_address); |
229 | dma_cache_wback_inv(addr, size); | 229 | dma_cache_wback_inv(addr, size); |
230 | } | 230 | } |
231 | 231 | ||
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index 8f2cd8eda741..060d28dca8a8 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c | |||
@@ -17,8 +17,7 @@ void *__kmap(struct page *page) | |||
17 | 17 | ||
18 | void __kunmap(struct page *page) | 18 | void __kunmap(struct page *page) |
19 | { | 19 | { |
20 | if (in_interrupt()) | 20 | BUG_ON(in_interrupt()); |
21 | BUG(); | ||
22 | if (!PageHighMem(page)) | 21 | if (!PageHighMem(page)) |
23 | return; | 22 | return; |
24 | kunmap_high(page); | 23 | kunmap_high(page); |
@@ -46,8 +45,7 @@ void *__kmap_atomic(struct page *page, enum km_type type) | |||
46 | idx = type + KM_TYPE_NR*smp_processor_id(); | 45 | idx = type + KM_TYPE_NR*smp_processor_id(); |
47 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 46 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
48 | #ifdef CONFIG_DEBUG_HIGHMEM | 47 | #ifdef CONFIG_DEBUG_HIGHMEM |
49 | if (!pte_none(*(kmap_pte-idx))) | 48 | BUG_ON(!pte_none(*(kmap_pte - idx))); |
50 | BUG(); | ||
51 | #endif | 49 | #endif |
52 | set_pte(kmap_pte-idx, mk_pte(page, kmap_prot)); | 50 | set_pte(kmap_pte-idx, mk_pte(page, kmap_prot)); |
53 | local_flush_tlb_one((unsigned long)vaddr); | 51 | local_flush_tlb_one((unsigned long)vaddr); |
@@ -66,8 +64,7 @@ void __kunmap_atomic(void *kvaddr, enum km_type type) | |||
66 | return; | 64 | return; |
67 | } | 65 | } |
68 | 66 | ||
69 | if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx)) | 67 | BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx)); |
70 | BUG(); | ||
71 | 68 | ||
72 | /* | 69 | /* |
73 | * force other mappings to Oops if they'll try to access | 70 | * force other mappings to Oops if they'll try to access |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 137c14bafd6b..d9348946a19e 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -307,8 +307,7 @@ void __init fixrange_init(unsigned long start, unsigned long end, | |||
307 | if (pmd_none(*pmd)) { | 307 | if (pmd_none(*pmd)) { |
308 | pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 308 | pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); |
309 | set_pmd(pmd, __pmd((unsigned long)pte)); | 309 | set_pmd(pmd, __pmd((unsigned long)pte)); |
310 | if (pte != pte_offset_kernel(pmd, 0)) | 310 | BUG_ON(pte != pte_offset_kernel(pmd, 0)); |
311 | BUG(); | ||
312 | } | 311 | } |
313 | vaddr += PMD_SIZE; | 312 | vaddr += PMD_SIZE; |
314 | } | 313 | } |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index 59945b9ee23c..0c43248347bd 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -27,8 +27,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, | |||
27 | end = address + size; | 27 | end = address + size; |
28 | if (end > PMD_SIZE) | 28 | if (end > PMD_SIZE) |
29 | end = PMD_SIZE; | 29 | end = PMD_SIZE; |
30 | if (address >= end) | 30 | BUG_ON(address >= end); |
31 | BUG(); | ||
32 | pfn = phys_addr >> PAGE_SHIFT; | 31 | pfn = phys_addr >> PAGE_SHIFT; |
33 | do { | 32 | do { |
34 | if (!pte_none(*pte)) { | 33 | if (!pte_none(*pte)) { |
@@ -52,8 +51,7 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, | |||
52 | if (end > PGDIR_SIZE) | 51 | if (end > PGDIR_SIZE) |
53 | end = PGDIR_SIZE; | 52 | end = PGDIR_SIZE; |
54 | phys_addr -= address; | 53 | phys_addr -= address; |
55 | if (address >= end) | 54 | BUG_ON(address >= end); |
56 | BUG(); | ||
57 | do { | 55 | do { |
58 | pte_t * pte = pte_alloc_kernel(pmd, address); | 56 | pte_t * pte = pte_alloc_kernel(pmd, address); |
59 | if (!pte) | 57 | if (!pte) |
@@ -75,8 +73,7 @@ static int remap_area_pages(unsigned long address, phys_t phys_addr, | |||
75 | phys_addr -= address; | 73 | phys_addr -= address; |
76 | dir = pgd_offset(&init_mm, address); | 74 | dir = pgd_offset(&init_mm, address); |
77 | flush_cache_all(); | 75 | flush_cache_all(); |
78 | if (address >= end) | 76 | BUG_ON(address >= end); |
79 | BUG(); | ||
80 | do { | 77 | do { |
81 | pud_t *pud; | 78 | pud_t *pud; |
82 | pmd_t *pmd; | 79 | pmd_t *pmd; |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index f335cf6cdd78..0615b62efd6d 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -292,13 +292,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
292 | case CPU_R4300: | 292 | case CPU_R4300: |
293 | case CPU_5KC: | 293 | case CPU_5KC: |
294 | case CPU_TX49XX: | 294 | case CPU_TX49XX: |
295 | case CPU_AU1000: | ||
296 | case CPU_AU1100: | ||
297 | case CPU_AU1500: | ||
298 | case CPU_AU1550: | ||
299 | case CPU_AU1200: | ||
300 | case CPU_AU1210: | ||
301 | case CPU_AU1250: | ||
302 | case CPU_PR4450: | 295 | case CPU_PR4450: |
303 | uasm_i_nop(p); | 296 | uasm_i_nop(p); |
304 | tlbw(p); | 297 | tlbw(p); |
@@ -321,6 +314,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
321 | case CPU_R5500: | 314 | case CPU_R5500: |
322 | if (m4kc_tlbp_war()) | 315 | if (m4kc_tlbp_war()) |
323 | uasm_i_nop(p); | 316 | uasm_i_nop(p); |
317 | case CPU_ALCHEMY: | ||
324 | tlbw(p); | 318 | tlbw(p); |
325 | break; | 319 | break; |
326 | 320 | ||