diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-11-13 16:57:24 +0300 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2019-10-28 22:12:31 +0300 |
commit | cfd9d70a855edf6adb37d0ed88be9e35274dbe49 (patch) | |
tree | 3be75666a3101764e58a227672dbf5e25f945da4 /arch/arc/include/asm/mmu.h | |
parent | 7b491c0b62594a21cab357e0118603830a500de3 (diff) | |
download | linux-cfd9d70a855edf6adb37d0ed88be9e35274dbe49.tar.xz |
ARCv2: mm: TLB Miss optim: SMP builds can cache pgd pointer in mmu scratch reg
ARC700 exception (and intr handling) didn't have auto stack switching
thus had to rely on stashing a reg temporarily (to free it up) at a
known place in memory, allowing to code up the low level stack switching.
This however was not re-entrant in SMP which thus had to repurpose the
per-cpu MMU SCRATCH DATA register otherwise used to "cache" the task pdg
pointer (vs. reading it from mm struct)
The newer HS cores do have auto-stack switching and thus even SMP builds
can use the MMU SCRATCH reg as originally intended.
This patch fixes the restriction to ARC700 SMP builds only
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/mmu.h')
-rw-r--r-- | arch/arc/include/asm/mmu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arc/include/asm/mmu.h b/arch/arc/include/asm/mmu.h index 98cadf1a09ac..0abacb82a72b 100644 --- a/arch/arc/include/asm/mmu.h +++ b/arch/arc/include/asm/mmu.h @@ -40,6 +40,10 @@ #define ARC_REG_SCRATCH_DATA0 0x46c #endif +#if defined(CONFIG_ISA_ARCV2) || !defined(CONFIG_SMP) +#define ARC_USE_SCRATCH_REG +#endif + /* Bits in MMU PID register */ #define __TLB_ENABLE (1 << 31) #define __PROG_ENABLE (1 << 30) |