[PATCH] mm: powerpc init_mm without ptlock
authorHugh Dickins <hugh@veritas.com>
Wed, 23 Nov 2005 21:37:39 +0000 (13:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 24 Nov 2005 00:08:38 +0000 (16:08 -0800)
Restore an earlier mod which went missing in the powerpc reshuffle: the 4xx
mmu_mapin_ram does not need to take init_mm.page_table_lock.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/powerpc/mm/4xx_mmu.c

index b7bcbc232f394cfc891c255716af34ff3657b8c8..4d006aa1a0d19c69ae7f129cb39192552e8aa705 100644 (file)
@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void)
                pmd_t *pmdp;
                unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 
-               spin_lock(&init_mm.page_table_lock);
                pmdp = pmd_offset(pgd_offset_k(v), v);
                pmd_val(*pmdp++) = val;
                pmd_val(*pmdp++) = val;
                pmd_val(*pmdp++) = val;
                pmd_val(*pmdp++) = val;
-               spin_unlock(&init_mm.page_table_lock);
 
                v += LARGE_PAGE_SIZE_16M;
                p += LARGE_PAGE_SIZE_16M;
@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void)
                pmd_t *pmdp;
                unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 
-               spin_lock(&init_mm.page_table_lock);
                pmdp = pmd_offset(pgd_offset_k(v), v);
                pmd_val(*pmdp) = val;
-               spin_unlock(&init_mm.page_table_lock);
 
                v += LARGE_PAGE_SIZE_4M;
                p += LARGE_PAGE_SIZE_4M;