diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2025-02-20 15:54:42 +0200 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2025-03-14 13:37:54 +0200 |
commit | ec1c6cfb1cfce92909a248f10c36bd8b18894d7e (patch) | |
tree | bcf4968fe2ca08b49c50b9844b53f07551ad0c00 /arch/riscv/lib/cache.c | |
parent | ff0a979fc3591dcfb28585ae97ed4078a3ed5ef4 (diff) |
treewide: Add a function to change page permissions
For armv8 we are adding proper page permissions for the relocated U-Boot
binary. Add a weak function that can be used across architectures to change
the page permissions
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on AML-S905X-CC
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'arch/riscv/lib/cache.c')
-rw-r--r-- | arch/riscv/lib/cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c index 71e4937ab54..31aa30bc7d7 100644 --- a/arch/riscv/lib/cache.c +++ b/arch/riscv/lib/cache.c @@ -8,6 +8,7 @@ #include <dm.h> #include <asm/insn-def.h> #include <linux/const.h> +#include <linux/errno.h> #define CBO_INVAL(base) \ INSN_I(OPCODE_MISC_MEM, FUNC3(2), __RD(0), \ @@ -151,3 +152,8 @@ __weak void enable_caches(void) if (!zicbom_block_size) log_debug("Zicbom not initialized.\n"); } + +int __weak pgprot_set_attrs(phys_addr_t addr, size_t size, enum pgprot_attrs perm) +{ + return -ENOSYS; +} |