All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [aa:mapcount_deshare 20/27] mm/gup.c:2756:3: error: implicit declaration of function 'mm_set_has_pinned_flag'
Date: Tue, 11 May 2021 10:23:39 -0400	[thread overview]
Message-ID: <YJqTa+FXy2g/kvEU@t490s> (raw)
In-Reply-To: <YJp5G5gdySlpVHwV@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2208 bytes --]

On Tue, May 11, 2021 at 08:31:23AM -0400, Andrea Arcangeli wrote:
> Hello,
> 
> thanks to the report.
> 
> Peter, this isn't immediately clear to me, is it perhaps something
> related to clang?
> 
> This is commit 8dec302e87453234fc7ac1cf4d09e4d577a06cf3

Andrea,

I guess it's probably a NOMMU arm config so the helper got opted out as I
errornously put it into a CONFIG_MMU block without noticing..

So we may need to squash below into that commit.

I really should think of something to avoid such errors in the future, as this
is the 2nd time happening at least this year..  Probably I should always start
adding helpers at the beginning of files so I won't overlook any macros..

Thanks,

----8<----
diff --git a/mm/gup.c b/mm/gup.c
index bb130723a6717..0223644d0c61a 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -392,6 +392,17 @@ void unpin_user_pages(struct page **pages, unsigned long npages)
 }
 EXPORT_SYMBOL(unpin_user_pages);
 
+/*
+ * Set the MMF_HAS_PINNED if not set yet; after set it'll be there for the mm's
+ * lifecycle.  Avoid setting the bit unless necessary, or it might cause write
+ * cache bouncing on large SMP machines for concurrent pinned gups.
+ */
+static inline void mm_set_has_pinned_flag(unsigned long *mm_flags)
+{
+       if (!test_bit(MMF_HAS_PINNED, mm_flags))
+               set_bit(MMF_HAS_PINNED, mm_flags);
+}
+
 #ifdef CONFIG_MMU
 static struct page *no_page_table(struct vm_area_struct *vma,
                unsigned int flags)
@@ -1270,17 +1281,6 @@ int fixup_user_fault(struct mm_struct *mm,
 }
 EXPORT_SYMBOL_GPL(fixup_user_fault);
 
-/*
- * Set the MMF_HAS_PINNED if not set yet; after set it'll be there for the mm's
- * lifecycle.  Avoid setting the bit unless necessary, or it might cause write
- * cache bouncing on large SMP machines for concurrent pinned gups.
- */
-static inline void mm_set_has_pinned_flag(unsigned long *mm_flags)
-{
-       if (!test_bit(MMF_HAS_PINNED, mm_flags))
-               set_bit(MMF_HAS_PINNED, mm_flags);
-}
-
 /*
  * Please note that this function, unlike __get_user_pages will not
  * return 0 for nr_pages > 0 without FOLL_NOWAIT
----8<----

-- 
Peter Xu

  reply	other threads:[~2021-05-11 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 10:45 [aa:mapcount_deshare 20/27] mm/gup.c:2756:3: error: implicit declaration of function 'mm_set_has_pinned_flag' kernel test robot
2021-05-11 12:31 ` Andrea Arcangeli
2021-05-11 14:23   ` Peter Xu [this message]
2021-05-11 14:36     ` Peter Xu
2021-05-11 15:27       ` Andrea Arcangeli
2021-12-17 18:47 ` Andrea Arcangeli
2021-12-18 12:30   ` Philip Li
2021-12-20  6:23     ` Andrea Arcangeli

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=YJqTa+FXy2g/kvEU@t490s \
    --to=peterx@redhat.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.