parisc: Add cacheflush() syscall
Helge Deller
maintainerPATCH 1/1 parisc: Add cacheflush() syscall
Implement the missing cacheflush() syscall.
Signed-off-by Helge Deller <[email protected]>
--- arch/parisc/include/asm/assembly.h | 7 ++++ arch/parisc/include/uapi/asm/cachectl.h | 12 +++++++ arch/parisc/kernel/cache.c | 46 +++++++++++++++++++++++++ arch/parisc/kernel/syscalls/syscall.tbl | 1 + 4 files changed, 66 insertions(+) create mode 100644 arch/parisc/include/uapi/asm/cachectl.h
arch/parisc/include/asm/assembly.h +7 -0
@@ -581,6 +581,13 @@ .word (fault_addr - .), (except_addr - .) ! \ .previous +#else /* __ASSEMBLY__ */ + +#ifdef CONFIG_64BIT +# define COND (x) "*" __stringify(x) +#else +# define COND (x) __stringify(x) +#endif #endif /* __ASSEMBLY__ */ #endif
arch/parisc/include/uapi/asm/cachectl.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _ASM_CACHECTL +#define _ASM_CACHECTL + +/* +* Options for cacheflush system call +*/ +#define ICACHE (1<<0)/* flush instruction cache */ +#define DCACHE (1<<1)/* writeback and flush data cache */ +#define BCACHE (ICACHE|DCACHE)/* flush both caches */ + +#endif /* _ASM_CACHECTL */
arch/parisc/kernel/cache.c +46 -0
61 lines not on this page · raw message
arch/parisc/kernel/syscalls/syscall.tbl +1 -0
@@ -400,6 +400,7 @@ 353 common pkey_free sys_pkey_free 354 common rseq sys_rseq 355 common kexec_file_load sys_kexec_file_load sys_kexec_file_load +356 common cacheflush sys_cacheflush # up to 402 is unassigned and reserved for arch specific syscalls 403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime 404 32 clock_settime64 sys_clock_settime sys_clock_settime
--
2.40.1