提交 7ce774b4 编写于 作者: H Hugh Dickins 提交者: Linus Torvalds

[PATCH] mm: powerpc init_mm without ptlock

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: NHugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 01edcd89
...@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void) ...@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void)
pmd_t *pmdp; pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; 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); pmdp = pmd_offset(pgd_offset_k(v), v);
pmd_val(*pmdp++) = val; pmd_val(*pmdp++) = val;
pmd_val(*pmdp++) = val; pmd_val(*pmdp++) = val;
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; v += LARGE_PAGE_SIZE_16M;
p += LARGE_PAGE_SIZE_16M; p += LARGE_PAGE_SIZE_16M;
...@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void) ...@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void)
pmd_t *pmdp; pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; 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); pmdp = pmd_offset(pgd_offset_k(v), v);
pmd_val(*pmdp) = val; pmd_val(*pmdp) = val;
spin_unlock(&init_mm.page_table_lock);
v += LARGE_PAGE_SIZE_4M; v += LARGE_PAGE_SIZE_4M;
p += LARGE_PAGE_SIZE_4M; p += LARGE_PAGE_SIZE_4M;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册