Skip to content

Commit b910fcb

Browse files
sandip4nmpe
authored andcommitted
powerpc/powernv/memtrace: Fix dcache flushing
Trace memory is cleared and the corresponding dcache lines are flushed after allocation. However, this should not be done using the PFN. This adds the missing conversion to virtual address. Fixes: 2ac02e5 ("powerpc/mm: Remove dcache flush from memory remove.") Signed-off-by: Sandipan Das <[email protected]> Reviewed-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 40c7539 commit b910fcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/platforms/powernv/memtrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ static void memtrace_clear_range(unsigned long start_pfn,
104104
* Before we go ahead and use this range as cache inhibited range
105105
* flush the cache.
106106
*/
107-
flush_dcache_range_chunked(PFN_PHYS(start_pfn),
108-
PFN_PHYS(start_pfn + nr_pages),
107+
flush_dcache_range_chunked((unsigned long)pfn_to_kaddr(start_pfn),
108+
(unsigned long)pfn_to_kaddr(start_pfn + nr_pages),
109109
FLUSH_CHUNK_SIZE);
110110
}
111111

0 commit comments

Comments
 (0)