page-flags.h | 4 ++++
1 files changed, 4 insertions(+)
--- 2.5.29/include/linux/page-flags.h~SMP-pte_chain_lock Sat Jul 27 23:39:04 2002
+++ 2.5.29-akpm/include/linux/page-flags.h Sat Jul 27 23:39:04 2002
@@ -240,16 +240,20 @@ static inline void pte_chain_lock(struct
* attempt to acquire the lock bit.
*/
preempt_disable();
+#ifdef CONFIG_SMP
while (test_and_set_bit(PG_chainlock, &page->flags)) {
while (test_bit(PG_chainlock, &page->flags))
cpu_relax();
}
+#endif
}
static inline void pte_chain_unlock(struct page *page)
{
+#ifdef CONFIG_SMP
smp_mb__before_clear_bit();
clear_bit(PG_chainlock, &page->flags);
+#endif
preempt_enable();
}
.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/