diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
commit | 7a9787e1eba95a166265e6a260cf30af04ef0a99 (patch) | |
tree | e730a4565e0318140d2fbd2f0415d18a339d7336 /arch/mips/mm | |
parent | 41b9eb264c8407655db57b60b4457fe1b2ec9977 (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into x86/pci-ioapic-boot-irq-quirks
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/Makefile | 3 | ||||
-rw-r--r-- | arch/mips/mm/c-r3k.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/c-r4k.c | 18 | ||||
-rw-r--r-- | arch/mips/mm/c-tx39.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/cache.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/dma-default.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/pgtable.c | 36 | ||||
-rw-r--r-- | arch/mips/mm/tlb-r3k.c | 4 | ||||
-rw-r--r-- | arch/mips/mm/tlbex.c | 6 |
9 files changed, 21 insertions, 52 deletions
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile index 48731020ca0e..44e8dd8106bf 100644 --- a/arch/mips/mm/Makefile +++ b/arch/mips/mm/Makefile | |||
@@ -3,8 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += cache.o dma-default.o extable.o fault.o \ | 5 | obj-y += cache.o dma-default.o extable.o fault.o \ |
6 | init.o pgtable.o tlbex.o tlbex-fault.o \ | 6 | init.o tlbex.o tlbex-fault.o uasm.o page.o |
7 | uasm.o page.o | ||
8 | 7 | ||
9 | obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o | 8 | obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o |
10 | obj-$(CONFIG_64BIT) += pgtable-64.o | 9 | obj-$(CONFIG_64BIT) += pgtable-64.o |
diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c index 27a5b466c85c..5500c20c79ae 100644 --- a/arch/mips/mm/c-r3k.c +++ b/arch/mips/mm/c-r3k.c | |||
@@ -320,6 +320,7 @@ void __cpuinit r3k_cache_init(void) | |||
320 | flush_cache_range = r3k_flush_cache_range; | 320 | flush_cache_range = r3k_flush_cache_range; |
321 | flush_cache_page = r3k_flush_cache_page; | 321 | flush_cache_page = r3k_flush_cache_page; |
322 | flush_icache_range = r3k_flush_icache_range; | 322 | flush_icache_range = r3k_flush_icache_range; |
323 | local_flush_icache_range = r3k_flush_icache_range; | ||
323 | 324 | ||
324 | flush_cache_sigtramp = r3k_flush_cache_sigtramp; | 325 | flush_cache_sigtramp = r3k_flush_cache_sigtramp; |
325 | local_flush_data_cache_page = local_r3k_flush_data_cache_page; | 326 | local_flush_data_cache_page = local_r3k_flush_data_cache_page; |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 71df3390c07b..6e99665ae860 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -543,12 +543,8 @@ struct flush_icache_range_args { | |||
543 | unsigned long end; | 543 | unsigned long end; |
544 | }; | 544 | }; |
545 | 545 | ||
546 | static inline void local_r4k_flush_icache_range(void *args) | 546 | static inline void local_r4k_flush_icache_range(unsigned long start, unsigned long end) |
547 | { | 547 | { |
548 | struct flush_icache_range_args *fir_args = args; | ||
549 | unsigned long start = fir_args->start; | ||
550 | unsigned long end = fir_args->end; | ||
551 | |||
552 | if (!cpu_has_ic_fills_f_dc) { | 548 | if (!cpu_has_ic_fills_f_dc) { |
553 | if (end - start >= dcache_size) { | 549 | if (end - start >= dcache_size) { |
554 | r4k_blast_dcache(); | 550 | r4k_blast_dcache(); |
@@ -564,6 +560,15 @@ static inline void local_r4k_flush_icache_range(void *args) | |||
564 | protected_blast_icache_range(start, end); | 560 | protected_blast_icache_range(start, end); |
565 | } | 561 | } |
566 | 562 | ||
563 | static inline void local_r4k_flush_icache_range_ipi(void *args) | ||
564 | { | ||
565 | struct flush_icache_range_args *fir_args = args; | ||
566 | unsigned long start = fir_args->start; | ||
567 | unsigned long end = fir_args->end; | ||
568 | |||
569 | local_r4k_flush_icache_range(start, end); | ||
570 | } | ||
571 | |||
567 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) | 572 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) |
568 | { | 573 | { |
569 | struct flush_icache_range_args args; | 574 | struct flush_icache_range_args args; |
@@ -571,7 +576,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end) | |||
571 | args.start = start; | 576 | args.start = start; |
572 | args.end = end; | 577 | args.end = end; |
573 | 578 | ||
574 | r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1); | 579 | r4k_on_each_cpu(local_r4k_flush_icache_range_ipi, &args, 1); |
575 | instruction_hazard(); | 580 | instruction_hazard(); |
576 | } | 581 | } |
577 | 582 | ||
@@ -1375,6 +1380,7 @@ void __cpuinit r4k_cache_init(void) | |||
1375 | local_flush_data_cache_page = local_r4k_flush_data_cache_page; | 1380 | local_flush_data_cache_page = local_r4k_flush_data_cache_page; |
1376 | flush_data_cache_page = r4k_flush_data_cache_page; | 1381 | flush_data_cache_page = r4k_flush_data_cache_page; |
1377 | flush_icache_range = r4k_flush_icache_range; | 1382 | flush_icache_range = r4k_flush_icache_range; |
1383 | local_flush_icache_range = local_r4k_flush_icache_range; | ||
1378 | 1384 | ||
1379 | #if defined(CONFIG_DMA_NONCOHERENT) | 1385 | #if defined(CONFIG_DMA_NONCOHERENT) |
1380 | if (coherentio) { | 1386 | if (coherentio) { |
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index a9f7f1f5e9b4..f7c8f9ce39c1 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -362,6 +362,7 @@ void __cpuinit tx39_cache_init(void) | |||
362 | flush_cache_range = (void *) tx39h_flush_icache_all; | 362 | flush_cache_range = (void *) tx39h_flush_icache_all; |
363 | flush_cache_page = (void *) tx39h_flush_icache_all; | 363 | flush_cache_page = (void *) tx39h_flush_icache_all; |
364 | flush_icache_range = (void *) tx39h_flush_icache_all; | 364 | flush_icache_range = (void *) tx39h_flush_icache_all; |
365 | local_flush_icache_range = (void *) tx39h_flush_icache_all; | ||
365 | 366 | ||
366 | flush_cache_sigtramp = (void *) tx39h_flush_icache_all; | 367 | flush_cache_sigtramp = (void *) tx39h_flush_icache_all; |
367 | local_flush_data_cache_page = (void *) tx39h_flush_icache_all; | 368 | local_flush_data_cache_page = (void *) tx39h_flush_icache_all; |
@@ -390,6 +391,7 @@ void __cpuinit tx39_cache_init(void) | |||
390 | flush_cache_range = tx39_flush_cache_range; | 391 | flush_cache_range = tx39_flush_cache_range; |
391 | flush_cache_page = tx39_flush_cache_page; | 392 | flush_cache_page = tx39_flush_cache_page; |
392 | flush_icache_range = tx39_flush_icache_range; | 393 | flush_icache_range = tx39_flush_icache_range; |
394 | local_flush_icache_range = tx39_flush_icache_range; | ||
393 | 395 | ||
394 | flush_cache_sigtramp = tx39_flush_cache_sigtramp; | 396 | flush_cache_sigtramp = tx39_flush_cache_sigtramp; |
395 | local_flush_data_cache_page = local_tx39_flush_data_cache_page; | 397 | local_flush_data_cache_page = local_tx39_flush_data_cache_page; |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 034e8506f6ea..1eb7c71e3d6a 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -29,6 +29,7 @@ void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, | |||
29 | void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, | 29 | void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, |
30 | unsigned long pfn); | 30 | unsigned long pfn); |
31 | void (*flush_icache_range)(unsigned long start, unsigned long end); | 31 | void (*flush_icache_range)(unsigned long start, unsigned long end); |
32 | void (*local_flush_icache_range)(unsigned long start, unsigned long end); | ||
32 | 33 | ||
33 | void (*__flush_cache_vmap)(void); | 34 | void (*__flush_cache_vmap)(void); |
34 | void (*__flush_cache_vunmap)(void); | 35 | void (*__flush_cache_vunmap)(void); |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index ae39dd88b9aa..891312f8e5a6 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -348,7 +348,7 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nele | |||
348 | 348 | ||
349 | EXPORT_SYMBOL(dma_sync_sg_for_device); | 349 | EXPORT_SYMBOL(dma_sync_sg_for_device); |
350 | 350 | ||
351 | int dma_mapping_error(dma_addr_t dma_addr) | 351 | int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
352 | { | 352 | { |
353 | return 0; | 353 | return 0; |
354 | } | 354 | } |
diff --git a/arch/mips/mm/pgtable.c b/arch/mips/mm/pgtable.c deleted file mode 100644 index 7dfa579ab24c..000000000000 --- a/arch/mips/mm/pgtable.c +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/mm.h> | ||
3 | #include <linux/swap.h> | ||
4 | |||
5 | void show_mem(void) | ||
6 | { | ||
7 | #ifndef CONFIG_NEED_MULTIPLE_NODES /* XXX(hch): later.. */ | ||
8 | int pfn, total = 0, reserved = 0; | ||
9 | int shared = 0, cached = 0; | ||
10 | int highmem = 0; | ||
11 | struct page *page; | ||
12 | |||
13 | printk("Mem-info:\n"); | ||
14 | show_free_areas(); | ||
15 | pfn = max_mapnr; | ||
16 | while (pfn-- > 0) { | ||
17 | if (!pfn_valid(pfn)) | ||
18 | continue; | ||
19 | page = pfn_to_page(pfn); | ||
20 | total++; | ||
21 | if (PageHighMem(page)) | ||
22 | highmem++; | ||
23 | if (PageReserved(page)) | ||
24 | reserved++; | ||
25 | else if (PageSwapCache(page)) | ||
26 | cached++; | ||
27 | else if (page_count(page)) | ||
28 | shared += page_count(page) - 1; | ||
29 | } | ||
30 | printk("%d pages of RAM\n", total); | ||
31 | printk("%d pages of HIGHMEM\n", highmem); | ||
32 | printk("%d reserved pages\n", reserved); | ||
33 | printk("%d pages shared\n", shared); | ||
34 | printk("%d pages swap cached\n", cached); | ||
35 | #endif | ||
36 | } | ||
diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index a782549ac80e..f0cf46adb978 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c | |||
@@ -246,10 +246,6 @@ void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
246 | old_pagemask = read_c0_pagemask(); | 246 | old_pagemask = read_c0_pagemask(); |
247 | w = read_c0_wired(); | 247 | w = read_c0_wired(); |
248 | write_c0_wired(w + 1); | 248 | write_c0_wired(w + 1); |
249 | if (read_c0_wired() != w + 1) { | ||
250 | printk("[tlbwired] No WIRED reg?\n"); | ||
251 | return; | ||
252 | } | ||
253 | write_c0_index(w << 8); | 249 | write_c0_index(w << 8); |
254 | write_c0_pagemask(pagemask); | 250 | write_c0_pagemask(pagemask); |
255 | write_c0_entryhi(entryhi); | 251 | write_c0_entryhi(entryhi); |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 76da73a5ab3c..979cf9197282 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -1273,10 +1273,10 @@ void __cpuinit build_tlb_refill_handler(void) | |||
1273 | 1273 | ||
1274 | void __cpuinit flush_tlb_handlers(void) | 1274 | void __cpuinit flush_tlb_handlers(void) |
1275 | { | 1275 | { |
1276 | flush_icache_range((unsigned long)handle_tlbl, | 1276 | local_flush_icache_range((unsigned long)handle_tlbl, |
1277 | (unsigned long)handle_tlbl + sizeof(handle_tlbl)); | 1277 | (unsigned long)handle_tlbl + sizeof(handle_tlbl)); |
1278 | flush_icache_range((unsigned long)handle_tlbs, | 1278 | local_flush_icache_range((unsigned long)handle_tlbs, |
1279 | (unsigned long)handle_tlbs + sizeof(handle_tlbs)); | 1279 | (unsigned long)handle_tlbs + sizeof(handle_tlbs)); |
1280 | flush_icache_range((unsigned long)handle_tlbm, | 1280 | local_flush_icache_range((unsigned long)handle_tlbm, |
1281 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); | 1281 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); |
1282 | } | 1282 | } |