RE: [PATCH RFC v1 07/12] staging: kpc2000: Prepare transfer_complete_cb() for PG_reserved changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that.
>
>The pages are obtained via get_user_pages_fast(). I assume, these could be ZONE_DEVICE pages. Let's just exclude them as well explicitly.

I'm not sure what ZONE_DEVICE pages are, but these pages are normal system RAM, typically HugePages (but not always).

>
>Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>Cc: Vandana BN <bnvandana@xxxxxxxxx>
>Cc: "Simon Sandström" <simon@xxxxxxxxxx>
>Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>Cc: Nishka Dasgupta <nishkadg.linux@xxxxxxxxx>
>Cc: Madhumitha Prabakaran <madhumithabiw@xxxxxxxxx>
>Cc: Fabio Estevam <festevam@xxxxxxxxx>
>Cc: Matt Sickler <Matt.Sickler@xxxxxxxxxxxxxx>
>Cc: Jeremy Sowden <jeremy@xxxxxxxxxx>
>Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
>---
> drivers/staging/kpc2000/kpc_dma/fileops.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
>index cb52bd9a6d2f..457adcc81fe6 100644
>--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
>+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
>@@ -212,7 +212,8 @@ void  transfer_complete_cb(struct aio_cb_data *acd, size_t xfr_count, u32 flags)
>        BUG_ON(acd->ldev->pldev == NULL);
>
>        for (i = 0 ; i < acd->page_count ; i++) {
>-               if (!PageReserved(acd->user_pages[i])) {
>+               if (!PageReserved(acd->user_pages[i]) &&
>+                   !is_zone_device_page(acd->user_pages[i])) {
>                        set_page_dirty(acd->user_pages[i]);
>                }
>        }
>--
>2.21.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux