diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-28 01:35:12 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-28 01:35:12 +0000 |
commit | 0b9049739779f6052eb8069f3dde7c3a7f14a591 (patch) | |
tree | 9630c1ea481dd1c429a2692067316237957d6e07 /arch/mips/kernel/r4k_misc.S | |
parent | 12e00f34ea0db712ce70bc3eed334c81b3d6a344 (diff) |
SMP for 32-bit kernel, support for Sibyte SB1. Patch from Justin
with minor changes by me.
Diffstat (limited to 'arch/mips/kernel/r4k_misc.S')
-rw-r--r-- | arch/mips/kernel/r4k_misc.S | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/mips/kernel/r4k_misc.S b/arch/mips/kernel/r4k_misc.S index bfa3cb82c..e16820f88 100644 --- a/arch/mips/kernel/r4k_misc.S +++ b/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; \ |