@@ -103,6 +103,5 @@ void flush_icache_mm(struct mm_struct *mm, bool local);
* Bits in sys_riscv_flush_icache()'s flags argument.
*/
#define SYS_RISCV_FLUSH_ICACHE_LOCAL 1UL
-#define SYS_RISCV_FLUSH_ICACHE_ALL (SYS_RISCV_FLUSH_ICACHE_LOCAL)
#endif /* _ASM_RISCV_CACHEFLUSH_H */
@@ -58,7 +58,7 @@ SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end,
unsigned long, flags)
{
/* Check the reserved flags. */
- if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_ALL))
+ if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_LOCAL))
return -EINVAL;
flush_icache_mm(current->mm, flags & SYS_RISCV_FLUSH_ICACHE_LOCAL);
It is much better to just check for the supporte flags directly rather than hiding them behind a flag. Signed-off-by: Christoph Hellwig <hch@lst.de> --- arch/riscv/include/asm/cacheflush.h | 1 - arch/riscv/kernel/sys_riscv.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)