* [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations
@ 2022-05-10 12:52 kernel test robot
2022-05-10 17:08 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-05-10 12:52 UTC (permalink / raw)
To: Liam R. Howlett
Cc: llvm, kbuild-all, linux-kernel, Andrew Morton,
Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: 584a50635cc1deee2eeab5a17dfdcf9db7add21b
commit: a245f2ec995564195c1956813ff4fee7a894f099 [338/431] mm: remove rb tree.
config: arm-randconfig-r012-20220509 (https://download.01.org/0day-ci/archive/20220510/202205102024.jnJMagOr-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=a245f2ec995564195c1956813ff4fee7a894f099
git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
git fetch --no-tags akpm-mm mm-unstable
git checkout a245f2ec995564195c1956813ff4fee7a894f099
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
vma_mas_store(vma, &mas);
^
mm/nommu.c:579:2: note: did you mean 'mas_store'?
include/linux/maple_tree.h:454:7: note: 'mas_store' declared here
void *mas_store(struct ma_state *mas, void *entry);
^
>> mm/nommu.c:615:2: error: call to undeclared function 'vma_mas_remove'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
vma_mas_remove(vma, &mas);
^
2 errors generated.
vim +/vma_mas_store +579 mm/nommu.c
547
548 /*
549 * add a VMA into a process's mm_struct in the appropriate place in the list
550 * and tree and add to the address space's page tree also if not an anonymous
551 * page
552 * - should be called with mm->mmap_lock held writelocked
553 */
554 static void add_vma_to_mm(struct mm_struct *mm, struct vm_area_struct *vma)
555 {
556 struct address_space *mapping;
557 struct vm_area_struct *prev;
558 MA_STATE(mas, &mm->mm_mt, vma->vm_start, vma->vm_end);
559
560 BUG_ON(!vma->vm_region);
561
562 mm->map_count++;
563 vma->vm_mm = mm;
564
565 /* add the VMA to the mapping */
566 if (vma->vm_file) {
567 mapping = vma->vm_file->f_mapping;
568
569 i_mmap_lock_write(mapping);
570 flush_dcache_mmap_lock(mapping);
571 vma_interval_tree_insert(vma, &mapping->i_mmap);
572 flush_dcache_mmap_unlock(mapping);
573 i_mmap_unlock_write(mapping);
574 }
575
576 prev = mas_prev(&mas, 0);
577 mas_reset(&mas);
578 /* add the VMA to the tree */
> 579 vma_mas_store(vma, &mas);
580 __vma_link_list(mm, vma, prev);
581 }
582
583 /*
584 * delete a VMA from its owning mm_struct and address space
585 */
586 static void delete_vma_from_mm(struct vm_area_struct *vma)
587 {
588 int i;
589 struct address_space *mapping;
590 struct mm_struct *mm = vma->vm_mm;
591 struct task_struct *curr = current;
592 MA_STATE(mas, &vma->vm_mm->mm_mt, 0, 0);
593
594 mm->map_count--;
595 for (i = 0; i < VMACACHE_SIZE; i++) {
596 /* if the vma is cached, invalidate the entire cache */
597 if (curr->vmacache.vmas[i] == vma) {
598 vmacache_invalidate(mm);
599 break;
600 }
601 }
602
603 /* remove the VMA from the mapping */
604 if (vma->vm_file) {
605 mapping = vma->vm_file->f_mapping;
606
607 i_mmap_lock_write(mapping);
608 flush_dcache_mmap_lock(mapping);
609 vma_interval_tree_remove(vma, &mapping->i_mmap);
610 flush_dcache_mmap_unlock(mapping);
611 i_mmap_unlock_write(mapping);
612 }
613
614 /* remove from the MM's tree and list */
> 615 vma_mas_remove(vma, &mas);
616 __vma_unlink_list(mm, vma);
617 }
618
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations
2022-05-10 12:52 [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2022-05-10 17:08 ` Andrew Morton
2022-05-10 17:35 ` Liam Howlett
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2022-05-10 17:08 UTC (permalink / raw)
To: kernel test robot
Cc: Liam R. Howlett, llvm, kbuild-all, linux-kernel,
Linux Memory Management List, Stephen Rothwell
On Tue, 10 May 2022 20:52:04 +0800 kernel test robot <lkp@intel.com> wrote:
> >> mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> vma_mas_store(vma, &mas);
Thanks.
I queued the below temp fix for now. Hopefully it makes sense for nommu.
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mapletree: build fix
Fix the vma_mas_store/vma_mas_remove issues. Missing prototypes, missing
implementation on nommu.
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/mm.h | 3 +++
mm/mmap.c | 4 ++--
mm/nommu.c | 13 +++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
--- a/mm/nommu.c~mapletree-build-fix
+++ a/mm/nommu.c
@@ -544,6 +544,19 @@ static void put_nommu_region(struct vm_r
__put_nommu_region(region);
}
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+{
+ mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
+ mas_store_prealloc(mas, vma);
+}
+
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+{
+ mas->index = vma->vm_start;
+ mas->last = vma->vm_end - 1;
+ mas_store_prealloc(mas, NULL);
+}
+
/*
* add a VMA into a process's mm_struct in the appropriate place in the list
* and tree and add to the address space's page tree also if not an anonymous
--- a/mm/mmap.c~mapletree-build-fix
+++ a/mm/mmap.c
@@ -475,7 +475,7 @@ static void __vma_link_file(struct vm_ar
*
* Note: the end address is inclusive in the maple tree.
*/
-inline void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
{
trace_vma_store(mas->tree, vma);
mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
@@ -491,7 +491,7 @@ inline void vma_mas_store(struct vm_area
* been established and points to the correct location.
* Note: the end address is inclusive in the maple tree.
*/
-static inline void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
{
trace_vma_mas_szero(mas->tree, vma->vm_start, vma->vm_end - 1);
mas->index = vma->vm_start;
--- a/include/linux/mm.h~mapletree-build-fix
+++ a/include/linux/mm.h
@@ -2669,6 +2669,9 @@ extern struct vm_area_struct *copy_vma(s
bool *need_rmap_locks);
extern void exit_mmap(struct mm_struct *);
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas);
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas);
+
static inline int check_data_rlimit(unsigned long rlim,
unsigned long new,
unsigned long start,
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations
2022-05-10 17:08 ` Andrew Morton
@ 2022-05-10 17:35 ` Liam Howlett
0 siblings, 0 replies; 3+ messages in thread
From: Liam Howlett @ 2022-05-10 17:35 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel test robot, llvm, kbuild-all, linux-kernel,
Linux Memory Management List, Stephen Rothwell
* Andrew Morton <akpm@linux-foundation.org> [220510 10:08]:
> On Tue, 10 May 2022 20:52:04 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > >> mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> > vma_mas_store(vma, &mas);
>
> Thanks.
>
> I queued the below temp fix for now. Hopefully it makes sense for nommu.
Yes that works. I'm trying to figure out the best way to keep my
tracepoints in the mmap.c version and I think this is probably better
than yet-another-underscore or dropping tracepoints all together.
I think in the long run, it might be better to put these prototypes into
mm/internal.h to limit the users.
>
>
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: mapletree: build fix
>
> Fix the vma_mas_store/vma_mas_remove issues. Missing prototypes, missing
> implementation on nommu.
>
> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> include/linux/mm.h | 3 +++
> mm/mmap.c | 4 ++--
> mm/nommu.c | 13 +++++++++++++
> 3 files changed, 18 insertions(+), 2 deletions(-)
>
> --- a/mm/nommu.c~mapletree-build-fix
> +++ a/mm/nommu.c
> @@ -544,6 +544,19 @@ static void put_nommu_region(struct vm_r
> __put_nommu_region(region);
> }
>
> +void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
> +{
> + mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
> + mas_store_prealloc(mas, vma);
> +}
> +
> +void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
> +{
> + mas->index = vma->vm_start;
> + mas->last = vma->vm_end - 1;
> + mas_store_prealloc(mas, NULL);
> +}
> +
> /*
> * add a VMA into a process's mm_struct in the appropriate place in the list
> * and tree and add to the address space's page tree also if not an anonymous
> --- a/mm/mmap.c~mapletree-build-fix
> +++ a/mm/mmap.c
> @@ -475,7 +475,7 @@ static void __vma_link_file(struct vm_ar
> *
> * Note: the end address is inclusive in the maple tree.
> */
> -inline void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
> +void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
> {
> trace_vma_store(mas->tree, vma);
> mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
> @@ -491,7 +491,7 @@ inline void vma_mas_store(struct vm_area
> * been established and points to the correct location.
> * Note: the end address is inclusive in the maple tree.
> */
> -static inline void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
> +void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
> {
> trace_vma_mas_szero(mas->tree, vma->vm_start, vma->vm_end - 1);
> mas->index = vma->vm_start;
> --- a/include/linux/mm.h~mapletree-build-fix
> +++ a/include/linux/mm.h
> @@ -2669,6 +2669,9 @@ extern struct vm_area_struct *copy_vma(s
> bool *need_rmap_locks);
> extern void exit_mmap(struct mm_struct *);
>
> +void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas);
> +void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas);
> +
> static inline int check_data_rlimit(unsigned long rlim,
> unsigned long new,
> unsigned long start,
> _
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-10 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 12:52 [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations kernel test robot
2022-05-10 17:08 ` Andrew Morton
2022-05-10 17:35 ` Liam Howlett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).