From: Peter Xu <peterx@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [linux-next:master 11904/12006] include/linux/hugetlb.h:1240:33: error: 'VM_MAYSHARE' undeclared
Date: Wed, 30 Nov 2022 10:53:08 -0500 [thread overview]
Message-ID: <Y4d8ZLzD9A+nW70m@x1n> (raw)
In-Reply-To: <202211301622.RXGmFGTv-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2663 bytes --]
On Wed, Nov 30, 2022 at 05:01:00PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 700e0cd3a5ce6a2cb90d9a2aab729b52f092a7d6
> commit: 98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2 [11904/12006] mm/hugetlb: introduce hugetlb_walk()
> config: s390-randconfig-r031-20221128
> compiler: s390-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash arch/s390/mm/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/s390/mm/pageattr.c:6:
> include/linux/hugetlb.h: In function '__vma_shareable_flags_pmd':
> >> include/linux/hugetlb.h:1240:33: error: 'VM_MAYSHARE' undeclared (first use in this function)
> 1240 | return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) &&
> | ^~~~~~~~~~~
> include/linux/hugetlb.h:1240:33: note: each undeclared identifier is reported only once for each function it appears in
> >> include/linux/hugetlb.h:1240:47: error: 'VM_SHARED' undeclared (first use in this function); did you mean 'MNT_SHARED'?
> 1240 | return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) &&
> | ^~~~~~~~~
> | MNT_SHARED
>
>
> vim +/VM_MAYSHARE +1240 include/linux/hugetlb.h
>
> 1236
> 1237 static inline bool
> 1238 __vma_shareable_flags_pmd(struct vm_area_struct *vma)
> 1239 {
> > 1240 return vma->vm_flags & (VM_MAYSHARE | VM_SHARED) &&
> 1241 vma->vm_private_data;
> 1242 }
> 1243
We can use some ifdef machineries too I think, but not as solid (and clean)
as just include mm.h in hugetlb.h..
Fix attached, to be squashed into "mm/hugetlb: Introduce hugetlb_walk()"
too (along with the other fixup to the same patch).
Thanks,
--
Peter Xu
[-- Attachment #2: 0001-fixup-mm-hugetlb-Introduce-hugetlb_walk.patch --]
[-- Type: text/plain, Size: 691 bytes --]
From 0064540dd67aea788ec5dac2d87bdb83262b941a Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@redhat.com>
Date: Wed, 30 Nov 2022 10:45:21 -0500
Subject: [PATCH] fixup! mm/hugetlb: Introduce hugetlb_walk()
Content-type: text/plain
Signed-off-by: Peter Xu <peterx@redhat.com>
---
include/linux/hugetlb.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index ec2a1f93b12d..1c20cbbf3d22 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_HUGETLB_H
#define _LINUX_HUGETLB_H
+#include <linux/mm.h>
#include <linux/mm_types.h>
#include <linux/mmdebug.h>
#include <linux/fs.h>
--
2.37.3
prev parent reply other threads:[~2022-11-30 15:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 9:01 kernel test robot
2022-11-30 15:53 ` Peter Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y4d8ZLzD9A+nW70m@x1n \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox