diff options
author | Jamie Lenehan <lenehan@twibble.org> | 2007-04-26 10:27:03 +0000 |
---|---|---|
committer | Jamie Lenehan <lenehan@twibble.org> | 2007-04-26 10:27:03 +0000 |
commit | 8e3e7f20441eabbfbbd0cbd9fb87e9995a63a093 (patch) | |
tree | a7443d4215dd58b1268639c029bbb8b9b92765bb /packages/linux/linux-titan-sh4-2.6.21/no-mm-mutex.patch | |
parent | 61648a45cdd85c347d41faed9f95307a42cedb81 (diff) |
linux-titan-sh4: Add 2.6.21 kernel. This moves away from the old linux-sh
cvs and uses the main linux kernel directly.
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]); + } + } + |