patch-2.4.6 linux/arch/mips/kernel/r4k_misc.S
Next file: linux/arch/mips/kernel/r4k_switch.S
Previous file: linux/arch/mips/kernel/r4k_fpu.S
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Mon Jul 2 13:56:40 2001
- Orig file:
v2.4.5/linux/arch/mips/kernel/r4k_misc.S
- Orig date:
Fri Apr 13 20:26:07 2001
diff -u --recursive --new-file v2.4.5/linux/arch/mips/kernel/r4k_misc.S linux/arch/mips/kernel/r4k_misc.S
@@ -35,10 +35,25 @@
* in register PTE, a ptr into the table in which
* the pte belongs is in PTR.
*/
+
+#ifdef CONFIG_SMP
+#define GET_PGD(scratch, ptr) \
+ mfc0 ptr, CP0_CONTEXT; \
+ la scratch, current_pgd;\
+ srl ptr, 23; \
+ sll ptr, 2; \
+ addu ptr, scratch, ptr; \
+ lw ptr, (ptr);
+#else
+#define GET_PGD(scratch, ptr) \
+ lw ptr, current_pgd;
+#endif
+
+
#define LOAD_PTE(pte, ptr) \
+ GET_PGD(pte, ptr) \
mfc0 pte, CP0_BADVADDR; \
srl pte, pte, 22; \
- lw ptr, current_pgd; \
sll pte, pte, 2; \
addu ptr, ptr, pte; \
mfc0 pte, CP0_BADVADDR; \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)