[Intel-gfx] [PATCH 5/5] mm/hmm: WARN on illegal ->sync_cpu_device_pagetables errors
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Aug 14 20:20:27 UTC 2019
Similar to the warning in the mmu notifer, warning if an hmm mirror
callback gets it's blocking vs. nonblocking handling wrong, or if it
fails with anything else than -EAGAIN.
Cc: Jason Gunthorpe <jgg at ziepe.ca>
Cc: Ralph Campbell <rcampbell at nvidia.com>
Cc: John Hubbard <jhubbard at nvidia.com>
Cc: Dan Williams <dan.j.williams at intel.com>
Cc: Dan Carpenter <dan.carpenter at oracle.com>
Cc: Matthew Wilcox <willy at infradead.org>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Balbir Singh <bsingharora at gmail.com>
Cc: Ira Weiny <ira.weiny at intel.com>
Cc: Souptick Joarder <jrdr.linux at gmail.com>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: "Jérôme Glisse" <jglisse at redhat.com>
Cc: linux-mm at kvack.org
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
mm/hmm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/hmm.c b/mm/hmm.c
index 16b6731a34db..52ac59384268 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -205,6 +205,9 @@ static int hmm_invalidate_range_start(struct mmu_notifier *mn,
ret = -EAGAIN;
break;
}
+ WARN(ret, "%pS callback failed with %d in %sblockable context\n",
+ mirror->ops->sync_cpu_device_pagetables, ret,
+ update.blockable ? "" : "non-");
}
up_read(&hmm->mirrors_sem);
--
2.22.0
More information about the Intel-gfx
mailing list