All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch added to -mm tree
@ 2022-02-10  0:18 Andrew Morton
  2022-02-10  4:13 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2022-02-10  0:18 UTC (permalink / raw)
  To: mm-commits, sfr, apopple, sj, akpm


The patch titled
     Subject: mm/gup: make migrate_device_page() fails always if !CONFIG_DEVICE_PRIVATE
has been added to the -mm tree.  Its filename is
     mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: mm/gup: make migrate_device_page() fails always if !CONFIG_DEVICE_PRIVATE

Commit 7059ac82be44 ("mm/gup.c: migrate device coherent pages when
pinning instead of failing") in -mm tree[1] introduces
'migrate_device_page()', which uses several functions that defined under
CONFIG_DEVICE_RIVATE.  As a result, build under 'CONFIG_MIGRATION &&
!CONFIG_DEVICE_PRIVATE' fails as below.

      LD      .tmp_vmlinux.kallsyms1
    mm/gup.o: In function `migrate_device_page':
    /linux/mm/gup.c:1856: undefined reference to `migrate_vma_setup'
    /linux/mm/gup.c:1876: undefined reference to `migrate_vma_pages'
    /linux/mm/gup.c:1879: undefined reference to `migrate_vma_finalize'
    /linux/Makefile:1222: recipe for target 'vmlinux' failed
    make[1]: *** [vmlinux] Error 1

This commit fixes it by implementing an always-failing version of the
function for !CONFIG_DEVICE_PRIVATE'.

[1] https://www.ozlabs.org/~akpm/mmotm/broken-out/mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing.patch

Link: https://lkml.kernel.org/r/20220209094158.21941-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/gup.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/mm/gup.c~mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix
+++ a/mm/gup.c
@@ -1834,6 +1834,7 @@ struct page *get_dump_page(unsigned long
 #endif /* CONFIG_ELF_CORE */
 
 #ifdef CONFIG_MIGRATION
+#ifdef CONFIG_DEVICE_PRIVATE
 /*
  * Migrates a device coherent page back to normal memory. Caller should have a
  * reference on page which will be copied to the new page if migration is
@@ -1887,6 +1888,14 @@ static struct page *migrate_device_page(
 
 	return dpage;
 }
+#else
+static inline struct page *migrate_device_page(struct page *page,
+					unsigned int gup_flags)
+{
+	return NULL;
+}
+#endif /* CONFIG_DEVICE_PRIVATE */
+
 
 /*
  * Check whether all pages are pinnable, if so return number of pages.  If some
_

Patches currently in -mm which might be from sj@kernel.org are

mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch
mm-damon-dbgfs-init_regions-use-target-index-instead-of-target-id.patch
docs-admin-guide-mm-damon-usage-update-for-changed-initail_regions-file-input.patch
mm-damon-core-move-damon_set_targets-into-dbgfs.patch
mm-damon-remove-the-target-id-concept.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: + mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch added to -mm tree
  2022-02-10  0:18 + mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch added to -mm tree Andrew Morton
@ 2022-02-10  4:13 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2022-02-10  4:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mm-commits, apopple, sj

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

Hi Andrew,

On Wed, 09 Feb 2022 16:18:29 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> The patch titled
>      Subject: mm/gup: make migrate_device_page() fails always if !CONFIG_DEVICE_PRIVATE
> has been added to the -mm tree.  Its filename is
>      mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch

Added to linux-next today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-10  4:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  0:18 + mm-gupc-migrate-device-coherent-pages-when-pinning-instead-of-failing-fix.patch added to -mm tree Andrew Morton
2022-02-10  4:13 ` Stephen Rothwell

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.