diff options
author | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-07-09 20:43:21 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-12-11 21:28:08 +0100 |
commit | 527701eda5f196588df9b36a30651804fea7d1a7 (patch) | |
tree | d9afe5b4753aa0ca2ee1829072ead75c153e369b /include/asm-generic/io.h | |
parent | Linux 5.9 (diff) | |
download | linux-527701eda5f196588df9b36a30651804fea7d1a7.tar.xz linux-527701eda5f196588df9b36a30651804fea7d1a7.zip |
lib: Add a generic version of devmem_is_allowed()
As part of adding support for STRICT_DEVMEM to the RISC-V port, Zong
provided a devmem_is_allowed() implementation that's exactly the same as
all the others I checked. Instead I'm adding a generic version, which
will soon be used.
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'include/asm-generic/io.h')
-rw-r--r-- | include/asm-generic/io.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index dabf8cb7203b..da2e861dee1c 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -1122,6 +1122,10 @@ static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer, } #endif +#ifndef CONFIG_GENERIC_DEVMEM_IS_ALLOWED +extern int devmem_is_allowed(unsigned long pfn); +#endif + #endif /* __KERNEL__ */ #endif /* __ASM_GENERIC_IO_H */ |