patch-1.3.31 linux/include/asm-i386/page.h

Next file: linux/include/asm-i386/smp.h
Previous file: linux/include/asm-i386/locks.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.30/linux/include/asm-i386/page.h linux/include/asm-i386/page.h
@@ -60,6 +60,8 @@
  *
  * ..but the i386 has somewhat limited invalidation capabilities.
  */
+ 
+#ifndef CONFIG_SMP
 #define invalidate() \
 __asm__ __volatile__("movl %%cr3,%%eax\n\tmovl %%eax,%%cr3": : :"ax")
 
@@ -68,6 +70,14 @@
 do { if ((task)->mm == current->mm) invalidate(); } while (0)
 #define invalidate_page(task,addr) \
 do { if ((task)->mm == current->mm) invalidate(); } while (0)
+
+#else
+#include <asm/smp.h>
+#define local_invalidate() \
+__asm__ __volatile__("movl %%cr3,%%eax\n\tmovl %%eax,%%cr3": : :"ax")
+#define invalidate() \
+	smp_invalidate();
+#endif
 
 /* Certain architectures need to do special things when pte's
  * within a page table are directly modified.  Thus, the following

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this