From: Christoph Hellwig <hch@lst.de>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Philip Yang <Philip.Yang@amd.com>,
Ralph Campbell <rcampbell@nvidia.com>,
John Hubbard <jhubbard@nvidia.com>,
Felix.Kuehling@amd.com, dri-devel@lists.freedesktop.org,
linux-mm@kvack.org, Jerome Glisse <jglisse@redhat.com>,
Jason Gunthorpe <jgg@mellanox.com>,
amd-gfx@lists.freedesktop.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH hmm 6/6] mm/hmm: use device_private_entry_to_pfn()
Date: Sat, 21 Mar 2020 09:43:47 +0100 [thread overview]
Message-ID: <20200321084347.GF28695@lst.de> (raw)
In-Reply-To: <20200320164905.21722-7-jgg@ziepe.ca>
On Fri, Mar 20, 2020 at 01:49:05PM -0300, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg@mellanox.com>
>
> swp_offset() should not be called directly, the wrappers are supposed to
> abstract away the encoding of the device_private specific information in
> the swap entry.
>
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
> mm/hmm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/hmm.c b/mm/hmm.c
> index a09b4908e9c81a..fd9ee2b5fd9989 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -259,8 +259,8 @@ static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr,
> * the PFN even if not present.
> */
> if (hmm_is_device_private_entry(range, entry)) {
> - *pfn = hmm_device_entry_from_pfn(range,
> - swp_offset(entry));
> + *pfn = hmm_device_entry_from_pfn(
> + range, device_private_entry_to_pfn(entry));
The range parameter can stay on the first line..
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jerome Glisse <jglisse@redhat.com>,
Ralph Campbell <rcampbell@nvidia.com>,
Felix.Kuehling@amd.com, linux-mm@kvack.org,
John Hubbard <jhubbard@nvidia.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
Christoph Hellwig <hch@lst.de>, Philip Yang <Philip.Yang@amd.com>,
Jason Gunthorpe <jgg@mellanox.com>
Subject: Re: [PATCH hmm 6/6] mm/hmm: use device_private_entry_to_pfn()
Date: Sat, 21 Mar 2020 09:43:47 +0100 [thread overview]
Message-ID: <20200321084347.GF28695@lst.de> (raw)
In-Reply-To: <20200320164905.21722-7-jgg@ziepe.ca>
On Fri, Mar 20, 2020 at 01:49:05PM -0300, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg@mellanox.com>
>
> swp_offset() should not be called directly, the wrappers are supposed to
> abstract away the encoding of the device_private specific information in
> the swap entry.
>
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
> mm/hmm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/hmm.c b/mm/hmm.c
> index a09b4908e9c81a..fd9ee2b5fd9989 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -259,8 +259,8 @@ static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr,
> * the PFN even if not present.
> */
> if (hmm_is_device_private_entry(range, entry)) {
> - *pfn = hmm_device_entry_from_pfn(range,
> - swp_offset(entry));
> + *pfn = hmm_device_entry_from_pfn(
> + range, device_private_entry_to_pfn(entry));
The range parameter can stay on the first line..
next prev parent reply other threads:[~2020-03-21 10:45 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 16:48 [PATCH hmm 0/6] Small hmm_range_fault() cleanups Jason Gunthorpe
2020-03-20 16:48 ` Jason Gunthorpe
2020-03-20 16:48 ` Jason Gunthorpe
2020-03-20 16:49 ` [PATCH hmm 1/6] mm/hmm: remove pgmap checking for devmap pages Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-21 8:24 ` Christoph Hellwig
2020-03-21 8:24 ` Christoph Hellwig
2020-03-20 16:49 ` [PATCH hmm 2/6] mm/hmm: return the fault type from hmm_pte_need_fault() Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-21 8:37 ` Christoph Hellwig
2020-03-21 8:37 ` Christoph Hellwig
2020-03-23 20:14 ` Jason Gunthorpe
2020-03-23 20:14 ` Jason Gunthorpe
2020-03-23 20:14 ` Jason Gunthorpe
2020-03-20 16:49 ` [PATCH hmm 3/6] mm/hmm: remove unused code and tidy comments Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 21:46 ` Ralph Campbell
2020-03-20 21:46 ` Ralph Campbell
2020-03-20 21:46 ` Ralph Campbell
2020-03-23 17:24 ` Jason Gunthorpe
2020-03-23 17:24 ` Jason Gunthorpe
2020-03-23 17:24 ` Jason Gunthorpe
2020-03-21 8:39 ` Christoph Hellwig
2020-03-21 8:39 ` Christoph Hellwig
2020-03-23 17:24 ` Jason Gunthorpe
2020-03-23 17:24 ` Jason Gunthorpe
2020-03-23 17:24 ` Jason Gunthorpe
2020-03-23 17:27 ` Christoph Hellwig
2020-03-23 17:27 ` Christoph Hellwig
2020-03-20 16:49 ` [PATCH hmm 4/6] mm/hmm: remove HMM_FAULT_SNAPSHOT Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-21 8:40 ` Christoph Hellwig
2020-03-21 8:40 ` Christoph Hellwig
2020-03-20 16:49 ` [PATCH hmm 5/6] mm/hmm: remove the CONFIG_TRANSPARENT_HUGEPAGE #ifdef Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-21 8:43 ` Christoph Hellwig
2020-03-21 8:43 ` Christoph Hellwig
2020-03-23 17:33 ` Jason Gunthorpe
2020-03-23 17:33 ` Jason Gunthorpe
2020-03-23 17:33 ` Jason Gunthorpe
2020-03-20 16:49 ` [PATCH hmm 6/6] mm/hmm: use device_private_entry_to_pfn() Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-20 16:49 ` Jason Gunthorpe
2020-03-21 8:43 ` Christoph Hellwig [this message]
2020-03-21 8:43 ` Christoph Hellwig
2020-03-23 17:44 ` Jason Gunthorpe
2020-03-23 17:44 ` Jason Gunthorpe
2020-03-23 17:44 ` Jason Gunthorpe
2020-03-20 18:51 ` [PATCH hmm 0/6] Small hmm_range_fault() cleanups Ralph Campbell
2020-03-20 18:51 ` Ralph Campbell
2020-03-20 18:51 ` Ralph Campbell
2020-03-20 18:55 ` Jason Gunthorpe
2020-03-20 18:55 ` Jason Gunthorpe
2020-03-20 18:55 ` Jason Gunthorpe
2020-03-20 21:47 ` Ralph Campbell
2020-03-20 21:47 ` Ralph Campbell
2020-03-20 21:47 ` Ralph Campbell
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=20200321084347.GF28695@lst.de \
--to=hch@lst.de \
--cc=Felix.Kuehling@amd.com \
--cc=Philip.Yang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@mellanox.com \
--cc=jgg@ziepe.ca \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-mm@kvack.org \
--cc=rcampbell@nvidia.com \
/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.