summaryrefslogtreecommitdiff
path: root/arch/arc/include/asm/entry-compact.h
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@kernel.org>2020-01-13 09:16:06 -0800
committerVineet Gupta <vgupta@kernel.org>2021-08-24 14:25:48 -0700
commit6128df5be48f48d63efdc7c52022dd163f612373 (patch)
tree8d740e544f2125984b51b048e15042d226f9c995 /arch/arc/include/asm/entry-compact.h
parent288ff7de62af0936353c9394de9d0b2c6dd22c80 (diff)
ARC: mm: use SCRATCH_DATA0 register for caching pgdir in ARCv2 only
MMU SCRATCH_DATA0 register is intended to cache task pgd. However in ARC700 SMP port, it has to be repurposed for re-entrant interrupt handling, while UP port doesn't. We currently handle these use-cases using a fabricated #define which has usual issues of dependency nesting and obvious ugliness. So clean this up: for ARC700 don't use to cache pgd (even in UP) and do the opposite for ARCv2. And while here, switch to canonical pgd_offset(). Acked-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'arch/arc/include/asm/entry-compact.h')
-rw-r--r--arch/arc/include/asm/entry-compact.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/arc/include/asm/entry-compact.h b/arch/arc/include/asm/entry-compact.h
index 6dbf5cecc8cc..5aab4f93ab8a 100644
--- a/arch/arc/include/asm/entry-compact.h
+++ b/arch/arc/include/asm/entry-compact.h
@@ -126,19 +126,11 @@
* to be saved again on kernel mode stack, as part of pt_regs.
*-------------------------------------------------------------*/
.macro PROLOG_FREEUP_REG reg, mem
-#ifndef ARC_USE_SCRATCH_REG
- sr \reg, [ARC_REG_SCRATCH_DATA0]
-#else
st \reg, [\mem]
-#endif
.endm
.macro PROLOG_RESTORE_REG reg, mem
-#ifndef ARC_USE_SCRATCH_REG
- lr \reg, [ARC_REG_SCRATCH_DATA0]
-#else
ld \reg, [\mem]
-#endif
.endm
/*--------------------------------------------------------------