* [PATCH 02/15] mm/hmm: fix header file if/else/endif maze v2 [not found] <20180323005527.758-1-jglisse@redhat.com> @ 2018-03-23 0:55 ` jglisse 2018-03-23 0:55 ` [PATCH 05/15] mm/hmm: hmm_pfns_bad() was accessing wrong struct jglisse 1 sibling, 0 replies; 3+ messages in thread From: jglisse @ 2018-03-23 0:55 UTC (permalink / raw) To: linux-mm Cc: Andrew Morton, linux-kernel, Jérôme Glisse, stable, Ralph Campbell, John Hubbard, Evgeny Baskakov From: Jérôme Glisse <jglisse@redhat.com> The #if/#else/#endif for IS_ENABLED(CONFIG_HMM) were wrong. Because of this after multiple include there was multiple definition of both hmm_mm_init() and hmm_mm_destroy() leading to build failure if HMM was enabled (CONFIG_HMM set). Changed since v1: - Fix the maze when CONFIG_HMM is disabled not just when it is disabled. This fix bot build failure. - Improved commit message. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Cc: stable@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Evgeny Baskakov <ebaskakov@nvidia.com> --- include/linux/hmm.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/include/linux/hmm.h b/include/linux/hmm.h index 325017ad9311..36dd21fe5caf 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -498,23 +498,16 @@ struct hmm_device { struct hmm_device *hmm_device_new(void *drvdata); void hmm_device_put(struct hmm_device *hmm_device); #endif /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */ -#endif /* IS_ENABLED(CONFIG_HMM) */ /* Below are for HMM internal use only! Not to be used by device driver! */ -#if IS_ENABLED(CONFIG_HMM_MIRROR) void hmm_mm_destroy(struct mm_struct *mm); static inline void hmm_mm_init(struct mm_struct *mm) { mm->hmm = NULL; } -#else /* IS_ENABLED(CONFIG_HMM_MIRROR) */ -static inline void hmm_mm_destroy(struct mm_struct *mm) {} -static inline void hmm_mm_init(struct mm_struct *mm) {} -#endif /* IS_ENABLED(CONFIG_HMM_MIRROR) */ - - #else /* IS_ENABLED(CONFIG_HMM) */ static inline void hmm_mm_destroy(struct mm_struct *mm) {} static inline void hmm_mm_init(struct mm_struct *mm) {} +#endif /* IS_ENABLED(CONFIG_HMM) */ #endif /* LINUX_HMM_H */ -- 2.14.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 05/15] mm/hmm: hmm_pfns_bad() was accessing wrong struct [not found] <20180323005527.758-1-jglisse@redhat.com> 2018-03-23 0:55 ` [PATCH 02/15] mm/hmm: fix header file if/else/endif maze v2 jglisse @ 2018-03-23 0:55 ` jglisse 1 sibling, 0 replies; 3+ messages in thread From: jglisse @ 2018-03-23 0:55 UTC (permalink / raw) To: linux-mm Cc: Andrew Morton, linux-kernel, Jérôme Glisse, stable, Evgeny Baskakov, Ralph Campbell, Mark Hairgrove, John Hubbard From: Jérôme Glisse <jglisse@redhat.com> The private field of mm_walk struct point to an hmm_vma_walk struct and not to the hmm_range struct desired. Fix to get proper struct pointer. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Cc: stable@vger.kernel.org Cc: Evgeny Baskakov <ebaskakov@nvidia.com> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: Mark Hairgrove <mhairgrove@nvidia.com> Cc: John Hubbard <jhubbard@nvidia.com> --- mm/hmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/hmm.c b/mm/hmm.c index 2d00769e8985..812a66997627 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -336,7 +336,8 @@ static int hmm_pfns_bad(unsigned long addr, unsigned long end, struct mm_walk *walk) { - struct hmm_range *range = walk->private; + struct hmm_vma_walk *hmm_vma_walk = walk->private; + struct hmm_range *range = hmm_vma_walk->range; hmm_pfn_t *pfns = range->pfns; unsigned long i; -- 2.14.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <20180320020038.3360-1-jglisse@redhat.com>]
* [PATCH 05/15] mm/hmm: hmm_pfns_bad() was accessing wrong struct [not found] <20180320020038.3360-1-jglisse@redhat.com> @ 2018-03-20 2:00 ` jglisse 0 siblings, 0 replies; 3+ messages in thread From: jglisse @ 2018-03-20 2:00 UTC (permalink / raw) To: linux-mm Cc: Andrew Morton, linux-kernel, Jérôme Glisse, stable, Evgeny Baskakov, Ralph Campbell, Mark Hairgrove, John Hubbard From: Jérôme Glisse <jglisse@redhat.com> The private field of mm_walk struct point to an hmm_vma_walk struct and not to the hmm_range struct desired. Fix to get proper struct pointer. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Cc: stable@vger.kernel.org Cc: Evgeny Baskakov <ebaskakov@nvidia.com> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: Mark Hairgrove <mhairgrove@nvidia.com> Cc: John Hubbard <jhubbard@nvidia.com> --- mm/hmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/hmm.c b/mm/hmm.c index 667944630dc9..f5631e1a7319 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -312,7 +312,8 @@ static int hmm_pfns_bad(unsigned long addr, unsigned long end, struct mm_walk *walk) { - struct hmm_range *range = walk->private; + struct hmm_vma_walk *hmm_vma_walk = walk->private; + struct hmm_range *range = hmm_vma_walk->range; hmm_pfn_t *pfns = range->pfns; unsigned long i; -- 2.14.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-23 0:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180323005527.758-1-jglisse@redhat.com>
2018-03-23 0:55 ` [PATCH 02/15] mm/hmm: fix header file if/else/endif maze v2 jglisse
2018-03-23 0:55 ` [PATCH 05/15] mm/hmm: hmm_pfns_bad() was accessing wrong struct jglisse
[not found] <20180320020038.3360-1-jglisse@redhat.com>
2018-03-20 2:00 ` jglisse
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).