Skip to content
/ linux Public

Commit d646b03

Browse files
hdellergregkh
authored andcommitted
parisc: Flush correct cache in cacheflush() syscall
commit 2c98a8f upstream. The assembly flush instructions were swapped for I- and D-cache flags: SYSCALL_DEFINE3(cacheflush, ...) { if (cache & DCACHE) { "fic ...\n" } if (cache & ICACHE && error == 0) { "fdc ...\n" } Fix it by using fdc for DCACHE, and fic for ICACHE flushing. Reported-by: Felix Lechner <felix.lechner@lease-up.com> Fixes: c6d9632 ("parisc: Add cacheflush() syscall") Cc: <stable@vger.kernel.org> # v6.5+ Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0bb848d commit d646b03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/parisc/kernel/cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
953953
#else
954954
"1: cmpb,<<,n %0,%2,1b\n"
955955
#endif
956-
" fic,m %3(%4,%0)\n"
956+
" fdc,m %3(%4,%0)\n"
957957
"2: sync\n"
958958
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
959959
: "+r" (start), "+r" (error)
@@ -968,7 +968,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
968968
#else
969969
"1: cmpb,<<,n %0,%2,1b\n"
970970
#endif
971-
" fdc,m %3(%4,%0)\n"
971+
" fic,m %3(%4,%0)\n"
972972
"2: sync\n"
973973
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
974974
: "+r" (start), "+r" (error)

0 commit comments

Comments
 (0)