From patchwork Mon Feb 27 17:57:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 62053 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2560829wrd; Mon, 27 Feb 2023 09:59:00 -0800 (PST) X-Google-Smtp-Source: AK7set8Kb2qSXLFJ08V/xw2hB2CUB09MVDEHgiIIIRd61RMMR0HT1YvNarY2AcYLdQlJXKvvYnLA X-Received: by 2002:a17:903:68e:b0:19d:90f:6c49 with SMTP id ki14-20020a170903068e00b0019d090f6c49mr4309189plb.68.1677520740412; Mon, 27 Feb 2023 09:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677520740; cv=none; d=google.com; s=arc-20160816; b=rc4Xs55Jlc4co5A6rC4QCHvdE8UtOblR1bGUOxVwiZExD0/jDIkLARBzIgNowmBS3d UHMv3zopLEO0bSCmEDe71PETxo6dm5qj2oyjqH3JY7RYdrN12knxx1uimCN7I5YKS4ui kafbiBl42AbbkaXy/jyuz07MLQm9J5XjYB54N8fZVVeS79wdGXeLQ2uOUnVg7kghUNGN vPiC4LjAjlJPneFMADRLdTM7EGoO400odc1atWUMTY9Ev7n/EUdXvWzHeT0w+dT5bfpO Zo+CiVZiUTTDLRbr3ZEtfmBXwBg9/5no4r5eCkB9XvdC3PNu4ckGhDiUUYZLSFTo0Z4V pPvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hMFJoNiTv8ERJFzuWrR/5P0mYOI2i9vULkEqsj63YhY=; b=yEtxkhOVnjTL4htwjWCdljabfCTVfLdOqv5G88vdc3wriIQFqKz/lr9ji10Cg9CI40 tCqyx5fdOAectSXLFmFYSTvPyHLKjWGEz7YmOVwmUTaG5VrO6gqltwxW/RBAsnvc/uYE zbhLslpea2viGdnap90UQRonAuWzvb27O9NZYbTmWlMWWYYWAqwaEExcWMJE9fz/P3+0 XfJpd/arKL5N9slmx9cPGE4nXPgR4gwtIkTJSOdf6yw02fq8jntku6ugS+SHSG3DCOVp gq/WrFBd1oFwuCLDI9sWreagpBjU8MM15utEgNqJqoIn7nCS0OUUvosVd51EpNnGnT9B iiwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eJibqO57; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kv5-20020a17090328c500b0019b7766afdcsi6942716plb.554.2023.02.27.09.58.45; Mon, 27 Feb 2023 09:59:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eJibqO57; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbjB0R5z (ORCPT + 99 others); Mon, 27 Feb 2023 12:57:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbjB0R5y (ORCPT ); Mon, 27 Feb 2023 12:57:54 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B475B241C6; Mon, 27 Feb 2023 09:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=hMFJoNiTv8ERJFzuWrR/5P0mYOI2i9vULkEqsj63YhY=; b=eJibqO57YZFwds944V3v+goNNV uL8xM/5dlRClPneYAKfqRqNxOy9AXPlKJbOYwcYSD6xmr1gbh2nXoV2SJ90excX60nNbn4YkfzbJK jrFNcGl7JdscQ9qmNEdzF9dtc9/xvIIG9NfXDdiw2w15ps8w961rR0vTrDfnJ+zxF7gA+RaK7HCnr ttacLATW7WSZrkHX/D/coc6QziGwa115pKH4T0B2GkTIu5Tj5y98Q1TIOPVNHbRaGJQ0/gYffMm3L bOaO5ZUbzBO2xh1y91BH+TvJOV71GYaWaRrFslgqaSndJGwxodoVHPpuCXbE8mErNOigANX9YGZsP A61/SyTA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWhkt-000IWv-CC; Mon, 27 Feb 2023 17:57:43 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org, linux-arch@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH v2 04/30] mm: Remove ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO Date: Mon, 27 Feb 2023 17:57:15 +0000 Message-Id: <20230227175741.71216-5-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230227175741.71216-1-willy@infradead.org> References: <20230227175741.71216-1-willy@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759007988336666735?= X-GMAIL-MSGID: =?utf-8?q?1759007988336666735?= Current best practice is to reuse the name of the function as a define to indicate that the function is implemented by the architecture. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/cacheflush.h | 4 ++-- mm/util.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/cacheflush.h b/include/linux/cacheflush.h index a6189d21f2ba..82136f3fcf54 100644 --- a/include/linux/cacheflush.h +++ b/include/linux/cacheflush.h @@ -7,14 +7,14 @@ struct folio; #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE -#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO +#ifndef flush_dcache_folio void flush_dcache_folio(struct folio *folio); #endif #else static inline void flush_dcache_folio(struct folio *folio) { } -#define ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO 0 +#define flush_dcache_folio flush_dcache_folio #endif /* ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE */ #endif /* _LINUX_CACHEFLUSH_H */ diff --git a/mm/util.c b/mm/util.c index b8ed9dbc7fd5..f66e0ca82d2d 100644 --- a/mm/util.c +++ b/mm/util.c @@ -1124,7 +1124,7 @@ void page_offline_end(void) } EXPORT_SYMBOL(page_offline_end); -#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO +#ifndef flush_dcache_folio void flush_dcache_folio(struct folio *folio) { long i, nr = folio_nr_pages(folio);