crypto: scatterwalk - Remove obsolete PageSlab check
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 24 Jun 2021 06:32:15 +0000 (14:32 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Jun 2021 03:28:08 +0000 (11:28 +0800)
As it is now legal to call flush_dcache_page on slab pages we
no longer need to do the check in the Crypto API.

Reported-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/scatterwalk.h

index c837d07..7af0817 100644 (file)
@@ -81,12 +81,7 @@ static inline void scatterwalk_pagedone(struct scatter_walk *walk, int out,
                struct page *page;
 
                page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);
-               /* Test ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE first as
-                * PageSlab cannot be optimised away per se due to
-                * use of volatile pointer.
-                */
-               if (ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE && !PageSlab(page))
-                       flush_dcache_page(page);
+               flush_dcache_page(page);
        }
 
        if (more && walk->offset >= walk->sg->offset + walk->sg->length)