diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-08-18 11:21:40 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-08-19 20:28:32 -0400 |
commit | 797a747a82e23530ee45d2927bf84f3571c1acb2 (patch) | |
tree | 1d198cf33c42d91b87116ea48dff71327f7bddae /arch/powerpc/mm | |
parent | 433abcdf321322495d83c8b571bdf7134622c734 (diff) |
powerpc/mm: Fix assert_pte_locked to work properly on uniprocessor
Since the pte_lockptr is a spinlock it gets optimized away on
uniprocessor builds so using spin_is_locked is not correct. We can use
assert_spin_locked instead and get the proper behavior between UP and
SMP builds.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/pgtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index cafb2a269542..b6b32487e740 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c | |||
@@ -254,7 +254,7 @@ void assert_pte_locked(struct mm_struct *mm, unsigned long addr) | |||
254 | BUG_ON(pud_none(*pud)); | 254 | BUG_ON(pud_none(*pud)); |
255 | pmd = pmd_offset(pud, addr); | 255 | pmd = pmd_offset(pud, addr); |
256 | BUG_ON(!pmd_present(*pmd)); | 256 | BUG_ON(!pmd_present(*pmd)); |
257 | BUG_ON(!spin_is_locked(pte_lockptr(mm, pmd))); | 257 | assert_spin_locked(pte_lockptr(mm, pmd)); |
258 | } | 258 | } |
259 | #endif /* CONFIG_DEBUG_VM */ | 259 | #endif /* CONFIG_DEBUG_VM */ |
260 | 260 | ||