Skip to content

Commit e9ed22e

Browse files
danglin44hdeller
authored andcommitted
parisc: Fix flush_anon_page on PA8800/PA8900
Anonymous pages are allocated with the shared mappings colouring, SHM_COLOUR. Since the alias boundary on machines with PA8800 and PA8900 processors is unknown, flush_user_cache_page() might not flush all mappings of a shared anonymous page. Flushing the whole data cache flushes all mappings. This won't fix all coherency issues with shared mappings but it seems to work well in practice. I haven't seen any random memory faults in almost a month on a rp3440 running as a debian buildd machine. There is a small preformance hit. Signed-off-by: John David Anglin <[email protected]> Signed-off-by: Helge Deller <[email protected]> Cc: [email protected] # v5.18+
1 parent d16c5c7 commit e9ed22e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/parisc/kernel/cache.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,10 @@ void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned lon
722722
return;
723723

724724
if (parisc_requires_coherency()) {
725-
flush_user_cache_page(vma, vmaddr);
725+
if (vma->vm_flags & VM_SHARED)
726+
flush_data_cache();
727+
else
728+
flush_user_cache_page(vma, vmaddr);
726729
return;
727730
}
728731

0 commit comments

Comments
 (0)