f1f6a7dd | 31-Jan-2020 |
John Hubbard <jhubbard@nvidia.com> |
mm, tree-wide: rename put_user_page*() to unpin_user_page*()
In order to provide a clearer, more symmetric API for pinning and unpinning DMA pages. This way, pin_user_pages*() calls match up with u
mm, tree-wide: rename put_user_page*() to unpin_user_page*()
In order to provide a clearer, more symmetric API for pinning and unpinning DMA pages. This way, pin_user_pages*() calls match up with unpin_user_pages*() calls, and the API is a lot closer to being self-explanatory.
Link: http://lkml.kernel.org/r/20200107224558.2362728-23-jhubbard@nvidia.com Signed-off-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Björn Töpel <bjorn.topel@intel.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Ira Weiny <ira.weiny@intel.com> Cc: Jason Gunthorpe <jgg@mellanox.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jens Axboe <axboe@kernel.dk> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kirill A. Shutemov <kirill@shutemov.name> Cc: Leon Romanovsky <leonro@mellanox.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
57459435 | 31-Jan-2020 |
John Hubbard <jhubbard@nvidia.com> |
goldish_pipe: convert to pin_user_pages() and put_user_page()
1. Call the new global pin_user_pages_fast(), from pin_goldfish_pages().
2. As required by pin_user_pages(), release these pages via
goldish_pipe: convert to pin_user_pages() and put_user_page()
1. Call the new global pin_user_pages_fast(), from pin_goldfish_pages().
2. As required by pin_user_pages(), release these pages via put_user_page(). In this case, do so via put_user_pages_dirty_lock().
That has the side effect of calling set_page_dirty_lock(), instead of set_page_dirty(). This is probably more accurate.
As Christoph Hellwig put it, "set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off." [1]
Another side effect is that the release code is simplified because the page[] loop is now in gup.c instead of here, so just delete the local release_user_pages() entirely, and call put_user_pages_dirty_lock() directly, instead.
[1] https://lore.kernel.org/r/20190723153640.GB720@lst.de
Link: http://lkml.kernel.org/r/20200107224558.2362728-13-jhubbard@nvidia.com Signed-off-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Björn Töpel <bjorn.topel@intel.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Jason Gunthorpe <jgg@mellanox.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jens Axboe <axboe@kernel.dk> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kirill A. Shutemov <kirill@shutemov.name> Cc: Leon Romanovsky <leonro@mellanox.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
6d7d725b | 03-Oct-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Add a blank line to separate varibles and code
checkpacth: Missing a blank line after declarations
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroa
platform: goldfish: pipe: Add a blank line to separate varibles and code
checkpacth: Missing a blank line after declarations
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
60a6e523 | 03-Oct-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Call misc_deregister if init fails
Undo effects of misc_register if driver's init fails after misc_register.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by:
platform: goldfish: pipe: Call misc_deregister if init fails
Undo effects of misc_register if driver's init fails after misc_register.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
08360e26 | 03-Oct-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Move the file-scope goldfish_pipe_dev variable into the driver state
This is the last patch in the series of patches to move file-scope variables into the driver state. Thi
platform: goldfish: pipe: Move the file-scope goldfish_pipe_dev variable into the driver state
This is the last patch in the series of patches to move file-scope variables into the driver state. This change will help to introduce another version of the pipe driver (with different state) for the older host interface or having several instances of this device.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
43c2cc28 | 03-Oct-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Move the file-scope goldfish_pipe_miscdev variable into the driver state
This is a series of patches to move mutable file-scope variables into the driver state. This change
platform: goldfish: pipe: Move the file-scope goldfish_pipe_miscdev variable into the driver state
This is a series of patches to move mutable file-scope variables into the driver state. This change will help to introduce another version of the pipe driver (with different state) for the older host interface or having several instances of this device.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
581ae6b7 | 14-Sep-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Remove redundant header include
No symbols were used from this header.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfound
platform: goldfish: pipe: Remove redundant header include
No symbols were used from this header.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
6b979998 | 14-Sep-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Remove redundant struct declarations
goldfish_pipe_command is defines just after declaration and nothing refers to goldfish_pipe before it is defined.
Signed-off-by: Roman
platform: goldfish: pipe: Remove redundant struct declarations
goldfish_pipe_command is defines just after declaration and nothing refers to goldfish_pipe before it is defined.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
77994c69 | 14-Sep-2018 |
Roman Kiryanov <rkir@google.com> |
platform: goldfish: pipe: Remove a redundant blank line
The blank line is not required there.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundati
platform: goldfish: pipe: Remove a redundant blank line
The blank line is not required there.
Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|