[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v3 38/41] powerpc: convert put_page() to put_user_page*()
- To: john.hubbard@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- From: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
- Date: Thu, 08 Aug 2019 15:42:34 +1000
- Cc: linux-fbdev@xxxxxxxxxxxxxxx, Jan Kara <jack@xxxxxxx>, kvm@xxxxxxxxxxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, Ira Weiny <ira.weiny@xxxxxxxxx>, ceph-devel@xxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, Christoph Hellwig <hch@xxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, John Hubbard <jhubbard@xxxxxxxxxx>, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, Jérôme Glisse <jglisse@xxxxxxxxxx>, linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx, Dan Williams <dan.j.williams@xxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx
- Delivery-date: Thu, 08 Aug 2019 05:42:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi John,
john.hubbard@xxxxxxxxx writes:
> diff --git a/arch/powerpc/mm/book3s64/iommu_api.c
> b/arch/powerpc/mm/book3s64/iommu_api.c
> index b056cae3388b..e126193ba295 100644
> --- a/arch/powerpc/mm/book3s64/iommu_api.c
> +++ b/arch/powerpc/mm/book3s64/iommu_api.c
> @@ -203,6 +202,7 @@ static void mm_iommu_unpin(struct
> mm_iommu_table_group_mem_t *mem)
> {
> long i;
> struct page *page = NULL;
> + bool dirty = false;
I don't think you need that initialisation do you?
> if (!mem->hpas)
> return;
> @@ -215,10 +215,9 @@ static void mm_iommu_unpin(struct
> mm_iommu_table_group_mem_t *mem)
> if (!page)
> continue;
>
> - if (mem->hpas[i] & MM_IOMMU_TABLE_GROUP_PAGE_DIRTY)
> - SetPageDirty(page);
> + dirty = mem->hpas[i] & MM_IOMMU_TABLE_GROUP_PAGE_DIRTY;
> - put_page(page);
> + put_user_pages_dirty_lock(&page, 1, dirty);
> mem->hpas[i] = 0;
> }
> }
cheers
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|