mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-21 23:16:50 +08:00
parisc: Flush correct cache in cacheflush() syscall
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: c6d96328fe ("parisc: Add cacheflush() syscall")
Cc: <stable@vger.kernel.org> # v6.5+
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
@@ -953,7 +953,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
|
||||
#else
|
||||
"1: cmpb,<<,n %0,%2,1b\n"
|
||||
#endif
|
||||
" fic,m %3(%4,%0)\n"
|
||||
" fdc,m %3(%4,%0)\n"
|
||||
"2: sync\n"
|
||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
|
||||
: "+r" (start), "+r" (error)
|
||||
@@ -968,7 +968,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
|
||||
#else
|
||||
"1: cmpb,<<,n %0,%2,1b\n"
|
||||
#endif
|
||||
" fdc,m %3(%4,%0)\n"
|
||||
" fic,m %3(%4,%0)\n"
|
||||
"2: sync\n"
|
||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
|
||||
: "+r" (start), "+r" (error)
|
||||
|
||||
Reference in New Issue
Block a user