]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/mm/c-r3k.c
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / arch / mips / mm / c-r3k.c
index e1f35ef81145445c5530ccbdca83b4715a040c2d..c55312f6fd3a9afd4250f0d63c754ff79708f847 100644 (file)
@@ -121,7 +121,7 @@ static void r3k_flush_icache_range(unsigned long start, unsigned long end)
        write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC);
 
        for (i = 0; i < size; i += 0x080) {
-               asm (   "sb\t$0, 0x000(%0)\n\t"
+               asm   "sb\t$0, 0x000(%0)\n\t"
                        "sb\t$0, 0x004(%0)\n\t"
                        "sb\t$0, 0x008(%0)\n\t"
                        "sb\t$0, 0x00c(%0)\n\t"
@@ -178,7 +178,7 @@ static void r3k_flush_dcache_range(unsigned long start, unsigned long end)
        write_c0_status((ST0_ISC|flags)&~ST0_IEC);
 
        for (i = 0; i < size; i += 0x080) {
-               asm (   "sb\t$0, 0x000(%0)\n\t"
+               asm   "sb\t$0, 0x000(%0)\n\t"
                        "sb\t$0, 0x004(%0)\n\t"
                        "sb\t$0, 0x008(%0)\n\t"
                        "sb\t$0, 0x00c(%0)\n\t"
@@ -217,8 +217,8 @@ static void r3k_flush_dcache_range(unsigned long start, unsigned long end)
        write_c0_status(flags);
 }
 
-static inline unsigned long get_phys_page (unsigned long addr,
-                                          struct mm_struct *mm)
+static inline unsigned long get_phys_page(unsigned long addr,
+                                         struct mm_struct *mm)
 {
        pgd_t *pgd;
        pud_t *pud;
@@ -260,7 +260,7 @@ static void r3k_flush_cache_page(struct vm_area_struct *vma, unsigned long page,
 {
 }
 
-static void local_r3k_flush_data_cache_page(unsigned long addr)
+static void local_r3k_flush_data_cache_page(void *addr)
 {
 }
 
@@ -268,26 +268,6 @@ static void r3k_flush_data_cache_page(unsigned long addr)
 {
 }
 
-static void r3k_flush_icache_page(struct vm_area_struct *vma, struct page *page)
-{
-       struct mm_struct *mm = vma->vm_mm;
-       unsigned long physpage;
-
-       if (cpu_context(smp_processor_id(), mm) == 0)
-               return;
-
-       if (!(vma->vm_flags & VM_EXEC))
-               return;
-
-#ifdef DEBUG_CACHE
-       printk("cpage[%d,%08lx]", cpu_context(smp_processor_id(), mm), page);
-#endif
-
-       physpage = (unsigned long) page_address(page);
-       if (physpage)
-               r3k_flush_icache_range(physpage, physpage + PAGE_SIZE);
-}
-
 static void r3k_flush_cache_sigtramp(unsigned long addr)
 {
        unsigned long flags;
@@ -301,13 +281,13 @@ static void r3k_flush_cache_sigtramp(unsigned long addr)
        write_c0_status(flags&~ST0_IEC);
 
        /* Fill the TLB to avoid an exception with caches isolated. */
-       asm (   "lw\t$0, 0x000(%0)\n\t"
+       asm   "lw\t$0, 0x000(%0)\n\t"
                "lw\t$0, 0x004(%0)\n\t"
                : : "r" (addr) );
 
        write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC);
 
-       asm (   "sb\t$0, 0x000(%0)\n\t"
+       asm   "sb\t$0, 0x000(%0)\n\t"
                "sb\t$0, 0x004(%0)\n\t"
                : : "r" (addr) );
 
@@ -335,7 +315,6 @@ void __init r3k_cache_init(void)
        flush_cache_mm = r3k_flush_cache_mm;
        flush_cache_range = r3k_flush_cache_range;
        flush_cache_page = r3k_flush_cache_page;
-       __flush_icache_page = r3k_flush_icache_page;
        flush_icache_range = r3k_flush_icache_range;
 
        flush_cache_sigtramp = r3k_flush_cache_sigtramp;