From: NIIBE Y. <gn...@m1...> - 2001-08-09 00:10:52
|
With this, exec time goes better. * arch/sh/mm/fault.c (update_mmu_cache): Use __set_bit (was: set_bit). * arch/sh/mm/cache-sh4.c (copy_user_page): Set PG_mapped flag in advance. Because it will be mapped real soon now. (clear_user_page): Ditto. Index: arch/sh/mm/cache-sh4.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/mm/cache-sh4.c,v retrieving revision 1.13 diff -u -r1.13 cache-sh4.c --- arch/sh/mm/cache-sh4.c 2001/08/08 23:28:47 1.13 +++ arch/sh/mm/cache-sh4.c 2001/08/09 00:06:42 @@ -366,6 +366,9 @@ */ void clear_user_page(void *to, unsigned long address) { + struct page *page = virt_to_page(to); + + __set_bit(PG_mapped, &page->flags); if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) clear_page(to); else { @@ -402,6 +405,9 @@ */ void copy_user_page(void *to, void *from, unsigned long address) { + struct page *page = virt_to_page(to); + + __set_bit(PG_mapped, &page->flags); if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) copy_page(to, from); else { Index: arch/sh/mm/fault.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/mm/fault.c,v retrieving revision 1.47 diff -u -r1.47 fault.c --- arch/sh/mm/fault.c 2001/08/08 23:28:47 1.47 +++ arch/sh/mm/fault.c 2001/08/09 00:06:42 @@ -294,7 +294,7 @@ if (VALID_PAGE(page) && !test_bit(PG_mapped, &page->flags)) { unsigned long phys = pte_val(pte) & PTE_PHYS_MASK; __flush_wback_region((void *)P1SEGADDR(phys), PAGE_SIZE); - set_bit(PG_mapped, &page->flags); + __set_bit(PG_mapped, &page->flags); } #endif -- |