diff options
author | Christoph Hellwig <hch@lst.de> | 2019-08-13 11:27:56 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-11-11 21:18:20 +0100 |
commit | 38af57825313f6c9404b42c4e4fa22311f60383a (patch) | |
tree | 024d79648181663339e4a8d521ef7f561cacb2f2 /arch/riscv/include | |
parent | lib: provide a simple generic ioremap implementation (diff) | |
download | linux-38af57825313f6c9404b42c4e4fa22311f60383a.tar.xz linux-38af57825313f6c9404b42c4e4fa22311f60383a.zip |
riscv: use the generic ioremap code
Use the generic ioremap code instead of providing a local version.
Note that this relies on the asm-generic no-op definition of
pgprot_noncached.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com>
Tested-by: Paul Walmsley <paul.walmsley@sifive.com> # rv32, rv64 boot
Acked-by: Paul Walmsley <paul.walmsley@sifive.com> # arch/riscv
Diffstat (limited to 'arch/riscv/include')
-rw-r--r-- | arch/riscv/include/asm/io.h | 3 | ||||
-rw-r--r-- | arch/riscv/include/asm/pgtable.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h index 8a5733c09e45..1dd26d964170 100644 --- a/arch/riscv/include/asm/io.h +++ b/arch/riscv/include/asm/io.h @@ -15,9 +15,6 @@ #include <asm/mmiowb.h> #include <asm/pgtable.h> -extern void __iomem *ioremap(phys_addr_t offset, unsigned long size); -extern void iounmap(volatile void __iomem *addr); - /* Generic IO read/write. These perform native-endian accesses. */ #define __raw_writeb __raw_writeb static inline void __raw_writeb(u8 val, volatile void __iomem *addr) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index d3221017194d..d51ce5ac20bd 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -62,6 +62,12 @@ #define PAGE_TABLE __pgprot(_PAGE_TABLE) +/* + * The RISC-V ISA doesn't yet specify how to query or modify PMAs, so we can't + * change the properties of memory regions. + */ +#define _PAGE_IOREMAP _PAGE_KERNEL + extern pgd_t swapper_pg_dir[]; /* MAP_PRIVATE permissions: xwr (copy-on-write) */ |