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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D056C433EF for ; Thu, 14 Oct 2021 21:34:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0160D6105A for ; Thu, 14 Oct 2021 21:34:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233178AbhJNVg2 (ORCPT ); Thu, 14 Oct 2021 17:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231180AbhJNVg0 (ORCPT ); Thu, 14 Oct 2021 17:36:26 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1CF7C061570; Thu, 14 Oct 2021 14:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=3uz2MkNVnJq3tzD89PFjBt7/bgaD45MTB8/bwuUoYEY=; b=U6Y05WuYcP5EXxvp6aXswlEF0b HeYDv9+jGedfXi8wIMy53Lz1SjAGZpmHT+hMGEmn2GhdciXU5OT3ctTGNPM/rjqYDLGn/a6FWlLkQ T9ZJ7GBOeCFVtuNV1fmQpbZ3W9aitEvBcHcvKPphwPAQAi7eYA5nXW872vzoubGQBYDV9tPEkdgmI HIVfZ/26GVFmxyAoP6Fw+72u9eE6kciyb8hPi9Zd7WYr5koVvSanTM0AHZaUl0MR7vdrio5TfiteO EBkgObIK8SLsd6dmX2CGec92o2tu3Ex5Huowc6QOgm7u+1hQe2O2dXLqem4FaVkj2FnTIMibWA2iz gevguIIw==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mb8Ml-004QkI-8N; Thu, 14 Oct 2021 21:34:19 +0000 Subject: Re: [PATCH] mm/damon/vaddr: Include 'highmem.h' to fix a build failure To: SeongJae Park , akpm@linux-foundation.org Cc: broonie@kernel.org, linux-next@vger.kernel.org, mhocko@suse.cz, sfr@canb.auug.org.au, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20211014110848.5204-1-sj@kernel.org> From: Randy Dunlap Message-ID: <8e8a5739-59e8-7b73-5fca-1768b3e18ffe@infradead.org> Date: Thu, 14 Oct 2021 14:34:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211014110848.5204-1-sj@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/14/21 4:08 AM, SeongJae Park wrote: > Commit 0ff28922686c ("mm/damon/vaddr: separate commonly usable > functions") in -mm tree[1] moves include of 'highmem.h' from 'vaddr.c' > to 'prmtv-common.c', though the code for the header is still in > 'vaddr.c'. As a result, build with 'CONFIG_HIGHPTE' fails as below: > > In file included from ../include/linux/mm.h:33:0, > from ../include/linux/kallsyms.h:13, > from ../include/linux/bpf.h:20, > from ../include/linux/bpf-cgroup.h:5, > from ../include/linux/cgroup-defs.h:22, > from ../include/linux/cgroup.h:28, > from ../include/linux/hugetlb.h:9, > from ../mm/damon/vaddr.c:11: > ../mm/damon/vaddr.c: In function ‘damon_mkold_pmd_entry’: > ../include/linux/pgtable.h:97:12: error: implicit declaration of function ‘kmap_atomic’; did you mean ‘mcopy_atomic’? [-Werror=implicit-function-declaration] > ((pte_t *)kmap_atomic(pmd_page(*(dir))) + \ > ^ > ../include/linux/mm.h:2376:17: note: in expansion of macro ‘pte_offset_map’ > pte_t *__pte = pte_offset_map(pmd, address); \ > ^~~~~~~~~~~~~~ > ../mm/damon/vaddr.c:387:8: note: in expansion of macro ‘pte_offset_map_lock’ > pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl); > ^~~~~~~~~~~~~~~~~~~ > ../include/linux/pgtable.h:99:24: error: implicit declaration of function ‘kunmap_atomic’; did you mean ‘in_atomic’? [-Werror=implicit-function-declaration] > #define pte_unmap(pte) kunmap_atomic((pte)) > ^ > ../include/linux/mm.h:2384:2: note: in expansion of macro ‘pte_unmap’ > pte_unmap(pte); \ > ^~~~~~~~~ > ../mm/damon/vaddr.c:392:2: note: in expansion of macro ‘pte_unmap_unlock’ > pte_unmap_unlock(pte, ptl); > ^~~~~~~~~~~~~~~~ > > This commit fixes the issue by moving the include back to 'vaddr.c'. > > [1] https://github.com/hnaz/linux-mm/commit/0ff28922686c > > Reported-by: Randy Dunlap > Signed-off-by: SeongJae Park Acked-by: Randy Dunlap # build-tested Thanks. > --- > mm/damon/prmtv-common.c | 1 - > mm/damon/vaddr.c | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/damon/prmtv-common.c b/mm/damon/prmtv-common.c > index 1768cbe1b9ff..7e62ee54fb54 100644 > --- a/mm/damon/prmtv-common.c > +++ b/mm/damon/prmtv-common.c > @@ -5,7 +5,6 @@ > * Author: SeongJae Park > */ > > -#include > #include > #include > #include > diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c > index ce7e36ca1bff..758501b8d97d 100644 > --- a/mm/damon/vaddr.c > +++ b/mm/damon/vaddr.c > @@ -8,6 +8,7 @@ > #define pr_fmt(fmt) "damon-va: " fmt > > #include > +#include > #include > #include > #include > -- ~Randy