From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE018C433DF for ; Mon, 8 Jun 2020 04:41:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 73F8820760 for ; Mon, 8 Jun 2020 04:41:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="vMEfU1Ym" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73F8820760 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1BE8D6B00A5; Mon, 8 Jun 2020 00:41:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 16E4D6B00A6; Mon, 8 Jun 2020 00:41:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0ABC06B00A7; Mon, 8 Jun 2020 00:41:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id D9CF86B00A5 for ; Mon, 8 Jun 2020 00:41:47 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A113B3FA76 for ; Mon, 8 Jun 2020 04:41:47 +0000 (UTC) X-FDA: 76904796654.16.trip91_290363a26db7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 789DD100E753F for ; Mon, 8 Jun 2020 04:41:47 +0000 (UTC) X-HE-Tag: trip91_290363a26db7 X-Filterd-Recvd-Size: 2726 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Jun 2020 04:41:47 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3CECA20823; Mon, 8 Jun 2020 04:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591591306; bh=2pfemka1p827ZMLpym+JyZ26e1HoXaEIgzYBUm+BHoA=; h=Date:From:To:Subject:In-Reply-To:From; b=vMEfU1YmW7MLEQiX5JZhrJ4T2oukoV4ISpBnbYudR7Flvr53AWOUHlQxrF8SVEhXX 2nlR8fjOE0Ams/9ggVYcKCyz9nlTlpZ71CSpNTLlMA1BZmNNv6H1j9IS5CadvISa9q fiu7qq+IaIZKF8JzZbFqmkruy8p0JRDuArj6f7hY= Date: Sun, 07 Jun 2020 21:41:45 -0700 From: Andrew Morton To: akpm@linux-foundation.org, arnd@arndb.de, hch@lst.de, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 31/54] asm-generic: improve the flush_dcache_page stub Message-ID: <20200608044145.ctvUr3RLY%akpm@linux-foundation.org> In-Reply-To: <20200607212615.b050e41fac139a1e16fe00bd@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Queue-Id: 789DD100E753F X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Christoph Hellwig Subject: asm-generic: improve the flush_dcache_page stub There is a magic ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE cpp symbol that guards non-stub availability of flush_dcache_pagge. Use that to check if flush_dcache_pagg is implemented. Link: http://lkml.kernel.org/r/20200515143646.3857579-8-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Arnd Bergmann Signed-off-by: Andrew Morton --- include/asm-generic/cacheflush.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/include/asm-generic/cacheflush.h~asm-generic-improve-the-flush_dcache_page-stub +++ a/include/asm-generic/cacheflush.h @@ -2,8 +2,6 @@ #ifndef _ASM_GENERIC_CACHEFLUSH_H #define _ASM_GENERIC_CACHEFLUSH_H -#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 - /* * The cache doesn't need to be flushed when TLB entries change when * the cache is mapped to physical memory, not virtual memory @@ -42,12 +40,14 @@ static inline void flush_cache_page(stru } #endif -#ifndef flush_dcache_page +#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE static inline void flush_dcache_page(struct page *page) { } +#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 #endif + #ifndef flush_dcache_mmap_lock static inline void flush_dcache_mmap_lock(struct address_space *mapping) { _