aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/mmu_context.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-01-09 15:00:32 +0100
committerPalmer Dabbelt <palmer@dabbelt.com>2018-01-30 19:16:12 -0800
commit7549cdf59d9fafbaab42650375c29c64c16aa270 (patch)
tree1fca5e4c7891c3af0ca8991b97ce77ceb55358b7 /arch/riscv/include/asm/mmu_context.h
parentriscv: don't read back satp in paging_init (diff)
downloadlinux-dev-7549cdf59d9fafbaab42650375c29c64c16aa270.tar.xz
linux-dev-7549cdf59d9fafbaab42650375c29c64c16aa270.zip
riscv: rename sptbr to satp
satp is the name used by the current privileged spec 1.10, use it instead of the old name. The most recent release binutils release (2.29) doesn't know about the satp name yet, so stick to the name from the previous privileged ISA release and comment on the fact. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/include/asm/mmu_context.h')
-rw-r--r--arch/riscv/include/asm/mmu_context.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h
index 082ef8652ac7..d30f0c54b8b2 100644
--- a/arch/riscv/include/asm/mmu_context.h
+++ b/arch/riscv/include/asm/mmu_context.h
@@ -41,7 +41,12 @@ static inline void destroy_context(struct mm_struct *mm)
static inline void set_pgdir(pgd_t *pgd)
{
- csr_write(sptbr, virt_to_pfn(pgd) | SPTBR_MODE);
+ /*
+ * Use the old spbtr name instead of using the current satp
+ * name to support binutils 2.29 which doesn't know about the
+ * privileged ISA 1.10 yet.
+ */
+ csr_write(sptbr, virt_to_pfn(next->pgd) | SATP_MODE);
}
/*