From patchwork Sat Jan 29 21:41:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12729647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86BD4C433EF for ; Sat, 29 Jan 2022 21:41:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1092F6B0081; Sat, 29 Jan 2022 16:41:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B9526B0082; Sat, 29 Jan 2022 16:41:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC3256B0083; Sat, 29 Jan 2022 16:41:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id DDB616B0081 for ; Sat, 29 Jan 2022 16:41:10 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8FB13181CA347 for ; Sat, 29 Jan 2022 21:41:10 +0000 (UTC) X-FDA: 79084645500.05.C0ABE38 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 0339740006 for ; Sat, 29 Jan 2022 21:41:09 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3698160AFD; Sat, 29 Jan 2022 21:41:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57E5FC340E5; Sat, 29 Jan 2022 21:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1643492468; bh=f5jLvhnm9yNe/zMKjo8gyaqBIg5K7lhZuhAKD/Z+CqU=; h=Date:From:To:Subject:In-Reply-To:From; b=EKzEAR4BDItLruU6+w879CFKg8wHf66LWENbcVLzLq5yEUi4266RlpskOSok8xG+9 mzquP6zszaGqqBmS1MNRsQFI87duaadZRTVI2BCNpQRuW+nsrv0T3zoUWSmHIVHDm8 NN3gny8daNBKO1oDNBGVWvJXLS391ND4xMZUpjsU= Date: Sat, 29 Jan 2022 13:41:07 -0800 From: Andrew Morton To: akpm@linux-foundation.org, bigeasy@linutronix.de, hch@lst.de, linux-mm@kvack.org, maorg@nvidia.com, mm-commits@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org Subject: [patch 06/12] tools/testing/scatterlist: add missing defines Message-ID: <20220129214107.iAiu2I6CA%akpm@linux-foundation.org> In-Reply-To: <20220129134026.8ccf701012f26eb2c2c269c9@linux-foundation.org> User-Agent: s-nail v14.8.16 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0339740006 X-Stat-Signature: 8xw3pp7fkjn3phseaf1dxtzcus463k4d X-Rspam-User: nil Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=EKzEAR4B; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1643492469-945834 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Maor Gottlieb Subject: tools/testing/scatterlist: add missing defines The cited commits replaced preemptible with pagefault_disabled and flush_kernel_dcache_page with flush_dcache_page respectively, hence need to update the corresponding defines in the test. scatterlist.c: In function ‘sg_miter_stop’: scatterlist.c:919:4: warning: implicit declaration of function ‘flush_dcache_page’ [-Wimplicit-function-declaration] flush_dcache_page(miter->page); ^~~~~~~~~~~~~~~~~ In file included from ./linux/scatterlist.h:8:0, from scatterlist.c:9: scatterlist.c:922:18: warning: implicit declaration of function ‘pagefault_disabled’ [-Wimplicit-function-declaration] WARN_ON_ONCE(!pagefault_disabled()); ^ ./linux/mm.h:23:25: note: in definition of macro ‘WARN_ON_ONCE’ int __ret_warn_on = !!(condition); \ ^~~~~~~~~ Link: https://lkml.kernel.org/r/20220118082105.1737320-1-maorg@nvidia.com Fixes: 723aca208516 ("mm/scatterlist: replace the !preemptible warning in sg_miter_stop()") Fixes: 0e84f5dbf8d6 ("scatterlist: replace flush_kernel_dcache_page with flush_dcache_page") Signed-off-by: Maor Gottlieb Tested-by: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Christoph Hellwig Signed-off-by: Andrew Morton --- tools/testing/scatterlist/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/tools/testing/scatterlist/linux/mm.h~tools-testing-scatterlist-add-missing-defines +++ a/tools/testing/scatterlist/linux/mm.h @@ -74,7 +74,7 @@ static inline unsigned long page_to_phys __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ x, y) -#define preemptible() (1) +#define pagefault_disabled() (0) static inline void *kmap(struct page *page) { @@ -127,6 +127,7 @@ kmalloc_array(unsigned int n, unsigned i #define kmemleak_free(a) #define PageSlab(p) (0) +#define flush_dcache_page(p) #define MAX_ERRNO 4095