diff options
| author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-09 08:41:19 +0000 |
|---|---|---|
| committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-09 08:41:19 +0000 |
| commit | 9d829ed05c295df608b4fc108eb1c628fd06fd39 (patch) | |
| tree | c1b27cfe4498f8abef1a61325922906f3e6a32ff /packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch | |
| parent | 1434b204e16e87b7f59f074f3036d5dcbcf0116f (diff) | |
| parent | 6ccac10beeaaa02a86081bd6179fd57c208ad6b1 (diff) | |
merge of '76e1e69496801009ea0aa69c84f76e858978ab99'
and 'db976a98427dd6a195e2cf167e225de2d0206aea'
Diffstat (limited to 'packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch')
| -rw-r--r-- | packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch b/packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch new file mode 100644 index 0000000000..a1b10eed9f --- /dev/null +++ b/packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch @@ -0,0 +1,47 @@ +Patch out the use of mutex's to protect the copy/clear user page +operations. These functions sleep, and therefore the mutex's cause +scheduling while atomic errors. Now this actually opens up the +possiblity of some corruption (not actually seen in practice, but +theoretically possible) and therefore is not the correct fix, but all +proposed replacements have so far been even more problematic. + +diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c +index df69da9..7bc36a4 100644 +--- a/arch/sh/mm/pg-sh4.c ++++ b/arch/sh/mm/pg-sh4.c +@@ -37,7 +37,7 @@ void clear_user_page(void *to, unsigned + unsigned long flags; + + entry = pfn_pte(phys_addr >> PAGE_SHIFT, PAGE_KERNEL); +- mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); ++// mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); + set_pte(pte, entry); + local_irq_save(flags); + flush_tlb_one(get_asid(), p3_addr); +@@ -45,7 +45,7 @@ void clear_user_page(void *to, unsigned + update_mmu_cache(NULL, p3_addr, entry); + __clear_user_page((void *)p3_addr, to); + pte_clear(&init_mm, p3_addr, pte); +- mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); ++// mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); + } + } + +@@ -73,7 +73,7 @@ void copy_user_page(void *to, void *from + unsigned long flags; + + entry = pfn_pte(phys_addr >> PAGE_SHIFT, PAGE_KERNEL); +- mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); ++// mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); + set_pte(pte, entry); + local_irq_save(flags); + flush_tlb_one(get_asid(), p3_addr); +@@ -81,7 +81,7 @@ void copy_user_page(void *to, void *from + update_mmu_cache(NULL, p3_addr, entry); + __copy_user_page((void *)p3_addr, from, to); + pte_clear(&init_mm, p3_addr, pte); +- mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); ++// mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); + } + } + |
