]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: remove flush_kernel_dcache_page
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Aug 2021 23:59:20 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:57 +0000 (09:33 +1000)
commite1a7557249f9ea04a7ffa98fae9ad34c4e5992ce
tree51a36d2ad134471168ef5c75ccee664c346231c5
parenta942212945866e9fe5ff5ed99528035dfb809e43
mm: remove flush_kernel_dcache_page

flush_kernel_dcache_page is a rather confusing interface that implements a
subset of flush_dcache_page by not being able to properly handle page
cache mapped pages.

The only callers left are in the exec code as all other previous callers
were incorrect as they could have dealt with page cache pages.  Replace
the calls to flush_kernel_dcache_page with calls to flush_dcache_page,
which for all architectures does either exactly the same thing, can
contains one or more of the following:

 1) an optimization to defer the cache flush for page cache pages not
    mapped into userspace
 2) additional flushing for mapped page cache pages if cache aliases
    are possible

Link: https://lkml.kernel.org/r/20210712060928.4161649-7-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Cc: Alex Shi <alexs@kernel.org>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Guo Ren <guoren@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Nick Hu <nickhu@andestech.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Vincent Chen <deanbo422@gmail.com>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
17 files changed:
Documentation/core-api/cachetlb.rst
Documentation/translations/zh_CN/core-api/cachetlb.rst
arch/arm/include/asm/cacheflush.h
arch/arm/mm/flush.c
arch/arm/mm/nommu.c
arch/csky/abiv1/cacheflush.c
arch/csky/abiv1/inc/abi/cacheflush.h
arch/mips/include/asm/cacheflush.h
arch/nds32/include/asm/cacheflush.h
arch/nds32/mm/cacheflush.c
arch/parisc/include/asm/cacheflush.h
arch/parisc/kernel/cache.c
arch/sh/include/asm/cacheflush.h
block/blk-map.c
fs/exec.c
include/linux/highmem.h
tools/testing/scatterlist/linux/mm.h