From: James S. <jsi...@us...> - 2002-03-18 22:40:34
|
Update of /cvsroot/linux-mips/linux/arch/mips/mm In directory usw-pr-cvs1:/tmp/cvs-serv30600/mips/mm Modified Files: c-r4k.c Log Message: Don't disable interrupts during R4k cache flushes. This has been show to result in missed timer interrupts and time to the point that xntpd looses synchonization. The question why all these flushes ever disabled interrupts stays unanswered ... Index: c-r4k.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/c-r4k.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- c-r4k.c 15 Jan 2002 00:34:07 -0000 1.6 +++ c-r4k.c 18 Mar 2002 22:40:31 -0000 1.7 @@ -75,83 +75,47 @@ static inline void r4k_flush_cache_all_s16d16i16(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache16(); blast_icache16(); blast_scache16(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_s32d16i16(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache16(); blast_icache16(); blast_scache32(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_s64d16i16(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache16(); blast_icache16(); blast_scache64(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_s128d16i16(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache16(); blast_icache16(); blast_scache128(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_s32d32i32(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache32(); blast_icache32(); blast_scache32(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_s64d32i32(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache32(); blast_icache32(); blast_scache64(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_s128d32i32(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache32(); blast_icache32(); blast_scache128(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_d16i16(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache16(); blast_icache16(); - __restore_flags(flags); } static inline void r4k_flush_cache_all_d32i32(void) { - unsigned long flags; - - __save_and_cli(flags); blast_dcache32(); blast_icache32(); - __restore_flags(flags); } static void @@ -160,7 +124,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -178,7 +141,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while (start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -188,7 +150,6 @@ blast_scache16_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -199,7 +160,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -217,7 +177,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -227,7 +186,6 @@ blast_scache32_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -237,7 +195,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -255,7 +212,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -265,7 +221,6 @@ blast_scache64_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -275,7 +230,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -293,7 +247,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -303,7 +256,6 @@ blast_scache128_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -313,7 +265,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -331,7 +282,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -341,7 +291,6 @@ blast_scache32_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -351,7 +300,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -369,7 +317,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -379,7 +326,6 @@ blast_scache64_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -389,7 +335,6 @@ unsigned long end) { struct vm_area_struct *vma; - unsigned long flags; if (mm->context == 0) return; @@ -407,7 +352,6 @@ pmd_t *pmd; pte_t *pte; - __save_and_cli(flags); while(start < end) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); @@ -417,7 +361,6 @@ blast_scache128_page(start); start += PAGE_SIZE; } - __restore_flags(flags); } } } @@ -427,14 +370,10 @@ unsigned long end) { if (mm->context != 0) { - unsigned long flags; - #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); blast_dcache16(); blast_icache16(); - __restore_flags(flags); } } @@ -443,14 +382,10 @@ unsigned long end) { if (mm->context != 0) { - unsigned long flags; - #ifdef DEBUG_CACHE printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end); #endif - __save_and_cli(flags); blast_dcache32(); blast_icache32(); - __restore_flags(flags); } } @@ -553,7 +488,6 @@ unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -568,7 +502,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -598,14 +531,12 @@ } else blast_scache16_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_s32d16i16(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -620,7 +551,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -649,14 +579,12 @@ } else blast_scache32_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_s64d16i16(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -671,7 +599,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -700,14 +627,12 @@ } else blast_scache64_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_s128d16i16(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -722,7 +647,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -752,14 +676,12 @@ } else blast_scache128_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_s32d32i32(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -774,7 +696,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -804,14 +725,12 @@ } else blast_scache32_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_s64d32i32(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -826,7 +745,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -856,14 +774,12 @@ } else blast_scache64_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_s128d32i32(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -878,7 +794,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -907,14 +822,12 @@ } else blast_scache128_page(page); out: - __restore_flags(flags); } static void r4k_flush_cache_page_d16i16(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -929,7 +842,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -958,14 +870,12 @@ blast_dcache16_page_indexed(page); } out: - __restore_flags(flags); } static void r4k_flush_cache_page_d32i32(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -980,7 +890,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1010,14 +919,12 @@ blast_dcache32_page_indexed(page); } out: - __restore_flags(flags); } static void r4k_flush_cache_page_d32i32_r4600(struct vm_area_struct *vma, unsigned long page) { struct mm_struct *mm = vma->vm_mm; - unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; @@ -1032,7 +939,6 @@ #ifdef DEBUG_CACHE printk("cpage[%d,%08lx]", (int)mm->context, page); #endif - __save_and_cli(flags); page &= PAGE_MASK; pgdp = pgd_offset(mm, page); pmdp = pmd_offset(pgdp, page); @@ -1062,7 +968,6 @@ blast_dcache32_page_indexed(page ^ dcache_waybit); } out: - __restore_flags(flags); } /* If the addresses passed to these routines are valid, they are |