Skip to content

Commit 79c62de

Browse files
Christoph Hellwigtorvalds
authored andcommitted
mmc: JZ4740: remove the flush_kernel_dcache_page call in jz4740_mmc_read_data
Patch series "_kernel_dcache_page fixes and removal". While looking to convert the block layer away from kmap_atomic towards kmap_local_page and prefeably the helpers that abstract it away I noticed that a few block drivers directly or implicitly call flush_kernel_dcache_page before kunmapping a page that has been written to. flush_kernel_dcache_page is documented to to be used in such cases, but flush_dcache_page is actually required when the page could be in the page cache and mapped to userspace, which is pretty much always the case when kmapping an arbitrary page. Unfortunately the documentation doesn't exactly make that clear, which lead to this misused. And it turns out that only the copy_strings / copy_string_kernel in the exec code were actually correct users of flush_kernel_dcache_page, which is why I think we should just remove it and eat the very minor overhead in exec rather than confusing poor driver writers. This patch (of 6): MIPS now implements flush_kernel_dcache_page (as an alias to flush_dcache_page). Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Russell King <[email protected]> Cc: Guo Ren <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Nick Hu <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Vincent Chen <[email protected]> Cc: Helge Deller <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Rich Felker <[email protected]> Cc: Geoff Levand <[email protected]> Cc: Paul Cercueil <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Alex Shi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0c52ec9 commit 79c62de

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/mmc/host/jz4740_mmc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,6 @@ static bool jz4740_mmc_read_data(struct jz4740_mmc_host *host,
578578
}
579579
}
580580
data->bytes_xfered += miter->length;
581-
582-
/* This can go away once MIPS implements
583-
* flush_kernel_dcache_page */
584-
flush_dcache_page(miter->page);
585581
}
586582
sg_miter_stop(miter);
587583

0 commit comments

Comments
 (0)