]> git.baikalelectronics.ru Git - kernel.git/commit
mm: remove flush_kernel_dcache_page
authorChristoph Hellwig <hch@lst.de>
Thu, 2 Sep 2021 21:56:36 +0000 (14:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Sep 2021 16:58:13 +0000 (09:58 -0700)
commit63a4c19faca57989d007d909d4634c481700d2d3
tree71ff7378bdaaa37913af78d6413dce5e6a800ce4
parentb846999a9a1fad16c1e23d323ad3bb60d687a39d
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: Linus Torvalds <torvalds@linux-foundation.org>
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