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 026AEC433EF for ; Fri, 15 Oct 2021 08:25:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 75C4961181 for ; Fri, 15 Oct 2021 08:25:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 75C4961181 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D8C296B0074; Fri, 15 Oct 2021 04:25:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D3B456B0075; Fri, 15 Oct 2021 04:25:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C51606B0078; Fri, 15 Oct 2021 04:25:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id B1ECC6B0074 for ; Fri, 15 Oct 2021 04:25:12 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6FD6E181D12F7 for ; Fri, 15 Oct 2021 08:25:12 +0000 (UTC) X-FDA: 78697986864.22.E75BD30 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by imf23.hostedemail.com (Postfix) with ESMTP id 365A290000AC for ; Fri, 15 Oct 2021 08:25:09 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4HVzpn3QD2z4xbY; Fri, 15 Oct 2021 19:25:05 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1634286306; bh=ozw+D1A4y7gQR95cCy5vM4UjVKHDo5E+WQ5xerze8M4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n7mqFg4AljvA4ZxLyaIAI4EUnIbKxPQ1Ly+mCdHR9rzeY33Pz0A0ZldcY20MGhHUo 1Iy90NHvwxObULEeCX8xgPLdES7yJIeU3+WVKj0lmFyx/vpJ2nqBCuJiWWbhpfn3QR 1Fh3iBmymRRGwNxb89Lo8OjLcFFjIjDSpUYuRu2EgEHCHk9xWIwfcf4gTLDSyckPlZ Nm7KwSNqzotO5ajA/6uLsQ5t96AmW3FJ07NL1MBfY/Jq0wAlgdlB/447iKNZSL45RR XX3LTxfctDWsoWFx2xykEntoelOCwLxS43yfnFy6Vt77P96is2wcTfupGfCz/tITfE 24ncrNcsBg3FQ== Date: Fri, 15 Oct 2021 19:25:03 +1100 From: Stephen Rothwell To: SeongJae Park Cc: akpm@linux-foundation.org, rdunlap@infradead.org, broonie@kernel.org, linux-next@vger.kernel.org, mhocko@suse.cz, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/damon/vaddr: Include 'highmem.h' to fix a build failure Message-ID: <20211015192503.023c189b@canb.auug.org.au> In-Reply-To: <20211014110848.5204-1-sj@kernel.org> References: <20211014110848.5204-1-sj@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/OB.PUmnGe.mA1FsdEHs9SKI"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Rspamd-Queue-Id: 365A290000AC X-Stat-Signature: bsa7imzzs1f6o7cyen1c4h3mdgtmf41r Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=canb.auug.org.au header.s=201702 header.b=n7mqFg4A; dmarc=none; spf=pass (imf23.hostedemail.com: domain of sfr@canb.auug.org.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=sfr@canb.auug.org.au X-Rspamd-Server: rspam02 X-HE-Tag: 1634286309-201382 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: --Sig_/OB.PUmnGe.mA1FsdEHs9SKI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, On Thu, 14 Oct 2021 11:08:48 +0000 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: >=20 > 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 =E2=80=98damon_mkold_pmd_entry=E2=80= =99: > ../include/linux/pgtable.h:97:12: error: implicit declaration of func= tion =E2=80=98kmap_atomic=E2=80=99; did you mean =E2=80=98mcopy_atomic=E2= =80=99? [-Werror=3Dimplicit-function-declaration] > ((pte_t *)kmap_atomic(pmd_page(*(dir))) + \ > ^ > ../include/linux/mm.h:2376:17: note: in expansion of macro =E2=80=98p= te_offset_map=E2=80=99 > pte_t *__pte =3D pte_offset_map(pmd, address); \ > ^~~~~~~~~~~~~~ > ../mm/damon/vaddr.c:387:8: note: in expansion of macro =E2=80=98pte_o= ffset_map_lock=E2=80=99 > pte =3D pte_offset_map_lock(walk->mm, pmd, addr, &ptl); > ^~~~~~~~~~~~~~~~~~~ > ../include/linux/pgtable.h:99:24: error: implicit declaration of func= tion =E2=80=98kunmap_atomic=E2=80=99; did you mean =E2=80=98in_atomic=E2=80= =99? [-Werror=3Dimplicit-function-declaration] > #define pte_unmap(pte) kunmap_atomic((pte)) > ^ > ../include/linux/mm.h:2384:2: note: in expansion of macro =E2=80=98pt= e_unmap=E2=80=99 > pte_unmap(pte); \ > ^~~~~~~~~ > ../mm/damon/vaddr.c:392:2: note: in expansion of macro =E2=80=98pte_u= nmap_unlock=E2=80=99 > pte_unmap_unlock(pte, ptl); > ^~~~~~~~~~~~~~~~ >=20 > This commit fixes the issue by moving the include back to 'vaddr.c'. >=20 > [1] https://github.com/hnaz/linux-mm/commit/0ff28922686c >=20 > Reported-by: Randy Dunlap > Signed-off-by: SeongJae Park > --- > mm/damon/prmtv-common.c | 1 - > mm/damon/vaddr.c | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) >=20 > 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 > */ > =20 > -#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 > =20 > #include > +#include > #include > #include > #include > --=20 > 2.17.1 >=20 Applied to linux-next today. --=20 Cheers, Stephen Rothwell --Sig_/OB.PUmnGe.mA1FsdEHs9SKI Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmFpOt8ACgkQAVBC80lX 0GxBlAgAkbXUuju65ELwOZXSD/HE3V9/ljSnjWlDSbeZJHFJjJGT4Z6wxz9U7PiK IDaMYR7OxnGZiShoJjWt5Wb3Pv2Y3R5MK+ofga+KbzOJjI16lGpdE4PdXqjPGuLS 5Di2Rtkwb9+7A4UPbN1V0yaGuiKze1mI9IhhGNXC9fohUDkYRV9s3hubLtfFFbvP cXXdx150qZwzOYjtdXeFFF8xjvZk3SGvFjhEwmi25wD1r1iT1FBLaGBU334wdrvn ZlksHLBwxcCgo/RmLOhgPepHXR8SOz3AQMr079vyXW0FtLOdZPqizzjCypeT05E7 2GrHJ6tByjD4PmLMng8kcjx7oIevbg== =fpqB -----END PGP SIGNATURE----- --Sig_/OB.PUmnGe.mA1FsdEHs9SKI--