ARC: mm: use SCRATCH_DATA0 register for caching pgdir in ARCv2 only
authorVineet Gupta <vgupta@kernel.org>
Mon, 13 Jan 2020 17:16:06 +0000 (09:16 -0800)
committerVineet Gupta <vgupta@kernel.org>
Tue, 24 Aug 2021 21:25:48 +0000 (14:25 -0700)
commit6128df5be48f48d63efdc7c52022dd163f612373
tree8d740e544f2125984b51b048e15042d226f9c995
parent288ff7de62af0936353c9394de9d0b2c6dd22c80
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>
arch/arc/include/asm/entry-compact.h
arch/arc/include/asm/mmu.h
arch/arc/include/asm/mmu_context.h
arch/arc/include/asm/pgtable.h
arch/arc/mm/fault.c
arch/arc/mm/tlb.c
arch/arc/mm/tlbex.S